Changeset 27898
- Timestamp:
- May 10, 2010, 10:51:26 AM (16 years ago)
- File:
-
- 1 edited
-
trunk/pstamp/scripts/pstamp_job_run.pl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pstamp/scripts/pstamp_job_run.pl
r27874 r27898 84 84 my $jobStatus; 85 85 if ($jobType eq "stamp") { 86 my $argslist = "$outputBase.args"; 87 open ARGSLIST, "<$argslist" or my_die("failed to open argslist file $argslist", $job_id, $PS_EXIT_UNKNOWN_ERROR); 88 my $argString = <ARGSLIST>; 89 close ARGSLIST; 90 chomp $argString; 86 my $params = read_params_file($outputBase); 87 88 my $argString; 89 $argString = $params->{job_args}; 90 91 $argString .= " -file $params->{image}"; 92 if ($options & $PSTAMP_SELECT_MASK) { 93 $argString .= " -mask $params->{mask}"; 94 } 95 if ($options & $PSTAMP_SELECT_VARIANCE) { 96 $argString .= " -variance $params->{weight}"; 97 } 91 98 92 99 # XXX: should we do any other sanity checking? 93 my_die("arg list file $argslist is empty", $job_id, $PS_EXIT_DATA_ERROR) if !$argString;100 my_die("argument list is empty", $job_id, $PS_EXIT_DATA_ERROR) if !$argString; 94 101 95 102 my $command = "$ppstamp $outputBase $argString"; … … 120 127 my %extensions = ( $PSTAMP_SELECT_IMAGE => "fits", 121 128 $PSTAMP_SELECT_MASK => "mk.fits", 122 $PSTAMP_SELECT_ WEIGHT=> "wt.fits");123 124 my $output_mask = $options & ($PSTAMP_SELECT_IMAGE | $PSTAMP_SELECT_MASK | $PSTAMP_SELECT_ WEIGHT);129 $PSTAMP_SELECT_VARIANCE => "wt.fits"); 130 131 my $output_mask = $options & ($PSTAMP_SELECT_IMAGE | $PSTAMP_SELECT_MASK | $PSTAMP_SELECT_VARIANCE); 125 132 126 133 foreach my $key (keys (%extensions)) { … … 140 147 } 141 148 142 get_other_outputs($F, $outputBase, $options );149 get_other_outputs($F, $outputBase, $options, $params); 143 150 144 151 close $F; … … 238 245 my $output_base = shift; 239 246 my $options = shift; 247 my $params = shift; 240 248 241 249 if ($options & ( $PSTAMP_SELECT_CMF | $PSTAMP_SELECT_PSF | $PSTAMP_SELECT_BACKMDL)) { 242 my $comp = read_params_file($output_base); 243 244 my $stage = $comp->{stage}; 250 if (!$params) { 251 $params = read_params_file($output_base); 252 } 253 254 my $stage = $params->{stage}; 245 255 246 256 # raw files don't have any other data products … … 251 261 # detected in pstampparse so that the user can be notified with 252 262 # a message in parse_error.txt ("warp do not have a background model") 253 my $cmf_file = $ comp->{cmf} if ($options & $PSTAMP_SELECT_CMF);254 my $psf_file = $ comp->{psf} if ($options & $PSTAMP_SELECT_PSF);255 my $backmdl_file = $ comp->{backmdl} if ($options & $PSTAMP_SELECT_BACKMDL);256 my $pattern_file = $ comp->{pattern} if ($options & $PSTAMP_SELECT_BACKMDL);263 my $cmf_file = $params->{cmf} if ($options & $PSTAMP_SELECT_CMF); 264 my $psf_file = $params->{psf} if ($options & $PSTAMP_SELECT_PSF); 265 my $backmdl_file = $params->{backmdl} if ($options & $PSTAMP_SELECT_BACKMDL); 266 my $pattern_file = $params->{pattern} if ($options & $PSTAMP_SELECT_BACKMDL); 257 267 258 268 my $outdir = dirname($output_base);
Note:
See TracChangeset
for help on using the changeset viewer.
