Changeset 8710
- Timestamp:
- Aug 30, 2006, 1:32:59 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/phase0imfile.pl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/phase0imfile.pl
r8327 r8710 17 17 "FPA.FILTER" => "-filter", # Filter used 18 18 "FPA.AIRMASS" => "-airmass", # Airmass 19 "FPA.RA" => "-ra", # Right ascension20 "FPA.DEC" => "-decl", # Declination21 "TELALT" => "-alt", # Altitude22 "TELAZ" => "-az", # Azimuth19 "FPA.RA" => "-ra", # Right ascension 20 "FPA.DEC" => "-decl", # Declination 21 "TELALT" => "-alt", # Altitude 22 "TELAZ" => "-az", # Azimuth 23 23 "DETTEM" => "-ccd_temp", # CCD temperature 24 24 "FPA.POSANGLE" => "-posang" # Position angle … … 43 43 if (scalar @ARGV == 0 || scalar @ARGV > 3) { 44 44 die "Perform phase 0 processing at the imfile level.\n\n" . 45 "Usage: $0 EXP_ID CLASS_ID FILE.fits\n\n";45 "Usage: $0 EXP_ID CLASS_ID FILE.fits\n\n"; 46 46 } 47 47 48 my $expid = shift @ARGV; # Exposure identifier49 my $classid = shift @ARGV; # Class identifier50 my $file = shift @ARGV; # Input filename48 my $expid = shift @ARGV; # Exposure identifier 49 my $classid = shift @ARGV; # Class identifier 50 my $file = shift @ARGV; # Input filename 51 51 52 52 … … 62 62 my $command = "$ppStats $file -recipe PPSTATS " . RECIPE; # Command to run ppStats 63 63 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 64 run(command => $command, verbose => 1);64 run(command => $command, verbose => 1); 65 65 die "Unable to perform ppStats on exposure id $expid: $error_code\n" if not $success; 66 66 67 67 # Parse the output 68 my $mdcParser = PS::IPP::Metadata::Config->new; # Parser for metadata config files68 my $mdcParser = PS::IPP::Metadata::Config->new; # Parser for metadata config files 69 69 my $metadata = $mdcParser->parse(join "", @$stdout_buf); 70 70 my @constants = keys %{CONSTANTS()}; # List of constants to parse out … … 77 77 { 78 78 my $command = $p0tool . " " . P0TOOL_MODE() . " " . P0TOOL_EXPID() . " " . $expid . " " . 79 P0TOOL_CLASSID() . " " . $classid; # Command to run p0tool79 P0TOOL_CLASSID() . " " . $classid; # Command to run p0tool 80 80 81 81 foreach my $constant (keys %{CONSTANTS()}) { 82 $command .= " " . CONSTANTS->{$constant} . " " . ($stats->data($constant))->{value};82 $command .= " " . CONSTANTS->{$constant} . " " . ($stats->data($constant))->{value}; 83 83 } 84 84 foreach my $variable (keys %{VARIABLES()}) { 85 # Just use the mean value86 $command .= " " . VARIABLES->{$variable} . " " . ($stats->data($variable))->{mean};85 # Just use the mean value 86 $command .= " " . VARIABLES->{$variable} . " " . ($stats->data($variable))->{mean}; 87 87 } 88 88 … … 92 92 93 93 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 94 run(command => $command, verbose => 1);94 run(command => $command, verbose => 1); 95 95 die "Unable to perform p0tool -updateimfile: $error_code\n" if not $success; 96 96 }
Note:
See TracChangeset
for help on using the changeset viewer.
