IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 25562


Ignore:
Timestamp:
Sep 24, 2009, 3:22:13 PM (17 years ago)
Author:
watersc1
Message:

Add -P option to make_ to allow obs_mode = 'Unknown' exposures to be included for PR image purposes.

Increase the limit of exposures examine_ believes you can take in one night from 1000 to 10000. Thanks, 2008-12-02.

Location:
trunk/tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/examine_burntool_pcontrol.pl

    r25472 r25562  
    55use Getopt::Std;
    66
    7 getopts('hfcP',\%opt);
     7getopts('hfcPv:',\%opt);
    88if (exists($opt{h})) {
    99    print STDERR "Usage: examine_burntool_pcontrol.pl [-f] <pcontrol.pro>\n";
    1010    print STDERR "         -f          Read all burntool entries, even those commented out.\n";
    1111    print STDERR "         -c          Print out the needed mysql statement to do a convert. DOES NOT EXECUTE THIS!\n";
     12    print STDERR "         -v <val>    Use this value as the target burntool_state in convert statements.\n";
    1213    print STDERR "         -P          Print out the ipp_apply_burntool.pl commands, even if fully updated.\n";
    1314    print STDERR "\n";
     
    124125    # Get the data.  The limit is there to keep the database happy.  I don't think you can observe that many
    125126    # images on a single night.
    126     $sth = "SELECT exp_id,exp_name,obs_mode,dateobs,class_id,burntool_state,comment FROM rawImfile WHERE dateobs >= '${dmin}' AND dateobs <= '${dmax}' order by dateobs limit 60000";
    127 
    128     $no_sth = "UPDATE rawImfile SET burntool_state = $convert_bt_state WHERE dateobs >= '${dmin}' AND dateobs <= '${dmax}' AND user_1 = 1.0;";
     127    $sth = "SELECT exp_id,exp_name,obs_mode,dateobs,class_id,burntool_state,comment FROM rawImfile WHERE dateobs >= '${dmin}' AND dateobs <= '${dmax}' order by dateobs limit 600000";
     128
    129129    $data_ref = $db->selectall_arrayref( $sth );
    130130
     
    140140    print "#### $sth\n";
    141141    if (exists($opt{c})) {
     142        if (exists($opt{v})) {
     143            $no_sth = "UPDATE rawImfile SET burntool_state = $opt{v} WHERE dateobs >= '${dmin}' AND dateobs <= '${dmax}';";
     144        }
     145        else {
     146            $no_sth = "UPDATE rawImfile SET burntool_state = $convert_bt_state WHERE dateobs >= '${dmin}' AND dateobs <= '${dmax}';";
     147        }
    142148        print "#### $no_sth\n";
    143149    }
  • trunk/tools/make_burntool_pcontrol.pl

    r25444 r25562  
    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 = ();
Note: See TracChangeset for help on using the changeset viewer.