| | 1 | |
| | 2 | == Creating Postage Stamp Request Files == |
| | 3 | |
| | 4 | Postage Stamp request files are FITS tables. |
| | 5 | |
| | 6 | We expect that various science servers and other users will have their own programs for |
| | 7 | building request files. |
| | 8 | |
| | 9 | To help with testing the postage stamp server we have written a simple script called |
| | 10 | pstamp_req_create. It may be found in the IPP source tree in the directory |
| | 11 | pstamp/test. |
| | 12 | |
| | 13 | This script has no IPP dependencies but does use the perl module Astro::FITS::CFITSIO. |
| | 14 | |
| | 15 | The input to this program is a text file. For example |
| | 16 | |
| | 17 | |
| | 18 | {{{ |
| | 19 | # Sample Postage stamp request description file |
| | 20 | |
| | 21 | # pstamp/test/asteroid.txt |
| | 22 | |
| | 23 | # This can be parsed by the program pstamp_req_create to build a |
| | 24 | # PS1_PSTAMP_REQUEST binary table |
| | 25 | |
| | 26 | # First line of data is for the extension header |
| | 27 | # The order of keywords follows TABLE 6 of ICD |
| | 28 | # |
| | 29 | # Note that value for REQ_NAME may be overriden by a command line |
| | 30 | # argument to pstamp_req_create. |
| | 31 | # Blank and comment lines are ignored |
| | 32 | |
| | 33 | # REQ_NAME EXTVER |
| | 34 | CHANGEME 1 |
| | 35 | |
| | 36 | # subsequent lines define the rows in the table |
| | 37 | # |
| | 38 | |
| | 39 | # These coordinates get stamps from warp and diff images that show a moving object that mops found. |
| | 40 | |
| | 41 | # ROWNUM PROJECT JOB_TYPE OPTION_MASK REQ_TYPE IMG_TYPE ID TESS_ID COMPONENT COORD_MASK CENTER_X CENTER_Y WIDTH HEIGHT REQFILT MJD_MIN MJD_MAX |
| | 42 | |
| | 43 | 1 gpc1 stamp 3 bydiff warp 362483 NULL NULL 2 284.688522833822 -3.86916140936841 200 200 null 0 0 |
| | 44 | 2 gpc1 stamp 3 bydiff diff 362483 NULL NULL 2 284.688522833822 -3.86916140936841 200 200 null 0 0 |
| | 45 | 3 gpc1 stamp 1027 bydiff warp 362483 NULL NULL 2 284.688522833822 -3.86916140936841 200 200 null 0 0 |
| | 46 | 4 gpc1 stamp 1027 bydiff diff 362483 NULL NULL 2 284.688522833822 -3.86916140936841 200 200 null 0 0 |
| | 47 | }}} |
| | 48 | |
| | 49 | To create a request file is simple |
| | 50 | |
| | 51 | |
| | 52 | {{{ |
| | 53 | pstamp_req_create --input asteroid.txt --req_name bills.20090910_1 --output myrequest.fits |
| | 54 | }}} |
| | 55 | |
| | 56 | If the -req_name parameter is omitted, the REQ_NAME given in the input file will be used. |
| | 57 | |
| | 58 | This file uses the 'bydiff' mode which selects the images of interest based on a diff_skyfile_id. The next file shows |
| | 59 | some other modes. |
| | 60 | |
| | 61 | |
| | 62 | {{{ |
| | 63 | # REQ_NAME EXTVER |
| | 64 | CHANGEME 1 |
| | 65 | |
| | 66 | # subsequent lines define the rows in the table |
| | 67 | |
| | 68 | # ROWNUM PROJECT JOB_TYPE OPTION_MASK REQ_TYPE IMG_TYPE ID TESS_ID COMPONENT COORD_MASK CENTER_X CENTER_Y WIDTH HEIGHT REQFILT MJD_MIN MJD_MAX |
| | 69 | # warps from various epochs for one of the SN candidates. Specifiying the skycell speeds up processing |
| | 70 | 1 gpc1 stamp 1 byid warp 6245 null skycell.077 2 242.400666 55.273513 200 200 null 0 0 |
| | 71 | 2 gpc1 stamp 1 byid warp 6254 null skycell.077 2 242.400666 55.273513 200 200 null 0 0 |
| | 72 | 3 gpc1 stamp 1 byid warp 6264 null skycell.077 2 242.400666 55.273513 200 200 null 0 0 |
| | 73 | 4 gpc1 stamp 1 byid warp 6317 null skycell.077 2 242.400666 55.273513 200 200 null 0 0 |
| | 74 | 5 gpc1 stamp 1 byid warp 6324 null skycell.077 2 242.400666 55.273513 200 200 null 0 0 |
| | 75 | 6 gpc1 stamp 1 byid warp 6465 null skycell.077 2 242.400666 55.273513 200 200 null 0 0 |
| | 76 | 7 gpc1 stamp 1 byid warp 6466 null skycell.077 2 242.400666 55.273513 200 200 null 0 0 |
| | 77 | |
| | 78 | |
| | 79 | # get a specific warp |
| | 80 | 10 gpc1 stamp 1 byid warp 6316 null skycell.077 2 242.400666 55.273513 200 200 null 0 0 |
| | 81 | |
| | 82 | # get stamps from all warps for exposure (only destreaked ones will succeed) |
| | 83 | 11 gpc1 stamp 1 byexp warp o4973g0123o null skycell.077 2 242.400666 55.273513 200 200 null 0 0 |
| | 84 | |
| | 85 | # get stamps from all chipRuns for exposure (only destreaked ones will succeed) |
| | 86 | # add the mask and weight images as well |
| | 87 | 12 gpc1 stamp 7 byexp chip o4973g0123o null null 2 242.400666 55.273513 200 200 null 0 0 |
| | 88 | |
| | 89 | # get the corresponding diff |
| | 90 | 13 gpc1 stamp 1 byexp diff o4973g0123o null null 2 242.400666 55.273513 200 200 null 0 0 |
| | 91 | |
| | 92 | }}} |
| | 93 | |
| | 94 | Most of these request specifications only request the image (OPTION_MASK = 1). |
| | 95 | An exception is row 12 which has OPTION_MASK = 7. This will request the mask and variance images as well. |
| | 96 | Soon more bits of this this column will be used to select other output products (psf files for example). |
| | 97 | |
| | 98 | If a column with string is not required for a given request specfication, it may be given the value 'null' |
| | 99 | |