Changeset 11298
- Timestamp:
- Jan 25, 2007, 3:15:46 PM (19 years ago)
- Location:
- trunk/ippScripts/scripts
- Files:
-
- 10 edited
-
detrend_norm_apply.pl (modified) (3 diffs)
-
detrend_norm_calc.pl (modified) (1 diff)
-
detrend_norm_exp.pl (modified) (4 diffs)
-
detrend_process_exp.pl (modified) (3 diffs)
-
detrend_process_imfile.pl (modified) (3 diffs)
-
detrend_reject_imfile.pl (modified) (3 diffs)
-
detrend_resid.pl (modified) (3 diffs)
-
detrend_stack.pl (modified) (3 diffs)
-
phase2.pl (modified) (4 diffs)
-
phase3.pl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/detrend_norm_apply.pl
r11297 r11298 24 24 $detType, # Detrend type 25 25 $dbname, # Database name 26 $workdir, # Working directory, for output files 26 27 $no_update # Don't update the database 27 28 ); … … 35 36 'det_type|t=s' => \$detType, 36 37 'dbname|d=s' => \$dbname, 38 'workdir|w=s' => \$workdir, # Working directory, for output files 37 39 'no-update' => \$no_update 38 40 ) or pod2usage( 2 ); … … 60 62 die "Can't find required tools.\n" if $missing_tools; 61 63 62 my ($vol, $dir, $file) = File::Spec->splitpath( $input ); 64 unless (defined $workdir) { 65 my ($vol, $dir, $file) = File::Spec->splitpath( $input ); 66 $workdir = $dir; 67 } 63 68 $input = $ipprc->convert_filename_absolute( $input ); 64 69 65 70 # Output name 66 71 my $outputRoot = $camera . '.' . $detType . '.norm.' . $detId . '.' . $iter; # Root output name 67 $outputRoot = File::Spec->cat path( $vol, $dir, $outputRoot );72 $outputRoot = File::Spec->catfile( $workdir, $outputRoot ); 68 73 $outputRoot = $ipprc->convert_filename_absolute($outputRoot); 69 74 -
trunk/ippScripts/scripts/detrend_norm_calc.pl
r11297 r11298 40 40 # Define which detrend types we normalise 41 41 use constant NORMALIZE => { 42 'bias' => 0,43 'dark' => 0,44 'shutter' => 0,45 'flat' => 1,42 'bias' => 0, 43 'dark' => 0, 44 'shutter' => 0, 45 'flat' => 1, 46 46 'domeflat' => 1, 47 'skyflat' => 1,48 'fringe' => 0,47 'skyflat' => 1, 48 'fringe' => 0, 49 49 }; 50 50 -
trunk/ippScripts/scripts/detrend_norm_exp.pl
r11297 r11298 19 19 use Pod::Usage qw( pod2usage ); 20 20 21 my ($det_id, $iter, $det_type, $camera, $dbname, $ no_update);21 my ($det_id, $iter, $det_type, $camera, $dbname, $workdir, $no_update); 22 22 GetOptions( 23 23 'det_id|d=s' => \$det_id, … … 26 26 'det_type|t=s' => \$det_type, 27 27 'dbname|d=s' => \$dbname, # Database name 28 'workdir|w=s' => \$workdir, # Working directory, for output files 28 29 'no-update' => \$no_update 29 30 ) or pod2usage( 2 ); … … 92 93 } 93 94 94 my $example = ${$files}[0]->{b1_uri}; # Example file, for path 95 my ($vol, $dir, $file) = File::Spec->splitpath( $example ); 95 unless (defined $workdir) { 96 my $example = ${$files}[0]->{b1_uri}; # Example file, for path 97 my ($vol, $dir, $file) = File::Spec->splitpath( $example ); 98 $workdir = $dir; 99 } 96 100 97 101 # Generate the file list, and get the statistics 98 102 my $outputRoot = $camera . '.' . $det_type . '.norm.' . $det_id . '.' . $iter; # Root output name 99 $outputRoot = File::Spec->cat path( $vol, $dir, $outputRoot );103 $outputRoot = File::Spec->catfile( $workdir, $outputRoot ); 100 104 $outputRoot = $ipprc->convert_filename_absolute( $outputRoot ); 101 105 my $list1Name = $outputRoot . '.b1.list'; # Name for the input file list for binning 1 … … 114 118 close $list2File; 115 119 116 # Output products --- need to synch with the camera configuration!120 # Output products 117 121 my $jpeg1Name = $ipprc->filename("PPIMAGE.JPEG1", $outputRoot); # Binned JPEG #1 118 122 my $jpeg2Name = $ipprc->filename("PPIMAGE.JPEG2", $outputRoot); # Binned JPEG #2 -
trunk/ippScripts/scripts/detrend_process_exp.pl
r11297 r11298 19 19 use Pod::Usage qw( pod2usage ); 20 20 21 my ($det_id, $exp_tag, $camera, $dbname, $ no_update);21 my ($det_id, $exp_tag, $camera, $dbname, $workdir, $no_update); 22 22 GetOptions( 23 23 'det_id|d=s' => \$det_id, … … 25 25 'camera|c=s' => \$camera, 26 26 'dbname|d=s' => \$dbname, # Database name 27 'workdir|w=s' => \$workdir, # Working directory, for output files 27 28 'no-update' => \$no_update 28 29 ) or pod2usage( 2 ); … … 90 91 } 91 92 92 my $example = ${$files}[0]->{b1_uri}; # Example filename 93 my ($vol, $dir, $file) = File::Spec->splitpath( $example ); 93 unless (defined $workdir) { 94 my $example = ${$files}[0]->{b1_uri}; # Example filename 95 my ($vol, $dir, $file) = File::Spec->splitpath( $example ); 96 $workdir = $dir; 97 } 94 98 95 99 # Generate the file list, and get the statistics 96 100 my $outputRoot = $exp_tag . '.detproc.' . $det_id; # Root output name 97 $outputRoot = File::Spec->cat path( $vol, $dir, $outputRoot );101 $outputRoot = File::Spec->catfile( $workdir, $outputRoot ); 98 102 $outputRoot = $ipprc->convert_filename_absolute($outputRoot); 99 103 my $list1Name = $outputRoot . '.b1.list'; # Name for the input file list for binning 1 -
trunk/ippScripts/scripts/detrend_process_imfile.pl
r11297 r11298 18 18 use Pod::Usage qw( pod2usage ); 19 19 20 my ($det_id, $exp_tag, $class_id, $det_type, $input_uri, $camera, $bdname, $ no_update);20 my ($det_id, $exp_tag, $class_id, $det_type, $input_uri, $camera, $bdname, $workdir, $no_update); 21 21 GetOptions( 22 22 'det_id|d=s' => \$det_id, … … 27 27 'camera|c=s' => \$camera, 28 28 'dbname|d=s' => \$dbname, # Database name 29 'workdir|w=s' => \$workdir, # Working directory, for output files 29 30 'no-update' => \$no_update 30 31 ) or pod2usage( 2 ); … … 66 67 67 68 ### Output file name 68 my ($vol, $dir, $file) = File::Spec->splitpath( $input_uri ); 69 unless (defined $workdir) { 70 my ($vol, $dir, $file) = File::Spec->splitpath( $input_uri ); 71 $workdir = $dir; 72 } 69 73 my $outputRoot = $exp_tag . '.detproc.' . $det_id; # Root name 70 $outputRoot = File::Spec->cat path( $vol, $dir, $outputRoot );74 $outputRoot = File::Spec->catfile( $workdir, $outputRoot ); 71 75 $outputRoot = $ipprc->convert_filename_absolute( $outputRoot ); 72 76 $input_uri = $ipprc->convert_filename_absolute( $input_uri ); -
trunk/ippScripts/scripts/detrend_reject_imfile.pl
r11297 r11298 19 19 use Pod::Usage qw( pod2usage ); 20 20 21 my ($det_id, $iter, $exp_tag, $det_type, $camera, $filter, $reject, $dbname, $ no_update);21 my ($det_id, $iter, $exp_tag, $det_type, $camera, $filter, $reject, $dbname, $workdir, $no_update); 22 22 GetOptions( 23 23 'det_id|d=s' => \$det_id, … … 29 29 'reject' => \$reject 30 30 'dbname|d=s' => \$dbname, # Database name 31 'workdir|w=s' => \$workdir, # Working directory, for output files 31 32 'no-update' => \$no_update, 32 33 ) or pod2usage( 2 ); … … 68 69 } 69 70 70 my $example = ${$files}[0]->{b1_uri}; # Example file 71 my ($vol, $dir, $file) = File::Spec->splitpath( $example ); 71 unless (defined $workdir) { 72 my $example = ${$files}[0]->{b1_uri}; # Example file 73 my ($vol, $dir, $file) = File::Spec->splitpath( $example ); 74 $workdir = $dir; 75 } 72 76 73 77 # Generate the file list, and get the statistics 74 78 my $outputRoot = $exp_tag . '.detresid.' . $det_id . '.' . $iter; # Root output name 75 $outputRoot = File::Spec->cat path( $vol, $dir, $outputRoot );79 $outputRoot = File::Spec->catfile( $workdir, $outputRoot ); 76 80 $outputRoot = $ipprc->convert_filename_absolute($outputRoot); 77 81 my $list1Name = $outputRoot . '.b1.list'; # Name for the input file list for binning 1 -
trunk/ippScripts/scripts/detrend_resid.pl
r11297 r11298 20 20 21 21 my ($det_id, $iter, $exp_tag, $class_id, $det_type, $detrend, 22 $input_uri, $camera, $mode, $dbname, $ no_update);22 $input_uri, $camera, $mode, $dbname, $workdir, $no_update); 23 23 GetOptions( 24 24 'det_id|d=s' => \$det_id, … … 32 32 'mode|m=s' => \$mode, 33 33 'dbname|d=s' => \$dbname, # Database name 34 'workdir|w=s' => \$workdir, # Working directory, for output files 34 35 'no-update' => \$no_update, 35 36 ) or pod2usage( 2 ); … … 99 100 100 101 ### Output file names --- must match camera configuration! 101 my ($vol, $dir, $file) = File::Spec->splitpath( $input_uri ); 102 unless (defined $workdir) { 103 my ($vol, $dir, $file) = File::Spec->splitpath( $input_uri ); 104 $workdir = $dir; 105 } 102 106 my $outputRoot = $exp_tag . '.detresid.' . $det_id . '.' . $iter; # Root name 103 $outputRoot = File::Spec->cat path( $vol, $dir, $outputRoot );107 $outputRoot = File::Spec->catfile( $workdir, $outputRoot ); 104 108 $outputRoot = $ipprc->convert_filename_absolute( $outputRoot ); 105 109 $input_uri = $ipprc->convert_filename_absolute( $input_uri ); -
trunk/ippScripts/scripts/detrend_stack.pl
r11297 r11298 19 19 use Pod::Usage qw( pod2usage ); 20 20 21 my ($det_id, $iter, $class_id, $det_type, $camera, $dbname, $ no_update);21 my ($det_id, $iter, $class_id, $det_type, $camera, $dbname, $workdir, $no_update); 22 22 GetOptions( 23 23 'det_id|d=s' => \$det_id, … … 27 27 'camera|c=s' => \$camera, 28 28 'dbname|d=s' => \$dbname, # Database name 29 'workdir|w=s' => \$workdir, # Working directory, for output files 29 30 'no-update' => \$no_update 30 31 ) or pod2usage( 2 ); … … 75 76 } 76 77 77 my $example = ${$files}[0]->{uri}; # Example file 78 my ($vol, $dir, $file) = File::Spec->splitpath( $example ); 78 unless (defined $workdir) { 79 my $example = ${$files}[0]->{uri}; # Example file 80 my ($vol, $dir, $file) = File::Spec->splitpath( $example ); 81 $workdir = $dir; 82 } 79 83 80 84 # Stack the files 81 85 my $outputRoot = $camera . '.' . $det_type . '.' . $det_id . '.' . $iter . '.' . $class_id; # Root name 82 $outputRoot = File::Spec->cat path( $vol, $dir, $outputRoot );86 $outputRoot = File::Spec->catfile( $workdir, $outputRoot ); 83 87 $outputRoot = $ipprc->convert_filename_absolute($outputRoot); 84 88 my $outputStack = $outputRoot . '.fits'; # Output name -
trunk/ippScripts/scripts/phase2.pl
r11297 r11298 22 22 $input, # Input FITS file 23 23 $camera, # Camera 24 $outpath, # Outpath25 24 $dbname, # Database name 25 $workdir, # Working directory, for output files 26 26 $no_update # Don't update the database? 27 27 ); … … 31 31 'uri|u=s' => \$input, 32 32 'camera|c=s' => \$camera, 33 'outpath|o=s' => \$outpath,34 33 'dbname|d=s' => \$dbname, # Database name 34 'workdir|w=s' => \$workdir, 35 35 'no-update' => \$no_update 36 36 ) or pod2usage( 2 ); … … 43 43 and defined $classId 44 44 and defined $input 45 and defined $outpath46 45 and defined $camera; 47 46 … … 54 53 die "Can't find required tools.\n" if $missing_tools; 55 54 56 # XXX old verion Output file name 57 # XXX old version (drop) : my ($vol, $dir, $file) = File::Spec->splitpath( $input ); 55 unless (defined $workdir) { 56 my ($vol, $dir, $file) = File::Spec->splitpath( $input ); 57 $workdir = $dir; 58 } 58 59 59 60 ### Output file name --- must match camera configuration! 60 61 my $outputRoot = $expTag . '.p2'; 61 $outputRoot = File::Spec->cat path( $outpath, $outputRoot );62 $outputRoot = File::Spec->catfile( $workdir, $outputRoot ); 62 63 $outputRoot = $ipprc->convert_filename_absolute($outputRoot); 63 64 $input = $ipprc->convert_filename_absolute ( $input ); -
trunk/ippScripts/scripts/phase3.pl
r11297 r11298 19 19 use Pod::Usage qw( pod2usage ); 20 20 21 my ($exp_tag, $camera, $outpath, $dbname, $ no_update);21 my ($exp_tag, $camera, $outpath, $dbname, $workdir, $no_update); 22 22 GetOptions( 23 23 'exp_tag|e=s' => \$exp_tag, 24 24 'camera|c=s' => \$camera, 25 'outpath|o=s' => \$outpath,26 25 'dbname|d=s' => \$dbname, # Database name 26 'workdir|w=s' => \$workdir, 27 27 'no-update' => \$no_update 28 28 ) or pod2usage( 2 ); … … 98 98 } 99 99 100 # XXX old verison, drop 101 #my $example = ${$files}[0]->{b1_uri}; # Example filename 102 #my ($vol, $dir, $file) = File::Spec->splitpath( $example ); 100 unless (defined $workdir) { 101 my $example = ${$files}[0]->{b1_uri}; # Example filename 102 my ($vol, $dir, $file) = File::Spec->splitpath( $example ); 103 $workdir = $dir; 104 } 103 105 104 106 # Generate the file list, and get the statistics 105 107 my $outputRoot = $exp_tag . '.p3'; # Root output name 106 $outputRoot = File::Spec->cat path( $outpath, $outputRoot );108 $outputRoot = File::Spec->catfile( $workdir, $outputRoot ); 107 109 $outputRoot = $ipprc->convert_filename_absolute($outputRoot); 108 110 my $list1Name = $outputRoot . '.b1.list'; # Name for the input file list for binning 1
Note:
See TracChangeset
for help on using the changeset viewer.
