IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 20257


Ignore:
Timestamp:
Oct 17, 2008, 4:00:52 PM (18 years ago)
Author:
bills
Message:

various postage stamp server updates and bug fixes

Location:
trunk/pstamp
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/pstamp/doc/psnotes.txt

    r20218 r20257  
    66This note describes the installation and operation of the IPP Postage Stamp Server.
    77We assume that IPP source for examination and that the user has the standard
    8 ipp configuration environment set up.
    9 
    10 This component of the IPP system is not intended for general distribution to ipp users
     8IPP configuration environment set up.
     9
     10This component of the IPP system is not intended for general distribution to IPP users
    1111and does not have streamlined installation procedures at this time.
    1212
     
    9191
    9292
    93 The ipp includes a number of tools for accessing a data store. An introduction to these tools may
     93The IPP includes a number of tools for accessing a data store. An introduction to these tools may
    9494be seen by using the program perldoc.
    9595
     
    109109
    110110The files for the Data Store Server located in the IPP source tree in the directory
    111 DataStoreServer (this directory may not be available in the distributed ipp
     111DataStoreServer (this directory may not be available in the distributed IPP
    112112tarballs).
    113113
     
    115115-----------------------------
    116116
    117 To set up the database go to the DataStoreServer/scripts and start up mysql.
    118 
    119 mysql> create database mydatabase;
    120 mysql> use mydatabase;
    121 mysql> source scripts/tabledefs.sql;
    122 
    123 Note: if you already have a current IPP database that you would like to use
    124 for the Postage Stamp Request tables, when skip you can skip the create step
    125 and use that database.
    126 
     117The tables for the PSS are part of the regular IPP database tables.
     118
     119The Data Store implementation has been designed to not require the IPP for its
     120operation so the Data Store's tables are not created as part of the IPP database setup.
     121
     122Currently however, the PostageStamp Server implementation assumes that the data
     123store and postage stamp tables are in the same mysql database (this will be
     124fixed soon).
     125
     126To set up the database go to the directory DataStoreServer/scripts and start up mysql.
     127
     128If you do not already have a current IPP database that you would like to use
     129for the Postage Stamp Request tables issue the following commands
     130
     131    mysql> create database mydatabase;
     132    mysql> use mydatabase;
     133    mysql> source scripts/tabledefs.sql;
     134
     135Now exit mysql and run the command
     136    pxadmin -create -dbname mydatabase
     137
     138If you already have a database set up, then just issue the commands
     139    mysql> use mydatabase;
     140    mysql> source scripts/tabledefs.sql;
    127141
    128142Web Server Configuration
     
    170184        ScriptAlias /ds-cgi /DATASTOREDIR/ds-cgi/
    171185
     186(another sample of this configuration file may be found in
     187    DataStoreServer/web/conf/httpd-datastore.conf
     188
    172189Here we have assumed that the data store cgi scripts will be installed in
    173190/DATASTOREDIR/ds-cgi and the data store data files will be stored in
     
    282299    state       enabled
    283300    dbname      ps_simtest
    284     dvodb       currently not used
     301    dvodb       NULL      (currently not used)
    285302    camera      SIMTEST
    286303    telescope   SimScope
    287304    need_magic  0
    288305
    289 The column dbname containes the name of the database that is used to look up images. To
    290 create a project use pstamptool. In this case the ps_simtest is a database
     306The column dbname contains the name of the database that is used to look up images.
     307To create a project use pstamptool. In this example ps_simtest is a database
    291308refererencing images made by a simtest run.
    292309
     
    298315
    299316Postage Stamp requests are submitted in the form of a FITS binary table. The
    300 format of this table is described in a document which can be found by going
    301 to the page
    302 
    303     PostageStampServer
    304 
    305 on the IPP wiki.
    306 
    307 
    308 The tables for the PSS are part of the regular IPP database
    309 tables. The Data Store implementation has been designed to not require the IPP for it's
    310 operation.
    311 So the Data Store's tables are not created as part of the ipp database setup.
    312 
    313 However, the current PostageStamp Server implementation assumes that the data
    314 store and postage stamp tables are in the same mysql database (this will be
    315 fixes soon).
    316 
    317 As will be explained below, the request database does not necessarily have to be the
    318 same as the image database.
     317format of this table is described in a document which may be found on the IPP wiki.
     318http://kiawe.ifa.hawaii.edu/IPPwiki/index.php/PostageStampServer
     319
     320Only the first table extension found in the request file is processed.
     321
     322Each postage stamp request file submitted to the PSS generates a "Request".
     323The name of the request is given by the value for the keyword REQ_NAME in
     324the extension's fits header. Each postage stamp request must have a unique REQ_NAME must be unique.
     325
     326To process the request the PSS parses the request file.
     327Each row in a request table contains a request specification. Each request specification
     328causes zero or more "Jobs" to be queued for processing. Each Job operates on
     329one input image.
     330
     331When all of the Jobs for a given Request complete, a Postage stamp results
     332file is created and it along with the images produced by the jobs are
     333registered in a fileset on the output Data Store.
     334
     335There are two job types specified by the value for the JOB_TYPE keyword in the
     336request specification.
     337
     338    JOB_TYPE = "stamp" creates a "postage stamp" image.
     339    JOB_TYPE = "get_image" builds a fileset containing copies of images
     340
     341There are two programs that may be used to create a postage stamp request.
     342pstamprequest creates a request file with a single request specification.
     343
     344For example
     345
     346    pstamprequest -req_name REQ_00001 -project simtest req.fits \
     347                  -byexp chip simtest.004.000 null \
     348                  -pixcenter 500 500 -pixrange 100 100
     349
     350creates a request file req.fits containing a request specification for a 100 x 100 pixel
     351postage stamp image centered at (500,500) in the source.
     352The source image is chip processed image for one of the object exposures from a simtest run.
     353
     354Another program that may be used to create a request file is located in
     355pstamp/test/pstamp_req_create.
     356
     357This program a text file and creates a multi-row postage stamp request.
     358
     359
    319360
    320361XXXXXXXXXXXXXXXXXXXXXX The following sections are to be completed
     
    322363--------------------
    323364pantasks tasks
    324 Database
     365
    325366DataStore for input and output
    326367Web interface (limited functionality prototype only)
    327368
    328369
    329 Request files
    330 Link to Spec
    331 
    332 
    333370
    334371Examples
  • trunk/pstamp/scripts/pstamp_finish.pl

    r20256 r20257  
    110110    my ($rlf, $reglist_name) = tempfile ("$out_dir/reglist.XXXX", UNLINK => !$save_temps);
    111111    print $rlf "results.fits|||table|\n";
     112
     113    # XXX: this file is in the request's workdir not the out_dir
    112114    my $err_file = "$out_dir/parse_error.txt";
    113115    if (-e $err_file ) {
     
    138140            # including those that produced no jobs.
    139141            # for now add an entry for rownum 1 and a phony error code.
    140             # we've included parse_results.txt to the fileset if it exists
     142            # we've included parse_error.txt to the fileset if it exists
    141143            #
    142144            my $rownum = 0;
  • trunk/pstamp/scripts/pstamp_results_file.pl

    r18986 r20257  
    9191
    9292        # output parameters
    93 #        { name => 'STAMP_NAME', type => '16A', writetype => TSTRING }, 
    9493        { name => 'OPTION_MASK',type => 'J', writetype   => TULONG },     
    9594
  • trunk/pstamp/test/pstamp_req_create

    r18740 r20257  
    4949        { name => 'JOB_TYPE',   type => '16A', writetype => TSTRING },
    5050
    51         { name => 'STAMP_NAME', type => '16A', writetype => TSTRING },
    5251        { name => 'OPTION_MASK',type => 'J',   writetype => TULONG },
    5352
  • trunk/pstamp/test/sample_pstamp.txt

    r18740 r20257  
    1515# subsequent lines define the rows in the table
    1616
    17 # ROWNUM PROJECT       JOB_TYPE STAMP_NAME OPTION_MASK REQ_TYPE IMG_TYPE ID     CLASS_ID COORD_MASK CENTER_X CENTER_Y WIDTH HEIGHT REQFILT MJD_MIN MJD_MAX
    18 1        megacam-mops   stamp    null      1           byid     chip      419       null        3   1500    1500     100    100     null   0    0
    19 2        megacam-mops   stamp    null      1           byid     chip      419       null        3   1600    1500     100    100     null   0    0
    20 3        megacam-mops   stamp    null      1           byid     chip      419       null        3   1700    1500     100    100     null   0    0
     17# ROWNUM PROJECT       JOB_TYPE OPTION_MASK REQ_TYPE IMG_TYPE    ID  CLASS_ID COORD_MASK CENTER_X CENTER_Y WIDTH HEIGHT REQFILT MJD_MIN MJD_MAX
     181        megacam-mops   stamp    1           byid     chip      419       null        3   1500    1500     100    100     null   0    0
     192        megacam-mops   stamp    1           byid     chip      419       null        3   1600    1500     100    100     null   0    0
     203        megacam-mops   stamp    1           byid     chip      419       null        3   1700    1500     100    100     null   0    0
    2121
    2222# the following row will create several jobs
Note: See TracChangeset for help on using the changeset viewer.