Changeset 12657 for trunk/ippScripts/scripts/ipp_serial_inject_mosaic.pl
- Timestamp:
- Mar 28, 2007, 3:07:41 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/ipp_serial_inject_mosaic.pl
r12617 r12657 25 25 -msg => "Required options: --camera --telescope --workdir", 26 26 -exitval => 3, 27 ) unless scalar @ARGV == 0 or ( defined $camera 28 and defined $telescope 29 and defined $workdir ); 27 ) unless defined $camera and defined $telescope and defined $workdir; 30 28 31 29 my $ipprc = PS::IPP::Config->new(); # IPP configuration … … 38 36 # Inject new data into the database 39 37 if (scalar @ARGV != 0) { 40 my @classes; 38 my @classes; # Names of the classes 39 my @files; # What to add to the filename for each class 41 40 my $imfiles; 42 41 my $add_dir; # Add directory name to get file name? 43 42 if ($camera eq "MEGACAM") { 44 43 for (my $i = 0; $i < 36; $i++) { 45 push @classes, sprintf(".ccd%02d", $i); 44 push @classes, sprintf("ccd%02d", $i); 45 push @files, sprintf(".ccd%02d", $i); 46 46 } 47 47 } elsif ($camera eq "MCSHORT") { 48 @classes = ( '.ccd12', '.ccd13', '.ccd14', '.ccd21', '.ccd22', '.ccd23' ); 48 @classes = ( 'ccd12', 'ccd13', 'ccd14', 'ccd21', 'ccd22', 'ccd23' ); 49 @files = ( '.ccd12', '.ccd13', '.ccd14', '.ccd21', '.ccd22', '.ccd23' ); 50 49 51 } elsif ($camera eq "CTIO_MOSAIC2") { 50 52 @classes = (); 53 @files = (); 51 54 } elsif ($camera eq "TC3") { 52 @classes = ( '00', '01', '10', '11', '20', '21', '30', '31' ); 55 @classes = ( 'CCID58-1-06b2', 'CCID45-1-14A', 'CCID45-1-11A', 'CCID45-1-22A', 56 'CCID45-1-04C', 'CCID45-1-13A', 'CCID45-1-05A', 'CCID45-1-19A' ); 57 @files = ( '00', '01', '10', '11', '20', '21', '30', '31' ); 53 58 $add_dir = 1; 54 59 } else { … … 64 69 my @line = split(/\s+/, $$stdout_buf[0]); # The output line, containing the exposure tag 65 70 my $exp_tag = $line[2]; # The exposure tag 66 foreach my $class_id (@classes) { 67 my $filename = "$exp$class_id.fits"; 71 for (my $i = 0; $i < scalar @classes; $i++) { 72 my $class_id = $classes[$i]; 73 my $file_id = $files[$i]; 74 my $filename = "$exp$file_id.fits"; 68 75 $filename = File::Spec->catfile( $exp, $filename ) if defined $add_dir; 69 76 $filename = File::Spec->catfile( $workdir_abs, $filename);
Note:
See TracChangeset
for help on using the changeset viewer.
