IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 35932


Ignore:
Timestamp:
Aug 13, 2013, 11:18:43 AM (13 years ago)
Author:
bills
Message:

Add two more keywords

DVOCALIB true if exposure was calibrated using dvo (relExp.state == calibrated)
UCALEXP true of expoure was calibrated and has flags & 0x200

Also accept - as output file name and in this case redirect to stdout

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pstamp/scripts/psgetcalibinfo

    r35901 r35932  
    7575    }
    7676}
     77
     78
     79my $OUT;
     80if ($output eq '-') {
     81    $OUT = *STDOUT;
     82} else {
     83    open $OUT, ">$output" or die "failed to open $output for writing\n";
     84}
     85
    7786if (!$relexp) {
    78     print "Failed to find calibration information for camRun: $cam_id\n";
     87    print STDERR "Failed to find calibration information for camRun: $cam_id\n";
     88    print $OUT "DVOCALIB     STR         F # exposure not calibrated with DVO\n";
    7989    exit 0;
    8090}
    8191
    82 open OUT, ">$output" or die "failed to open $output for writing\n";
     92my $ubercal_exp = ($relexp->{flags} & 0x200) ? "T # exposure has ubercal zero point" : "F # exposure does not have ubercal zero point";
    8393
    84 print OUT "ZPCALIB      F32         $relexp->{zpt_obs} # calibrated zero point\n";
    85 print OUT "ZPCALERR     F32         $relexp->{zpt_stdev} # calibrated zero point error - 0 for ubercal exposure\n";
    86 print OUT "MCAL         F32         $relexp->{mcal} # zero point offset due to clouds\n";
    87 print OUT "DVOFLAGS     U32         $relexp->{flags} # dvo flags - 512 is ubercal bit\n";
    88 print OUT "UCALDIST     S32         $relexp->{ubercal_dist} # distance to ubercal image\n";
    89 print OUT "DVODB        STR         $relexp->{dvodb} # dvo database used for calibration \n";
    90 print OUT "UCALFILE     STR         $relexp->{ubercal_file} # ubercal file used for calibration\n";
    91 print OUT "CALDATE      STR         $relexp->{time_stamp} # time of calibration\n";
    92 print OUT "PSREL        STR         $relexp->{release_name} # PS release name\n";
     94print $OUT "DVOCALIB     STR         T # exposure calibrated with DVO\n";
     95print $OUT "ZPCALIB      F32         $relexp->{zpt_obs} # calibrated zero point\n";
     96print $OUT "ZPCALERR     F32         $relexp->{zpt_stdev} # calibrated zero point error - 0 for ubercal exposure\n";
     97print $OUT "MCAL         F32         $relexp->{mcal} # zero point offset due to clouds\n";
     98print $OUT "UCALEXP      STR         $ubercal_exp\n";
     99print $OUT "DVOFLAGS     U32         $relexp->{flags} # dvo flags\n";
     100print $OUT "UCALDIST     S32         $relexp->{ubercal_dist} # distance to ubercal image\n";
     101print $OUT "DVODB        STR         $relexp->{dvodb} # dvo database used for calibration \n";
     102print $OUT "UCALFILE     STR         $relexp->{ubercal_file} # ubercal file used for calibration\n";
     103print $OUT "CALDATE      STR         $relexp->{time_stamp} # time of calibration\n";
     104print $OUT "PSREL        STR         $relexp->{release_name} # PS release name\n";
    93105
    94 close OUT or die "failed to close $output\n";
     106close $OUT or die "failed to close $output\n";
    95107
Note: See TracChangeset for help on using the changeset viewer.