Changeset 19932 for trunk/ippScripts/scripts/chip_imfile.pl
- Timestamp:
- Oct 6, 2008, 2:03:10 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/chip_imfile.pl (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/chip_imfile.pl
r19560 r19932 11 11 print "Starting script $0 on $host\n\n"; 12 12 13 use DateTime; 14 my $mjd_start = DateTime->now->mjd; # MJD of starting script 15 13 16 use vars qw( $VERSION ); 14 17 $VERSION = '0.01'; … … 28 31 $no_update, $no_op, $redirect ); 29 32 GetOptions( 30 'exp_id=s' => \$exp_id, # Exposure identifier31 'chip_id=s' => \$chip_id, # Chiptool identifier32 'class_id=s' => \$class_id, # Class identifier33 'uri|u=s' => \$uri, # Input FITS file34 'camera|c=s' => \$camera, # Camera35 'outroot|w=s' => \$outroot, # output file base name36 'dbname|d=s' => \$dbname, # Database name37 'reduction=s' => \$reduction, # Reduction class33 'exp_id=s' => \$exp_id, # Exposure identifier 34 'chip_id=s' => \$chip_id, # Chiptool identifier 35 'class_id=s' => \$class_id, # Class identifier 36 'uri|u=s' => \$uri, # Input FITS file 37 'camera|c=s' => \$camera, # Camera 38 'outroot|w=s' => \$outroot, # output file base name 39 'dbname|d=s' => \$dbname, # Database name 40 'reduction=s' => \$reduction, # Reduction class 38 41 'run-state=s' => \$run_state, # current state of the run (new, update) 39 'threads=s' => \$threads, # Number of threads to use for ppImage40 'verbose' => \$verbose, # Print to stdout41 'no-update' => \$no_update, # Don't update the database?42 'no-op' => \$no_op, # Don't do any operations?42 'threads=s' => \$threads, # Number of threads to use for ppImage 43 'verbose' => \$verbose, # Print to stdout 44 'no-update' => \$no_update, # Don't update the database? 45 'no-op' => \$no_op, # Don't do any operations? 43 46 'redirect-output' => \$redirect, 44 47 ) or pod2usage( 2 ); … … 73 76 # values to extract from output metadata and the stats to calculate 74 77 # XXX commented-out entries are not yet defined in the output files 75 # XXX EAM : we are removing the astrometry analysis from chip, so we76 # do not bother to calculate those stats.77 78 my $STATS = 78 79 [ … … 86 87 { name => "FRINGE_RESID_0", type => "rms", flag => "-fringe_1", dtype => "float" }, 87 88 { name => "FRINGE_ERR_0", type => "rms", flag => "-fringe_2", dtype => "float" }, 88 # { name => "CERROR", type => "rms", flag => "-sigma_ra", dtype => "float" },89 # { name => "CERROR", type => "rms", flag => "-sigma_dec", dtype => "float" },90 89 { name => "APMIFIT", type => "mean", flag => "-ap_resid", dtype => "float" }, 91 90 { name => "DAPMIFIT", type => "rms", flag => "-ap_resid_stdev", dtype => "float" }, 92 # { name => "ZP??", type => "mean", flag => "-zp_mean", dtype => "float" },93 # { name => "ZP??", type => "rms", flag => "-zp_stdev", dtype => "float" },94 91 { name => "FWHM_X", type => "mean", flag => "-fwhm_major", dtype => "float" }, 95 92 { name => "FWHM_Y", type => "mean", flag => "-fwhm_minor", dtype => "float" }, 96 93 { name => "DT_DET", type => "sum", flag => "-dtime_detrend", dtype => "float" }, 97 94 { name => "DT_PHOT", type => "sum", flag => "-dtime_photom", dtype => "float" }, 98 # { name => "DT_ASTR", type => "sum", flag => "-dtime_astrom",dtype => "float" },95 { name => "DT_TOTAL", type => "sum", flag => "-dtime_total", dtype => "float" }, 99 96 { name => "NSTARS", type => "sum", flag => "-n_stars", dtype => "int" }, 100 97 # { name => "?", type => "sum", flag => "-n_extended", dtype => "int" }, 101 98 # { name => "?", type => "sum", flag => "-n_cr", dtype => "int" }, 102 # { name => "NASTRO", type => "sum", flag => "-n_astrom", dtype => "int" },103 99 ]; 104 100 my $stats = PS::IPP::Metadata::Stats->new($STATS); # Stats parser … … 149 145 150 146 if ($run_state eq "new") { 151 $command = "$ppImage -file $uri $outroot";152 $command .= " -recipe PPIMAGE $recipe";153 $command .= " -threads $threads" if defined $threads;154 $command .= " -dbname $dbname" if defined $dbname;147 $command = "$ppImage -file $uri $outroot"; 148 $command .= " -recipe PPIMAGE $recipe"; 149 $command .= " -threads $threads" if defined $threads; 150 $command .= " -dbname $dbname" if defined $dbname; 155 151 $command .= " -dumpconfig $configuration"; 156 $command .= " -tracedest $traceDest -log $logDest";152 $command .= " -tracedest $traceDest -log $logDest"; 157 153 $do_stats = 1; 158 154 } else { 159 $command = "$ppImage -file $uri $outroot";160 $command .= " -ipprc $configuration";161 $command .= " -threads $threads" if defined $threads;162 $command .= " -dbname $dbname" if defined $dbname;163 $command .= " -tracedest $traceDest -log $logDest";164 $command .= " -Db PPIMAGE:PHOTOM FALSE";155 $command = "$ppImage -file $uri $outroot"; 156 $command .= " -ipprc $configuration"; 157 $command .= " -threads $threads" if defined $threads; 158 $command .= " -dbname $dbname" if defined $dbname; 159 $command .= " -tracedest $traceDest -log $logDest"; 160 $command .= " -Db PPIMAGE:PHOTOM FALSE"; 165 161 } 166 162 if ($do_stats) { 167 $command .= " -recipe PPSTATS CHIPSTATS";168 $command .= " -stats $outputStats";163 $command .= " -recipe PPSTATS CHIPSTATS"; 164 $command .= " -stats $outputStats"; 169 165 } 170 166 … … 241 237 $command .= " -dbname $dbname" if defined $dbname; 242 238 $command .= $stats->cmdflags(); 239 $command .= (" -dtime_script " . (($mjd_start - DateTime->now->mjd) * 86400)); 243 240 } else { 244 241 $command = "$chiptool -tofullimfile"; … … 279 276 $command .= " -path_base $outroot"; 280 277 $command .= " -hostname $host" if defined $host; 278 $command .= (" -dtime_script " . (($mjd_start - DateTime->now->mjd) * 86400)); 281 279 } else { 282 280 $command .= "$chiptool -updateprocessedimfile";
Note:
See TracChangeset
for help on using the changeset viewer.
