| 146 | | With a stripe chosen, {{{loader.py}}} gathers a list of box_ids (each stripe is sub-divided into boxes). It works its way through each box, processing all pending items. |
| | 146 | With a stripe chosen, {{{loader.py}}} gathers a list of box_ids (each stripe is sub-divided into boxes). It works its way through each box, processing all pending items. Batches are processed like this: |
| | 147 | |
| | 148 | * all relevant FITS tables from a given {{{smf}}} or {{{cmf}}} or DVO database are read into temporary tables in the scratch MySQL database |
| | 149 | * empty MySQL tables for PSPS output are created, also in the 'scratch' database. These tables match the shape of the final PSPS database tables exactly. |
| | 150 | * all relevant columns from the temporary IPP tables are copied into the PSPS tables, discarding duplicates where necessary |
| | 151 | * for P2 and ST batches, the DVO database is accessed and all IDs are read for the detections we are interested in |
| | 152 | * any remaining NULL values are replaced with -999, as required by the PSPS loader |
| | 153 | * PSPS tables are exported to a FITS file |
| | 154 | * FITS file is published, complete with a batch 'manifest' file, to the datastore |
| | 155 | |
| | 156 | The reading and export of FITS tables is done using STILTS. For import, we can specify which columns we wish to import from the IPP smf and cmf files (we don't need everything). |