star_parse.pl - Update the Sybase starcheck catalog database tables
star_parse.pl [ obsid [ obsids]]
This script populates a database that stores the starcheck output for each obsid:obi. When called without any options, the script queries the mp_load_info table to get a list of all observations that have newer ``processed dates'' than the dates already within the starcheck tables. The starcheck products are then located for these observations, and StarcheckParser.pm is used to extract all useful information from starcheck.txt. This information is then added to 3 tables within the aca database. If the observation is run on an observation that already exists within the table (either reprocessed in automatic processing and hence updated in the mp_load_info table, or specified at the command line), the old information is deleted and a new entry is created.
For reference, the descriptions of each of the tables updated by this script:
name type length -------------------------------------------------- ---------- ----------- obsid int 4 obi int 4 last_ap_date datetimn 8 point_ra floatn 8 point_dec floatn 8 point_roll floatn 8 target_id varchar 30 sci_instr varchar 10 sim_z_offset_steps intn 4 sim_z_offset_mm floatn 8 grating varchar 10 dither_state varchar 4 dither_y_amp floatn 8 dither_y_period floatn 8 dither_z_amp floatn 8 dither_z_period floatn 8 mp_starcat_time varchar 25 mp_starcat_vcdu_cnt intn 4
name type length -------------------------------------------------- ---------- ----------- obsid int 4 obi int 4 instance int 4 duration_sec floatn 8 angle_deg floatn 8 slew_err_arcsec floatn 8 target_Q1 floatn 8 target_Q2 floatn 8 target_Q3 floatn 8 target_Q4 floatn 8 mp_targquat_time varchar 25 mp_targquat_vcdu_cnt intn 4
name type length -------------------------------------------------- ---------- ----------- obsid int 4 obi int 4 idx int 4 slot int 4 id varchar 30 type varchar 4 sz varchar 10 minmag floatn 8 mag floatn 8 maxmag floatn 8 yang intn 4 zang intn 4 dim intn 4 res intn 4 halfw intn 4 notes varchar 30
name type length -------------------------------------------------- ---------- ----------- obsid int 4 obi int 4 warning varchar 100 idx intn 4
This script should be run in an overnight cron job with no input parameters.
Jean Connelly, <jeanconn@localdomain>
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.