Changeset 9180
- Timestamp:
- Oct 3, 2006, 5:47:25 PM (20 years ago)
- Location:
- trunk/ippScripts/scripts
- Files:
-
- 2 edited
-
detrend_process_exp.pl (modified) (4 diffs)
-
detrend_stack.pl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/detrend_process_exp.pl
r9145 r9180 11 11 use PS::IPP::Metadata::List qw( parse_md_list ); 12 12 use Statistics::Descriptive; 13 14 use PS::IPP::Config; 15 my $ipprc = PS::IPP::Config->new(); # IPP configuration 16 use File::Spec; 13 17 14 18 use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt ); … … 84 88 } 85 89 90 my $example = ${$files}[0]->{b1_uri}; # Example filename 91 my ($vol, $dir, $file) = File::Spec->splitpath( $example ); 92 86 93 # Generate the file list, and get the statistics 87 94 my $outputRoot = $exp_tag . '.detproc.' . $det_id; # Root output name 95 $outputRoot = File::Spec->rel2abs( File::Spec->catpath( $vol, $dir, $outputRoot ), $ipprc->workdir() ); 88 96 my $list1Name = $outputRoot . '.b1.list'; # Name for the input file list for binning 1 89 97 my $list2Name = $outputRoot . '.b2.list'; # Name for the input file list for binning 2 … … 93 101 open my $list2File, '>' . $list2Name; 94 102 foreach my $file (@$files) { 95 print $list1File $file->{b1_uri}. "\n";96 print $list2File $file->{b2_uri}. "\n";103 print $list1File File::Spec->rel2abs( $file->{b1_uri}, $ipprc->workdir() ) . "\n"; 104 print $list2File File::Spec->rel2abs( $file->{b2_uri}, $ipprc->workdir() ) . "\n"; 97 105 push @means, $file->{bg}; 98 106 push @stdevs, $file->{bg_stdev}; … … 121 129 } 122 130 131 123 132 # Add the result into the database 133 $outputRoot = File::Spec->abs2rel( $outputRoot, $ipprc->workdir() ); 124 134 unless ($no_update) { 125 135 my $command = "$dettool -addprocessedexp -det_id $det_id -exp_tag $exp_tag " . -
trunk/ippScripts/scripts/detrend_stack.pl
r9145 r9180 11 11 use PS::IPP::Metadata::List qw( parse_md_list ); 12 12 use PS::IPP::Metadata::Stats; 13 14 use PS::IPP::Config; 15 my $ipprc = PS::IPP::Config->new(); # IPP configuration 16 use File::Spec; 13 17 14 18 use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt ); … … 73 77 } 74 78 79 my $example = ${$files}[0]->{uri}; # Example file 80 my ($vol, $dir, $file) = File::Spec->splitpath( $example ); 81 75 82 # Stack the files 76 83 my $outputRoot = $camera . '.' . $det_type . '.' . $det_id . '.' . $iter . '.' . $class_id; # Root name 84 $outputRoot = File::Spec->rel2abs( File::Spec->catpath( $vol, $dir, $outputRoot ), $ipprc->workdir() ); 77 85 my $outputStack = $outputRoot . '.fits'; # Output name 78 86 my $outputStats = $outputRoot . '.stats'; # Statistics name … … 81 89 foreach my $file (@$files) { 82 90 my $uri = $file->{uri}; # URI for input file 91 $uri = File::Spec->rel2abs( $uri, $ipprc->workdir() ); 83 92 $command .= ' ' . $uri; 84 93 } … … 93 102 die "Unable to find expected output file: $outputStats\n" if not -f $outputStats; 94 103 } 95 96 ### Could do some sort of JPEG generation here.97 104 98 105 # Get the statistics on the stacked image … … 112 119 113 120 # Add the resultant into the database 121 $outputStack = File::Spec->abs2rel( $outputStack, $ipprc->workdir() ); 114 122 unless ($no_update) { 115 123 my $command = "$dettool -addstacked -det_id $det_id -iteration $iter -class_id $class_id" .
Note:
See TracChangeset
for help on using the changeset viewer.
