IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 30638


Ignore:
Timestamp:
Feb 14, 2011, 4:17:01 PM (15 years ago)
Author:
watersc1
Message:

updated with rawExp.state for tracking burntool/registration

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/examine_burntool_pcontrol.pl

    r28886 r30638  
    145145    # Get the data.  The limit is there to keep the database happy.  I don't think you can observe that many
    146146    # images on a single night.
    147     $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";
     147    $sth = "SELECT exp_id,rawImfile.exp_name,rawImfile.obs_mode,rawImfile.dateobs,class_id,burntool_state,rawImfile.comment,rawExp.state FROM rawImfile JOIN rawExp USING(exp_id) WHERE rawImfile.dateobs >= '${dmin}' AND rawImfile.dateobs <= '${dmax}' order by rawImfile.dateobs limit 600000";
    148148
    149149    $data_ref = $db->selectall_arrayref( $sth );
     
    168168    }
    169169    print "#                                                     0       1       2       3       4       5       6       7       \n";
    170     print "#exp_i exp_name       obs_mode dateobs             nB 0123456701234567012345670123456701234567012345670123456701234567 comment\n";
     170    print "#exp_i exp_name       obs_mode dateobs             nB 0123456701234567012345670123456701234567012345670123456701234567 rawExp.state    comment\n";
    171171   
    172172    # If the database returns no entries (because we have a mistake in pcontrol.pro perhaps), return a null entry.
     
    180180   
    181181    foreach $row_ref (@{ $data_ref }) {
    182         ($exp_id,$exp_name, $obs_mode,$dateobs,$class_id,$burntool_state,$comment) = @{ $row_ref };
     182        ($exp_id,$exp_name, $obs_mode,$dateobs,$class_id,$burntool_state,$comment,$exp_state) = @{ $row_ref };
    183183
    184184        # Correct for nulls in the database.
     
    202202           
    203203            if ($cur_exp_id != -99) {
    204                 printf("%6d %11s %11s %19s %2d %64s %s\n",
    205                        $cur_exp_id,$cur_exp_name,$cur_obs_mode,$cur_dateobs,$burncount, $V,$cur_comment);
     204                printf("%6d %11s %11s %19s %2d %64s %15s %s\n",
     205                       $cur_exp_id,$cur_exp_name,$cur_obs_mode,$cur_dateobs,$burncount, $V,$cur_exp_state,$cur_comment);
    206206
    207207                if (($burncount != 60)&&(exists($opt{A}))) {
     
    228228            }
    229229            ($cur_exp_id,$cur_exp_name,$cur_obs_mode,$cur_dateobs,$cur_comment) = ($exp_id,$exp_name,$obs_mode,$dateobs,$comment);
     230            $cur_exp_state = $exp_state;
    230231            class_to_vector($class_id,$burntool_state);
    231232        }
    232233    }
    233234    # Final entry needs a manual print to clear it out. Let's tack on a footer as well.
    234     printf("%6d %11s %11s %19s %2d %64s %s\n",
    235            $cur_exp_id,$cur_exp_name,$cur_obs_mode,$cur_dateobs,$burncount, $V,$cur_comment);
     235    printf("%6d %11s %11s %19s %2d %64s %15s %s\n",
     236           $cur_exp_id,$cur_exp_name,$cur_obs_mode,$cur_dateobs,$burncount, $V,$cur_exp_state,$cur_comment);
    236237    print "#                                                     0       1       2       3       4       5       6       7       \n";
    237     print "#exp_i exp_name       obs_mode dateobs             nB 0123456701234567012345670123456701234567012345670123456701234567 comment\n";
     238    print "#exp_i exp_name       obs_mode dateobs             nB 0123456701234567012345670123456701234567012345670123456701234567 rawExp.state    comment\n";
    238239    print"\n";
    239240
Note: See TracChangeset for help on using the changeset viewer.