Changeset 13748
- Timestamp:
- Jun 10, 2007, 10:13:50 AM (19 years ago)
- Location:
- trunk/ippScripts/scripts
- Files:
-
- 11 edited
-
chip_imfile.pl (modified) (3 diffs)
-
detrend_norm_apply.pl (modified) (2 diffs)
-
detrend_process_imfile.pl (modified) (1 diff)
-
detrend_resid.pl (modified) (3 diffs)
-
detrend_stack.pl (modified) (1 diff)
-
diff_skycell.pl (modified) (1 diff)
-
ipp_serial_inject.pl (modified) (2 diffs)
-
register_exp.pl (modified) (1 diff)
-
register_imfile.pl (modified) (1 diff)
-
stack_skycell.pl (modified) (1 diff)
-
warp_skycell.pl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/chip_imfile.pl
r13698 r13748 28 28 use Pod::Usage qw( pod2usage ); 29 29 30 use constant RECIPE =>'PPIMAGE_OBDSFRA'; # Recipe to use30 my $RECIPE = 'PPIMAGE_OBDSFRA'; # Recipe to use 31 31 32 32 # Parse the command-line arguments … … 95 95 print "outputStats: $outputStats\n"; 96 96 97 my $command = "$ppImage -file $input $outputRoot -recipe PPIMAGE " . RECIPE . 98 " -stat $outputStats"; # Command to run ppImage 97 my $command = "$ppImage -file $input $outputRoot"; 98 $command .= " -recipe PPIMAGE $RECIPE"; 99 $command .= " -recipe PPSTATS CHIPSTATS"; 100 $command .= " -stats $outputStats"; # Command to run ppImage 101 99 102 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 100 103 run(command => $command, verbose => 1); … … 103 106 &my_die("Unable to perform ppImage: $error_code", $chip_id, $class_id, $error_code); 104 107 } 108 105 109 &my_die("Couldn't find expected output file: $outputImage\n", $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputImage); 106 110 &my_die("Couldn't find expected output file: $outputMask\n", $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputMask); -
trunk/ippScripts/scripts/detrend_norm_apply.pl
r13732 r13748 70 70 71 71 72 use constant RECIPE => 'PPIMAGE_N'; # Recipe to use with ppImage 72 my $RECIPE_PPIMAGE = 'PPIMAGE_N'; # Recipe to use with ppImage 73 my $RECIPE_PPSTATS = 'CHIPSTATS'; # Recipe to use with ppStats 73 74 74 75 # Look for programs we need … … 93 94 my $stats = PS::IPP::Metadata::Stats->new(); # Stats parser 94 95 unless ($no_op) { 95 my $command = "$ppImage -file $input $outputRoot -norm $value -stat $statsName -recipe PPIMAGE " . RECIPE(); # Command to run 96 my $command = "$ppImage -file $input $outputRoot"; 97 $command .= " -norm $value -stats $statsName"; 98 $command .= " -recipe PPIMAGE $RECIPE_PPIMAGE"; 99 $command .= " -recipe PPSTATS $RECIPE_PPSTATS"; 96 100 $command .= ' -isfringe' if lc($det_type) eq 'fringe'; 101 97 102 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 98 103 run(command => $command, verbose => 1); -
trunk/ippScripts/scripts/detrend_process_imfile.pl
r13732 r13748 99 99 my $stats = PS::IPP::Metadata::Stats->new(); # Stats parser 100 100 unless ($no_op) { 101 my $command = "$ppImage -file $input_uri $outputRoot -recipe PPIMAGE $recipe" . 102 " -stat $outputStats"; # Command to run ppImage 101 my $command = "$ppImage -file $input_uri $outputRoot"; 102 $command .= " -recipe PPIMAGE $recipe"; 103 $command .= " -recipe PPSTATS CHIPSTATS"; 104 $command .= " -stats $outputStats"; 105 103 106 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 104 107 run(command => $command, verbose => 1); -
trunk/ippScripts/scripts/detrend_resid.pl
r13732 r13748 125 125 my $bin2Name = $ipprc->filename("PPIMAGE.BIN2", $outputRoot, $class_id); 126 126 my $outputStats = $outputRoot . '.' . $class_id . '.stats'; 127 my $outputBinnedStats = $outputRoot . '.' . $class_id . '.bin.stats'; 128 129 # Run ppImage 127 128 # Run ppImage & ppStats 130 129 my $stats = PS::IPP::Metadata::Stats->new(); # Stats parser 131 130 my $binnedStats = PS::IPP::Metadata::Stats->new(); # Stats parser 132 131 unless ($no_op) { 133 my $command = "$ppImage -file $input_uri $outputRoot -recipe PPIMAGE $recipe" . 134 " -stat $outputStats "; # Command to run ppImage 132 my $command = "$ppImage -file $input_uri $outputRoot"; 133 $command .= " -recipe PPIMAGE $recipe"; 134 $command .= " -recipe PPSTATS RESIDUAL"; 135 $command .= " -stats $outputStats"; 135 136 136 137 # Detrend to use in processing … … 152 153 &my_die("Couldn't find expected output file: $bin2Name", $det_id, $iter, $exp_tag, $class_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($bin2Name); 153 154 154 # Get the statistics on the residual image155 # Load the raw output stats file 155 156 my $statsFile; # File handle 156 157 open $statsFile, $ipprc->file_resolve($outputStats) or &my_die("Can't open statistics file $outputStats: $!", $det_id, $iter, $exp_tag, $class_id, $PS_EXIT_SYS_ERROR); 157 158 my @contents = <$statsFile>; # Contents of file 158 159 close $statsFile; 160 161 # Parse the statistics on the residual image 159 162 my $mdcParser = PS::IPP::Metadata::Config->new; # Parser for metadata config files 160 163 my $metadata = $mdcParser->parse(join "", @contents) or &my_die("Unable to parse metadata config doc", $det_id, $iter, $exp_tag, $class_id, $PS_EXIT_PROG_ERROR); 161 # $stats = PS::IPP::Metadata::Stats->new(); # Stats parser162 164 $stats->parse($metadata) or &my_die("Unable to find all values in statistics output.", $det_id, $iter, $exp_tag, $class_id, $PS_EXIT_PROG_ERROR); 163 165 164 166 # run ppStats on the binned image 165 $command = "$ppStats $bin2Name $outputBinnedStats";167 $command = "$ppStats -recipe PPSTATS RESIDUAL $bin2Name"; 166 168 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 167 169 run(command => $command, verbose => 1); 168 169 170 unless ($success) { 170 171 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); … … 172 173 } 173 174 174 &my_die("Couldn't find expected output file: $outputBinnedStats", $det_id, $iter, $exp_tag, $class_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($outputBinnedStats); 175 176 open $statsFile, $ipprc->file_resolve($outputBinnedStats) or &my_die("Can't open statistics file $outputBinnedStats: $!", $det_id, $iter, $exp_tag, $class_id, $PS_EXIT_SYS_ERROR); 177 @contents = <$statsFile>; # Contents of file 178 close $statsFile; 179 my $binnedMetadata = $mdcParser->parse(join "", @contents) or &my_die("Unable to parse metadata config doc", $det_id, $iter, $exp_tag, $class_id, $PS_EXIT_PROG_ERROR); 180 # $binnedStats = PS::IPP::Metadata::Stats->new(); # Stats parser 175 # parse the binned image statistics 176 my $binnedMetadata = $mdcParser->parse(join "", @$stdout_buf) or &my_die("Unable to parse metadata output", $det_id, $iter, $exp_tag, $class_id, $PS_EXIT_PROG_ERROR); 181 177 $binnedStats->parse($binnedMetadata) or &my_die("Unable to find all values in statistics output.", $det_id, $iter, $exp_tag, $class_id, $PS_EXIT_PROG_ERROR); 182 178 } -
trunk/ippScripts/scripts/detrend_stack.pl
r13698 r13748 116 116 $command .= ' -type ' . uc($det_type); # Type of stacking to perform 117 117 $command .= " -stats $outputStats"; # Statistics output filename 118 $command .= " -recipe PPSTATS CHIPSTATS"; 118 119 119 120 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = -
trunk/ippScripts/scripts/diff_skycell.pl
r13717 r13748 143 143 my $stats = PS::IPP::Metadata::Stats->new(); # Stats parser 144 144 unless ($no_op) { 145 my $command = "$ppSub $input $template $outputRoot -inmask $inputMask -refmask $templateMask -stat $outputStats"; # Command to run ppSub 145 my $command = "$ppSub $input $template $outputRoot"; 146 $command .= " -inmask $inputMask"; 147 $command .= " -refmask $templateMask"; 148 $command .= " -stats $outputStats"; 149 $command .= " -recipe PPSTATS CHIPSTATS"; 146 150 147 151 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = -
trunk/ippScripts/scripts/ipp_serial_inject.pl
r13743 r13748 57 57 my $relfile = $ipprc->convert_filename_relative( $absfile ); 58 58 59 my $command_type = "$ppStats - concept FPA.OBSTYPE -concept FPA.TELESCOPE -concept FPA.INSTRUMENT$absfile";59 my $command_type = "$ppStats -recipe PPSTATS RESIDUAL $absfile"; 60 60 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = run(command => $command_type, verbose => 1); 61 61 die "Unable to perform ppStats: $error_code\n" if not $success; … … 69 69 if ($row->{name} eq "FPA.TELESCOPE") { $telescope = $row->{value}; } 70 70 if ($row->{name} eq "FPA.INSTRUMENT") { $instrument = $row->{value}; } # this entry must return the camera in the ipp/config system which we load 71 # if ($row->{name} eq "FPA.OBSTYPE") { $type = $row->{value}; }72 71 } 73 72 -
trunk/ippScripts/scripts/register_exp.pl
r13698 r13748 86 86 my $regtool = can_run('regtool') 87 87 or (warn "can't find regtool" and $missing_tools = 1); 88 my $ppStats = can_run('ppStats')89 or (warn "can't find ppStats" and $missing_tools = 1);90 88 91 89 if ($missing_tools) { -
trunk/ippScripts/scripts/register_imfile.pl
r13698 r13748 58 58 and defined $uri; 59 59 60 my $RECIPE = " PPSTATS_REGISTER"; # Recipe to use for ppStats60 my $RECIPE = "REGISTER"; # Recipe to use for ppStats 61 61 62 62 # These values should be constant for all components -
trunk/ippScripts/scripts/stack_skycell.pl
r13717 r13748 143 143 my $stats = PS::IPP::Metadata::Stats->new(); # Stats parser 144 144 unless ($no_op) { 145 my $command = "$ppStack $listName $outputRoot -stat $outputStats"; # Command to run pois 145 my $command = "$ppStack $listName $outputRoot"; 146 $command .= " -stats $outputStats"; 147 $command .= " -recipe PPSTATS CHIPSTATS"; 146 148 147 149 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = -
trunk/ippScripts/scripts/warp_skycell.pl
r13711 r13748 118 118 my $stats = PS::IPP::Metadata::Stats->new(); # Stats parser 119 119 unless ($no_op) { 120 my $command = "$pswarp -list $list1Name -masklist $list2Name -astromlist $list3Name $outputRoot $skyFile -stat $outputStats"; # Command to run pswarp 120 my $command = "$pswarp -list $list1Name"; 121 $command .= " -masklist $list2Name"; 122 $command .= " -astromlist $list3Name"; 123 $command .= " $outputRoot $skyFile"; 124 $command .= " -stats $outputStats"; 125 $command .= " -recipe PPSTATS CHIPSTATS"; 126 121 127 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 122 128 run(command => $command, verbose => 1);
Note:
See TracChangeset
for help on using the changeset viewer.
