Changeset 17803 for trunk/ippScripts/scripts/register_imfile.pl
- Timestamp:
- May 23, 2008, 5:10:21 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/register_imfile.pl (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/register_imfile.pl
r17671 r17803 52 52 53 53 # values to extract from output metadata and the stats to calculate 54 my $STATS = 55 [ 54 my $STATS = 55 [ 56 56 # PPSTATS KEYWORD STATISTIC CHIPTOOL FLAG 57 57 { name => "FILE.LEVEL", type => "constant", flag => "-filelevel", dtype => "string" }, # File level … … 69 69 { name => "FPA.TIME", type => "constant", flag => "-dateobs", dtype => "string" }, # Date of observation (UTC) 70 70 { name => "FPA.TELESCOPE", type => "constant", flag => "-telescope", dtype => "string" }, # Telescope 71 { name => "FPA.INSTRUMENT", type => "constant", flag => "-inst", dtype => "string" }, # Instrument 71 { name => "FPA.INSTRUMENT", type => "constant", flag => "-inst", dtype => "string" }, # Instrument 72 72 { name => "FPA.M1X", type => "constant", flag => "-m1_x", dtype => "float" }, # M1X 73 73 { name => "FPA.M1Y", type => "constant", flag => "-m1_y", dtype => "float" }, # M1Y … … 85 85 { name => "FPA.ENV.DIR", type => "constant", flag => "-env_wind_dir", dtype => "float" }, # external wind direction 86 86 87 { name => "FPA.TELTEMP.M1", type => "constant", flag => "-teltemp_m1", dtype => "float" }, # Primary mirror temps (C) 88 { name => "FPA.TELTEMP.M1CELL", type => "constant", flag => "-teltemp_m1cell", dtype => "float" }, # Primary mirror support temps (C) 89 { name => "FPA.TELTEMP.M2", type => "constant", flag => "-teltemp_m2", dtype => "float" }, # Secondary mirror temps (C 90 { name => "FPA.TELTEMP.SPIDER", type => "constant", flag => "-teltemp_spider", dtype => "float" }, # Spider temperatures (C) 91 { name => "FPA.TELTEMP.TRUSS", type => "constant", flag => "-teltemp_truss", dtype => "float" }, # Mid truss temperatures (C 92 { name => "FPA.TELTEMP.EXTRA", type => "constant", flag => "-teltemp_extra", dtype => "float" }, # Miscellaneous temperatures (C) 87 { name => "FPA.TELTEMP.M1", type => "constant", flag => "-teltemp_m1", dtype => "float" }, # Primary mirror temps (C) 88 { name => "FPA.TELTEMP.M1CELL", type => "constant", flag => "-teltemp_m1cell", dtype => "float" }, # Primary mirror support temps (C) 89 { name => "FPA.TELTEMP.M2", type => "constant", flag => "-teltemp_m2", dtype => "float" }, # Secondary mirror temps (C 90 { name => "FPA.TELTEMP.SPIDER", type => "constant", flag => "-teltemp_spider", dtype => "float" }, # Spider temperatures (C) 91 { name => "FPA.TELTEMP.TRUSS", type => "constant", flag => "-teltemp_truss", dtype => "float" }, # Mid truss temperatures (C 92 { name => "FPA.TELTEMP.EXTRA", type => "constant", flag => "-teltemp_extra", dtype => "float" }, # Miscellaneous temperatures (C) 93 93 94 94 { name => "FPA.PON.TIME", type => "constant", flag => "-pon_time", dtype => "float" }, # time since last power on … … 109 109 or (warn "Can't find ppStats" and $missing_tools = 1); 110 110 111 if ($missing_tools) { 111 if ($missing_tools) { 112 112 warn ("Can't find required tools"); 113 exit($PS_EXIT_CONFIG_ERROR); 113 exit($PS_EXIT_CONFIG_ERROR); 114 114 } 115 115 … … 130 130 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 131 131 cache_run(command => $command, verbose => $verbose); 132 unless ($success) { 132 unless ($success) { 133 133 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 134 134 &my_die ("Unable to perform ppStats on exposure id $exp_id: $error_code", $exp_id, $tmp_exp_name, $tmp_class_id, $uri, $error_code); 135 135 } 136 136 137 137 # Parse the output 138 138 my $mdcParser = PS::IPP::Metadata::Config->new; # Parser for metadata config files … … 163 163 $command .= " -tmp_class_id $tmp_class_id"; # the original class_id supplied by the user, replace by ppStats CLASS.ID 164 164 $command .= " -uri $uri "; 165 $command .= " -hostname $host" if defined $host; 165 166 $command .= " -dbname $dbname" if defined $dbname; 166 167 $command .= $stats->cmdflags(); … … 216 217 $command .= " -exp_name $exp_name"; 217 218 $command .= " -tmp_class_id $tmp_class_id"; 218 $command .= " -uri $uri ";219 $command .= " -uri $uri "; 219 220 $command .= " -telescope UNKNOWN"; 220 221 $command .= " -inst UNKNOWN"; 221 222 $command .= " -class_id $tmp_class_id"; 222 223 $command .= " -code $exit_code"; 224 $command .= " -hostname $host" if defined $host; 223 225 $command .= " -dbname $dbname" if defined $dbname; 224 226 system ($command);
Note:
See TracChangeset
for help on using the changeset viewer.
