NAME

update_acq_stats_db.pl - Update the SYBASE acq_stats_data and acq_stats_warnings database tables with newly observed acquisition stars


SYNOPSIS

update_acq_stats_db.pl [-help]


OPTIONS

-help
print this usage and exit.

-dryrun
Run the code, but do not write to the database. Results are output to STDOUT;

-boxdist
Override default behavior and define d_yang for a slot as yang_obs - yang (and the same for zang). Default behavior calculates a mean offset first and defines d_yang and d_zang relative to the mean offset. Forces -dryrun

-textable
Print output as a table for use in tex or latex. Forces -dryrun

-html
Print output as html table Forces -dryrun

-verbose
For use when a print to STDOUT is desired along with the actual database update.


DESCRIPTION

This code finds newly archived observations and extracts PCAD data from the archive to determine statistics for the acquisition stars in the catalog. The observed magnitude and position, as well as the OBC identification status are archived with expected values in the SYBASE table, acq_stats_data. Starcheck warning statistics for each star are archived in the acq_stats_warnings table.


EXAMPLES

This code is typically run in a nightly cron job with no input parameters.

update_acq_stats.pl does have the capability to be rerun on an obsid that needs reprocessing, due to accidental deletion or a parameter change.

For example: `update_acq_stats.pl 4977` will re-run the processing on obsid 4977, overwriting the previous database entry for 4977 if it is already in the acq_stats_data table.


DATABASE TABLES

acq_stats_data

 name                                               type       length
 -------------------------------------------------- ---------- -----------
 obsid                                              int                  4
 obi                                                int                  4
 tstart                                             floatn               8
 tstop                                              floatn               8
 slot                                               int                  4
 type                                               varchar              3
 agasc_id                                           int                  4
 obc_id                                             varchar              6
 yang                                               floatn               8
 zang                                               floatn               8
 mag                                                floatn               8
 mag_obs                                            floatn               8
 yang_obs                                           floatn               8
 zang_obs                                           floatn               8
 d_mag                                              floatn               8
 d_yang                                             floatn               8
 d_zang                                             floatn               8
 ap_date                                            datetimn             8
 newobs_cvs_rev                                     varchar             10

acq_stats_warnings

 name                                               type       length
 -------------------------------------------------- ---------- -----------
 obsid                                              int                  4
 obi                                                int                  4
 slot                                               int                  4
 details                                            varchar            100


AUTHORS

Brett Unks, <brett@localdomain>

Jean Connelly, <jeanconn@localdomain>


COPYRIGHT AND LICENSE

Copyright (C) 2005 by Smithsonian Astrophysical Observatory

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.0 or, at your option, any later version of Perl 5 you may have available.