Changeset 16809 for trunk/ippScripts/scripts/flatcorr_proc.pl
- Timestamp:
- Mar 4, 2008, 12:33:09 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/flatcorr_proc.pl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/flatcorr_proc.pl
r16563 r16809 93 93 my ($DECs, $DECe) = split (",", $coords[1]); 94 94 95 # Run relphot (filter) for each filter95 # Run relphot (filter) for the specified region (need to clarify the options like imfreeze) 96 96 { 97 97 my $command = "$relphot $filter"; … … 106 106 unless ($success) { 107 107 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 108 &my_die ("Unable to perform addstar -resorton region $region: $error_code", $dvo_id, $region, "RELPHOT", $status, $dbname);108 &my_die ("Unable to perform relphot -grid on region $region: $error_code", $dvo_id, $region, "RELPHOT", $status, $dbname); 109 109 } 110 110 } 111 111 112 112 # use one of the input raw images as a reference image 113 # XXX I'm not sure how this works: do I run this once per imfile for a given exp? 113 114 my ($reffile) 114 115 { … … 120 121 unless ($success) { 121 122 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 122 &my_die ("Unable to perform addstar -resort on region $region: $error_code", $dvo_id, $region, "RELPHOT", $status, $dbname); 123 } 124 125 # parse the output metadata to get the refernece image filename 126 $reffile = "foobar"; 123 &my_die ("Unable to perform flatcorr -flatcorrimfile: $error_code", $dvo_id, $region, "RELPHOT", $status, $dbname); 124 } 125 126 my $metadata = $mdcParser->parse(join "", @$stdout_buf) or 127 &my_die("Unable to parse metadata config doc", $dvo_id, $region, "RELPHOT", $status, $dbname, $PS_EXIT_PROG_ERROR);); 128 129 my $imfiles = parse_md_list($metadata) or 130 &my_die("Unable to parse metadata list", $dvo_id, $region, "RELPHOT", $status, $dbname, $PS_EXIT_PROG_ERROR);); 131 132 my $imfile = $imfiles->[0]; 133 $reffile = $imfile->{uri}; 127 134 } 128 135 129 136 { 130 137 my $command = "$dvoMakeCorr -file $outgrid -ref $reffile $outcorr"; 131 $command .= "-D CATDIR $dvodb"; 132 $command .= "-region $RAs $RAe $DECs $DECe"; 133 134 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 135 cache_run(command => $command, verbose => 1); 136 137 unless ($success) { 138 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 139 &my_die ("Unable to perform addstar -resort on region $region: $error_code", $dvo_id, $region, "RELASTRO.OBJECTS", $status, $dbname); 138 139 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 140 cache_run(command => $command, verbose => 1); 141 142 unless ($success) { 143 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 144 &my_die ("Unable to perform dvoMakeCorr: $error_code", $dvo_id, $region, "RELASTRO.OBJECTS", $status, $dbname); 140 145 } 141 146 }
Note:
See TracChangeset
for help on using the changeset viewer.
