Changeset 8327
- Timestamp:
- Aug 14, 2006, 12:52:27 PM (20 years ago)
- Location:
- trunk/ippScripts/scripts
- Files:
-
- 2 edited
-
phase0exp.pl (modified) (6 diffs)
-
phase0imfile.pl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/phase0exp.pl
r8309 r8327 10 10 use Data::Dumper; 11 11 12 use constant TYPE => " OBSTYPE";# Observation type keyword13 use constant DETRENDS => ( "bias", "dark", "flat", "fringe" ); # Observation types to mark as detrend12 use constant TYPE => "exp_type"; # Observation type keyword 13 use constant DETRENDS => [ "bias", "dark", "flat", "fringe" ]; # Observation types to mark as detrend 14 14 use constant DETREND_FLAG => "-detrend"; # Flag to use to mark detrend exposure 15 15 … … 84 84 if (not defined $values{$constant}) { 85 85 $values{$constant} = $value; 86 } elsif ($values{$constant} !=$value) {86 } elsif ($values{$constant} ne $value) { 87 87 die "Value of $constant for " . $imfile->{PHASE0_CLASSID} . 88 88 " doesn't match previous value.\n"; … … 120 120 foreach my $variable (@{VARIABLES()}) { 121 121 my $array = $values{$variable}; # Array of values 122 my $stats = Statistics::Descriptive ->new; # Statistics calculator122 my $stats = Statistics::Descriptive::Sparse->new; # Statistics calculator 123 123 $stats->add_data(@$array); 124 124 $command .= " -" . $variable . " " . $stats->mean(); … … 127 127 # Add the statistics 128 128 { 129 my $stats = Statistics::Descriptive ->new; # Statistics calculator129 my $stats = Statistics::Descriptive::Sparse->new; # Statistics calculator 130 130 $stats->add_data(@backgrounds); 131 131 $command .= " -" . PHASE0_BG() . " " . $stats->mean(); … … 133 133 } 134 134 { 135 my $stats = Statistics::Descriptive ->new; # Statistics calculator135 my $stats = Statistics::Descriptive::Sparse->new; # Statistics calculator 136 136 $stats->add_data(@stdevs); 137 137 $command .= " -" . PHASE0_BG_MEAN_STDEV() . " " . $stats->mean(); … … 146 146 } 147 147 148 print "$command\n"; 149 150 # my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 151 # run(command => $command, verbose => 1); 152 # die "Unable to run phase0 update for $expid: $error_code\n" if not $success; 148 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 149 run(command => $command, verbose => 1); 150 die "Unable to run phase0 update for $expid: $error_code\n" if not $success; 153 151 } 154 152 -
trunk/ippScripts/scripts/phase0imfile.pl
r8309 r8327 14 14 # The key is the name in the ppStats output; the value is the switch for "phase0 -updateexp" 15 15 use constant CONSTANTS => { 16 "OBSTYPE" => "-exp_type", # Exposure type 16 17 "FPA.FILTER" => "-filter", # Filter used 17 18 "FPA.AIRMASS" => "-airmass", # Airmass … … 21 22 "TELAZ" => "-az", # Azimuth 22 23 "DETTEM" => "-ccd_temp", # CCD temperature 23 "FPA.POSANGLE" => "-posang" ,# Position angle24 "FPA.POSANGLE" => "-posang" # Position angle 24 25 }; 25 26
Note:
See TracChangeset
for help on using the changeset viewer.
