NAME


mp_parse.pl - Update the Sybase mp_load_info database


SYNOPSIS

mp_parse.pl [ obsid [ obsids]]


OPTIONS

-help
print this usage and exit

-dryrun
print retrieved information to screen, no changes to database

-missing
sets the list of to-be-parsed obsids to include any obsid that exists in the axafapstat..obidet_0_5 table but does not exist in the mp_load_info table

-log logfilename
write processing information and warnings to file logfilename


DESCRIPTION

This script populates a database that stores, for each obsid:obi, the start and stop times of the observation and the name of the mission planning directory that stores the correct load products. The database also stores information in book-keeping flags, such as a check to confirm that a starcheck.txt file exists in the mission planning directory and that starcheck.txt file contains the obsid. When called without any options, the script queries the axafapstat database to get a list of all observations that have newer ``processed dates'' than the dates already within the database. These observations are then added to the mp_load_info table. If the observation is run on an observation that already exists within the table (either reprocessed in automatic processing and hence updated in the axafapstat table, or specified at the mp_parse command line), the old information is deleted and a new entry is created. The manually_fixed flag in the database prevents this overwrite behavior on observations that have been hand-edited.


DATABASE COLUMNS

 name                                               type       length
 -------------------------------------------------- ---------- -----------
 obsid                                              int                  4
 obi                                                int                  4
 tstart                                             floatn               8
 tstop                                              floatn               8
 mp_path                                            varchar             30
 last_ap_date                                       datetimn             8
 manually_fixed                                     bit                  1
 no_starcheck                                       bit                  1
 wrong_starcheck                                    bit                  1


EXAMPLES

This script should be run in an overnight cron job with no input parameters.


AUTHOR

Jean Connelly, <jeanconn@localdomain>


COPYRIGHT AND LICENSE

Copyright 2006 by Smithsonian Astrophysical Obsevatory

This script is free software; you can redistribute it and/or modify it under the same terms as Perl itself.