IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 27, 2009, 11:34:07 AM (17 years ago)
Author:
eugene
Message:

merge changes from trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/20090715/tools/make_burntool_pcontrol.pl

    r25398 r25624  
    88use constant DB_SOCKET => '/var/run/mysqld/mysqld.sock';
    99
    10 getopts('hbQ:d:',\%opt);
     10getopts('hbPQ:d:',\%opt);
    1111if (exists($opt{h})) {
    1212    print STDERR "Usage: make_burntool_pcontrol.pl -b {-Q <SQL_WHERE> | -d <DATE> | DATE_MIN0 DATE_MAX0 DATE_MIN1 DATE_MAX1 [...]}\n";
     
    1616    print STDERR "         -d DATE           Specify a single day to look for.\n";
    1717    print STDERR "         -b                Only print burntool lines.\n";
     18    print STDERR "         -P                PR images have bad obs_mode values. Work around that.\n";
    1819    print STDERR "\n";
    1920    print STDERR "         Scans the GPC1 database, and identifies \"science\" observations based on the obs_mode.\n";
     
    3738%science = ('MD' => 1, '3PI' => 1, 'STS' => 1, 'CAL' => 1, 'M31' => 1, 'SS' => 1,
    3839            'ENGINEERING' => 0, 'NULL' => 0, 'Unknown' => 0, ' ' => 0);
    39 
     40if (exists($opt{P})) {
     41    $science{Unknown} = 1;
     42}
    4043# Zero the arrays.
    4144@dates_min = ();
     
    135138            $science{$obs_mode} = 0;
    136139        }
    137 
    138         if (($science{$obs_mode} == 1)&&($comment !~ /Daytime/)) {
     140#%science = ('MD' => 1, '3PI' => 1, 'STS' => 1, 'CAL' => 1, 'M31' => 1, 'SS' => 1,
     141#           'ENGINEERING' => 0, 'NULL' => 0, 'Unknown' => 0, ' ' => 0);
     142# I don't like this bit, but we need to work around the bad values of obs_mode that periodically crop up.
     143# This isn't the most robust solution (which would of course be "having trustworthy obs_mode values"), but
     144# it'll probably work for now.
     145        if ((($science{$obs_mode} == 1)&&($comment !~ /Daytime/))||
     146            (($science{$obs_mode} == 0)&&(
     147                                          ($comment =~ /MD/)||($comment =~ /ThreePi/)||
     148                                          ($comment =~ /STS/)||($comment =~ /M31/)||
     149                                          ($comment =~ /CAL/)||($comment =~ /SS/))))                                     
     150        {
    139151            if ($start_s[-1] == 0) {
    140152                $start_s[-1] = $et - 1800;
Note: See TracChangeset for help on using the changeset viewer.