Changeset 9892
- Timestamp:
- Nov 7, 2006, 10:38:05 AM (20 years ago)
- Location:
- trunk/ippScripts/scripts
- Files:
-
- 8 edited
-
detrend_norm_apply.pl (modified) (2 diffs)
-
detrend_norm_exp.pl (modified) (2 diffs)
-
detrend_process_exp.pl (modified) (6 diffs)
-
detrend_process_imfile.pl (modified) (4 diffs)
-
detrend_reject_imfile.pl (modified) (3 diffs)
-
detrend_resid.pl (modified) (4 diffs)
-
phase2.pl (modified) (7 diffs)
-
phase3.pl (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/detrend_norm_apply.pl
r9446 r9892 47 47 and defined $detType; 48 48 49 $ipprc->define_camera($camera); 50 49 51 50 52 use constant RECIPE => 'PPIMAGE_N'; # Recipe to use with ppImage … … 62 64 my $outputRoot = $camera . '.' . $detType . '.norm.' . $detId . '.' . $iter; # Root output name 63 65 $outputRoot = File::Spec->rel2abs( File::Spec->catpath( $vol, $dir, $outputRoot ), $ipprc->workdir() ); 64 my $output = $outputRoot . '.' . $classId . '.fits'; # Main output file 65 my $b1name = $outputRoot . '.' . $classId . '.b1.fits'; # Output file with binning 1 66 my $b2name = $outputRoot . '.' . $classId . '.b2.fits'; # Output file with binning 2 66 67 my $output = $ipprc->filename("PPIMAGE.OUTPUT", $outputRoot, $classId); 68 my $b1name = $ipprc->filename("PPIMAGE.BIN1", $outputRoot, $classId); 69 my $b2name = $ipprc->filename("PPIMAGE.BIN2", $outputRoot, $classId); 70 67 71 my $statsName = $outputRoot . '.' . $classId . '.stats'; # Statistics file 68 72 -
trunk/ippScripts/scripts/detrend_norm_exp.pl
r9524 r9892 36 36 and defined $camera 37 37 and defined $det_type; 38 39 $ipprc->define_camera($camera); 38 40 39 41 use constant RECIPE1 => 'PPIMAGE_J1'; # Recipe to use for ppImage to make JPEGs … … 110 112 111 113 # Output products --- need to synch with the camera configuration! 112 my $jpeg1Name = $ outputRoot . ".b1.jpg"; # Binned JPEG #1113 my $jpeg2Name = $ outputRoot . ".b2.jpg"; # Binned JPEG #2114 my $jpeg1Name = $ipprc->filename("PPIMAGE.JPEG1", $outputRoot); # Binned JPEG #1 115 my $jpeg2Name = $ipprc->filename("PPIMAGE.JPEG2", $outputRoot); # Binned JPEG #2 114 116 115 117 # Make the jpeg for binning 1 -
trunk/ippScripts/scripts/detrend_process_exp.pl
r9524 r9892 19 19 use Pod::Usage qw( pod2usage ); 20 20 21 my ($det_id, $exp_tag, $ no_update);21 my ($det_id, $exp_tag, $camera, $no_update); 22 22 GetOptions( 23 23 'det_id|d=s' => \$det_id, 24 24 'exp_tag|e=s' => \$exp_tag, 25 'camera|c=s' => \$camera, 25 26 'no-update' => \$no_update 26 27 ) or pod2usage( 2 ); … … 28 29 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV; 29 30 pod2usage( 30 -msg => "Required options: --det_id --exp_tag ",31 -msg => "Required options: --det_id --exp_tag --camera", 31 32 -exitval => 3, 32 33 ) unless defined $det_id 33 and defined $exp_tag; 34 and defined $exp_tag, 35 and defined $camera; 36 37 $ipprc->define_camera($camera); 34 38 35 39 use constant RECIPE1 => 'PPIMAGE_J1'; # Recipe to use for ppImage to make JPEGs … … 105 109 close $list2File; 106 110 107 # Output products --- need to synch with the camera configuration!108 my $jpeg1 Name = $outputRoot . ".b1.jpg"; # Binned JPEG #1109 my $jpeg2 Name = $outputRoot . ".b2.jpg"; # Binned JPEG #2111 # Output products 112 my $jpeg1 = $ipprc->filename("PPIMAGE.JPEG1", $outputRoot); # Binned JPEG #1 113 my $jpeg2 = $ipprc->filename("PPIMAGE.JPEG2", $outputRoot); # Binned JPEG #2 110 114 111 115 # Make the jpeg for binning 1 … … 114 118 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 115 119 run(command => $command, verbose => 1); 116 die "Unable to find expected output file: $jpeg1 Name\n" if not -f $jpeg1Name;120 die "Unable to find expected output file: $jpeg1\n" if not -f $jpeg1; 117 121 } 118 122 … … 122 126 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 123 127 run(command => $command, verbose => 1); 124 die "Unable to find expected output file: $jpeg2 Name\n" if not -f $jpeg2Name;128 die "Unable to find expected output file: $jpeg2\n" if not -f $jpeg2; 125 129 } 126 130 … … 128 132 # Add the result into the database 129 133 $outputRoot = File::Spec->abs2rel( $outputRoot, $ipprc->workdir() ); 130 $jpeg1 Name = File::Spec->abs2rel( $jpeg1Name, $ipprc->workdir() );131 $jpeg2 Name = File::Spec->abs2rel( $jpeg2Name, $ipprc->workdir() );134 $jpeg1 = File::Spec->abs2rel( $jpeg1, $ipprc->workdir() ); 135 $jpeg2 = File::Spec->abs2rel( $jpeg2, $ipprc->workdir() ); 132 136 unless ($no_update) { 133 137 my $command = "$dettool -addprocessedexp -det_id $det_id -exp_tag $exp_tag " . 134 "-recip " . RECIPE1() . "," . RECIPE2() . " -b1_uri $jpeg1 Name -b2_uri $jpeg2Name" .138 "-recip " . RECIPE1() . "," . RECIPE2() . " -b1_uri $jpeg1 -b2_uri $jpeg2 " . 135 139 "-bg $bg -bg_stdev $bg_stdev -bg_mean_stdev $bg_mean_stdev"; # Command to run 136 140 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = -
trunk/ippScripts/scripts/detrend_process_imfile.pl
r9869 r9892 18 18 use Pod::Usage qw( pod2usage ); 19 19 20 my ($det_id, $exp_tag, $class_id, $det_type, $input_uri, $ output_uri, $no_update);20 my ($det_id, $exp_tag, $class_id, $det_type, $input_uri, $camera, $no_update); 21 21 GetOptions( 22 22 'det_id|d=s' => \$det_id, 23 'exp_tag|e=s' => \$exp_tag,23 'exp_tag|e=s' => \$exp_tag, 24 24 'class_id|i=s' => \$class_id, 25 25 'det_type|t=s' => \$det_type, 26 26 'input_uri|u=s' => \$input_uri, 27 'camera|c=s' => \$camera, 27 28 'no-update' => \$no_update 28 29 ) or pod2usage( 2 ); … … 30 31 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV; 31 32 pod2usage( 32 -msg => "Required options: --det_id --exp_tag --class_id --det_type --input_uri ",33 -msg => "Required options: --det_id --exp_tag --class_id --det_type --input_uri --camera", 33 34 -exitval => 3, 34 35 ) unless defined $det_id … … 36 37 and defined $class_id 37 38 and defined $det_type 38 and defined $input_uri; 39 and defined $input_uri 40 and defined $camera; 41 42 $ipprc->define_camera($camera); 39 43 40 44 # Recipes to use, as a function of the detrend type … … 57 61 die "Unrecognised detrend type: $det_type\n" if not defined $recipe; 58 62 59 ### Output file name --- must match camera configuration!63 ### Output file name 60 64 my ($vol, $dir, $file) = File::Spec->splitpath( $input_uri ); 61 65 my $outputRoot = $exp_tag . '.detproc.' . $det_id; # Root name 62 66 $outputRoot = File::Spec->rel2abs( File::Spec->catpath( $vol, $dir, $outputRoot ), $ipprc->workdir() ); 63 67 $input_uri = File::Spec->rel2abs( $input_uri, $ipprc->workdir() ); 64 my $outputImage = $outputRoot . '.' . $class_id . '.fits'; 68 69 my $outputImage = $ipprc->filename("PPIMAGE.OUTPUT", $outputRoot, $class_id); 70 my $outputBin1 = $ipprc->filename("PPIMAGE.BIN1", $outputRoot, $class_id); 71 my $outputBin2 = $ipprc->filename("PPIMAGE.BIN2", $outputRoot, $class_id); 72 65 73 my $outputStats = $outputRoot . '.' . $class_id . '.stats'; 66 my $outputBin1 = $outputRoot . '.' . $class_id . '.b1.fits';67 my $outputBin2 = $outputRoot . '.' . $class_id . '.b2.fits';68 74 69 75 # Run ppImage -
trunk/ippScripts/scripts/detrend_reject_imfile.pl
r9505 r9892 40 40 and defined $det_type 41 41 and defined $camera; 42 43 $ipprc->define_camera($camera); 42 44 43 45 use constant RECIPE1 => 'PPIMAGE_J1'; # Recipe to use for ppImage to make JPEGs … … 87 89 88 90 # Output products --- need to synch with the camera configuration! 89 my $jpeg1Name = $ outputRoot . ".b1.jpg"; # Binned JPEG #190 my $jpeg2Name = $ outputRoot . ".b2.jpg"; # Binned JPEG #291 my $jpeg1Name = $ipprc->filename("PPIMAGE.JPEG1", $outputRoot); # Binned JPEG #1 92 my $jpeg2Name = $ipprc->filename("PPIMAGE.JPEG2", $outputRoot); # Binned JPEG #2 91 93 92 94 # Make the jpeg for binning 1 … … 106 108 } 107 109 108 $ipprc->define_camera( $camera);109 110 my $expected = rejection_limit( 'EXPECTED', $det_type, $filter ); # Expected mean 110 111 # Rejection thresholds -
trunk/ippScripts/scripts/detrend_resid.pl
r9869 r9892 20 20 21 21 my ($det_id, $iter, $exp_tag, $class_id, $det_type, $detrend, 22 $input_uri, $ no_update);22 $input_uri, $camera, $no_update); 23 23 GetOptions( 24 24 'det_id|d=s' => \$det_id, 25 25 'iteration=s' => \$iter, 26 'exp_tag|e=s' => \$exp_tag,26 'exp_tag|e=s' => \$exp_tag, 27 27 'class_id|i=s' => \$class_id, 28 28 'det_type|t=s' => \$det_type, 29 29 'detrend=s' => \$detrend, 30 30 'input_uri|u=s' => \$input_uri, 31 'camera|c=s' => \$camera, 31 32 'no-update' => \$no_update 32 33 ) or pod2usage( 2 ); … … 34 35 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV; 35 36 pod2usage( 36 -msg => "Required options: --det_id --iteration --exp_tag --class_id --det_type --detrend -- input_uri",37 -msg => "Required options: --det_id --iteration --exp_tag --class_id --det_type --detrend --camera --input_uri", 37 38 -exitval => 3, 38 39 ) unless defined $det_id … … 42 43 and defined $det_type 43 44 and defined $detrend 44 and defined $input_uri; 45 and defined $input_uri 46 and defined $camera; 47 48 $ipprc->define_camera($camera); 45 49 46 50 # Recipes to use, as a function of the detrend type … … 84 88 $input_uri = File::Spec->rel2abs( $input_uri, $ipprc->workdir() ); 85 89 $detrend = File::Spec->rel2abs( $detrend, $ipprc->workdir() ); 86 my $outputName = $outputRoot . '.' . $class_id . '.fits'; # Name for 90 91 my $outputName = $ipprc->filename("PPIMAGE.OUTPUT", $outputRoot, $class_id); 92 my $bin1Name = $ipprc->filename("PPIMAGE.BIN1", $outputRoot, $class_id); 93 my $bin2Name = $ipprc->filename("PPIMAGE.BIN2", $outputRoot, $class_id); 94 87 95 my $outputStats = $outputRoot . '.' . $class_id . '.stats'; 88 my $bin1Name = $outputRoot . '.' . $class_id . '.b1.fits';89 my $bin2Name = $outputRoot . '.' . $class_id . '.b2.fits';90 96 91 97 # Run ppImage -
trunk/ippScripts/scripts/phase2.pl
r9446 r9892 21 21 $classId, # Class Id 22 22 $input, # Input FITS file 23 $camera, # Camera 23 24 $no_update # Don't update the database? 24 25 ); … … 27 28 'class_id|i=s' => \$classId, 28 29 'uri|u=s' => \$input, 30 'camera|c=s' => \$camera, 29 31 'no-update' => \$no_update 30 32 ) or pod2usage( 2 ); … … 32 34 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV; 33 35 pod2usage( 34 -msg => "Required options: --exp_tag --class_id --uri ",36 -msg => "Required options: --exp_tag --class_id --uri --camera", 35 37 -exitval => 3, 36 38 ) unless defined $expTag 37 39 and defined $classId 38 and defined $input; 40 and defined $input 41 and defined $camera; 42 43 $ipprc->define_camera($camera); 39 44 40 45 # Look for programs we need … … 49 54 $outputRoot = File::Spec->rel2abs( File::Spec->catpath( $vol, $dir, $outputRoot ), $ipprc->workdir() ); 50 55 $input = File::Spec->rel2abs( $input, $ipprc->workdir() ); 51 my $outputImage = $outputRoot . '.' . $classId . '.fits'; 56 my $outputImage = $ipprc->filename("PPIMAGE.OUTPUT", $outputRoot, $classId); 57 my $outputBin1 = $ipprc->filename("PPIMAGE.BIN1", $outputRoot, $classId); 58 my $outputBin2 = $ipprc->filename("PPIMAGE.BIN2", $outputRoot, $classId); 52 59 my $outputStats = $outputRoot . '.' . $classId . '.stats'; 53 my $outputBin1Name = $outputRoot . '.' . $classId . '.b1.fits';54 my $outputBin2Name = $outputRoot . '.' . $classId . '.b2.fits';55 60 56 61 # Run ppImage … … 62 67 die "Unable to perform ppImage on $input: $error_code\n" if not $success; 63 68 die "Couldn't find expected output file: $outputImage\n" if not -f $outputImage; 64 die "Couldn't find expected output file: $outputBin1 Name\n" if not -f $outputBin1Name;65 die "Couldn't find expected output file: $outputBin2 Name\n" if not -f $outputBin2Name;69 die "Couldn't find expected output file: $outputBin1\n" if not -f $outputBin1; 70 die "Couldn't find expected output file: $outputBin2\n" if not -f $outputBin2; 66 71 die "Couldn't find expected output file: $outputStats\n" if not -f $outputStats; 67 72 } … … 83 88 # Add the processed file to the database 84 89 $outputImage = File::Spec->abs2rel( $outputImage, $ipprc->workdir() ); 85 $outputBin1 Name = File::Spec->abs2rel( $outputBin1Name, $ipprc->workdir() );86 $outputBin2 Name = File::Spec->abs2rel( $outputBin2Name, $ipprc->workdir() );90 $outputBin1 = File::Spec->abs2rel( $outputBin1, $ipprc->workdir() ); 91 $outputBin2 = File::Spec->abs2rel( $outputBin2, $ipprc->workdir() ); 87 92 unless ($no_update) { 88 93 # Command to run dettool … … 92 97 $command .= " -recip " . RECIPE; 93 98 $command .= " -uri $outputImage"; 94 $command .= " -b1_uri $outputBin1 Name";95 $command .= " -b2_uri $outputBin2 Name";99 $command .= " -b1_uri $outputBin1"; 100 $command .= " -b2_uri $outputBin2"; 96 101 $command .= " -bg " . $stats->bg_mean(); 97 102 $command .= " -bg_stdev " . $stats->bg_stdev(); -
trunk/ippScripts/scripts/phase3.pl
r9524 r9892 22 22 GetOptions( 23 23 'exp_tag|e=s' => \$exp_tag, 24 'camera|c=s' => \$camera, 24 25 'no-update' => \$no_update 25 26 ) or pod2usage( 2 ); … … 27 28 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV; 28 29 pod2usage( 29 -msg => "Required options: --exp_tag ",30 -msg => "Required options: --exp_tag --camera", 30 31 -exitval => 3, 31 ) unless defined $exp_tag; 32 ) unless defined $exp_tag 33 and defined $camera; 34 35 $ipprc->define_camera($camera); 32 36 33 37 use constant RECIPE1 => 'PPIMAGE_J1'; # Recipe to use for ppImage to make JPEGs … … 110 114 111 115 # Output products --- need to synch with the camera configuration! 112 my $jpeg1 Name = $outputRoot . ".b1.jpg"; # Binned JPEG #1113 my $jpeg2 Name = $outputRoot . ".b2.jpg"; # Binned JPEG #2116 my $jpeg1 = $ipprc->filename("PPIMAGE.JPEG1", $outputRoot); # Binned JPEG #1 117 my $jpeg2 = $ipprc->filename("PPIMAGE.JPEG2", $outputRoot); # Binned JPEG #2 114 118 115 119 # Make the jpeg for binning 1 … … 118 122 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 119 123 run(command => $command, verbose => 1); 120 die "Unable to find expected output file: $jpeg1 Name\n" if not -f $jpeg1Name;124 die "Unable to find expected output file: $jpeg1\n" if not -f $jpeg1; 121 125 } 122 126 … … 126 130 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 127 131 run(command => $command, verbose => 1); 128 die "Unable to find expected output file: $jpeg2 Name\n" if not -f $jpeg2Name;132 die "Unable to find expected output file: $jpeg2\n" if not -f $jpeg2; 129 133 } 130 134 … … 132 136 # Add the result into the database 133 137 $outputRoot = File::Spec->abs2rel( $outputRoot, $ipprc->workdir() ); 134 $jpeg1 Name = File::Spec->abs2rel( $jpeg1Name, $ipprc->workdir() );135 $jpeg2 Name = File::Spec->abs2rel( $jpeg2Name, $ipprc->workdir() );138 $jpeg1 = File::Spec->abs2rel( $jpeg1, $ipprc->workdir() ); 139 $jpeg2 = File::Spec->abs2rel( $jpeg2, $ipprc->workdir() ); 136 140 unless ($no_update) { 137 141 my $command = "$p3tool -addprocessedexp -exp_tag $exp_tag -uri UNKNOWN " . 138 "-recip " . RECIPE1() . "," . RECIPE2() . " -b1_uri $jpeg1 Name -b2_uri $jpeg2Name" .142 "-recip " . RECIPE1() . "," . RECIPE2() . " -b1_uri $jpeg1 -b2_uri $jpeg2 " . 139 143 "-bg $bg -bg_stdev $bg_stdev -bg_mean_stdev $bg_mean_stdev " . 140 144 "-sigma_ra 0.0 -sigma_dec 0.0 -nastro 0 -zp_mean 0.0 -zp_stdev 0.0"; # Command to run
Note:
See TracChangeset
for help on using the changeset viewer.
