Changeset 13275 for trunk/ippScripts/scripts/ipp_simulation_data.pl
- Timestamp:
- May 4, 2007, 4:52:03 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/ipp_simulation_data.pl (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/ipp_simulation_data.pl
r13122 r13275 13 13 use Pod::Usage qw( pod2usage ); 14 14 use PS::IPP::Config qw( 15 $PS_EXIT_SUCCESS 16 $PS_EXIT_UNKNOWN_ERROR 17 $PS_EXIT_SYS_ERROR 18 $PS_EXIT_CONFIG_ERROR 19 $PS_EXIT_PROG_ERROR 20 $PS_EXIT_DATA_ERROR 21 $PS_EXIT_TIMEOUT_ERROR 22 ); 15 $PS_EXIT_SUCCESS 16 $PS_EXIT_UNKNOWN_ERROR 17 $PS_EXIT_SYS_ERROR 18 $PS_EXIT_CONFIG_ERROR 19 $PS_EXIT_PROG_ERROR 20 $PS_EXIT_DATA_ERROR 21 $PS_EXIT_TIMEOUT_ERROR 22 caturi 23 ); 23 24 24 25 my $ipprc = PS::IPP::Config->new(); # IPP configuration … … 28 29 $telescope, # Telesceope name 29 30 $dbname, # Database name 31 $path, # Path to data 30 32 $workdir, # Working directory for data 31 33 $no_update # Don't update the database … … 37 39 'telescope=s' => \$telescope, 38 40 'dbname=s' => \$dbname, 41 'path=s' => \$path, 39 42 'workdir=s' => \$workdir, 40 43 'no-update' => \$no_update, … … 44 47 45 48 pod2usage( 46 -msg => "Required options: --name -- camera --telescope --dbname",49 -msg => "Required options: --name --path --camera --telescope --dbname", 47 50 -exitval => 3, 48 51 ) unless 49 52 defined $name and 53 defined $path and 50 54 defined $camera and 51 55 defined $telescope and 52 56 defined $dbname; 53 57 58 $workdir = $path if not defined $workdir; 54 59 55 60 # Look for programs we need … … 64 69 exit($PS_EXIT_CONFIG_ERROR); 65 70 } 66 67 $workdir = $ipprc->convert_filename_absolute( $workdir );68 71 69 72 # Number of bias images … … 120 123 my $basename; # Output base filename 121 124 ( $basename, $counter ) = filename( $name, $counter ); 122 my $filename = File::Spec->catfile( $workdir, $basename ) if defined $workdir; # File name125 my $filename = caturi( $path, $basename ); 123 126 run( command => "$ppSim -camera $camera -type BIAS $filename", 124 127 verbose => 1 ) or die "Unable to run ppSim"; 125 run( command => "$inject --camera $camera --telescope $telescope -- workdir $workdir " .128 run( command => "$inject --camera $camera --telescope $telescope --path $path --workdir $workdir " . 126 129 "--dbname $dbname $basename", 127 130 verbose => 1 ) or die "Unable to inject file."; … … 132 135 my $basename; # Output base filename 133 136 ( $basename, $counter ) = filename( $name, $counter ); 134 my $filename = File::Spec->catfile( $workdir, $basename ) if defined $workdir; # File name137 my $filename = caturi( $path, $basename ); 135 138 run ( command => "$ppSim -camera $camera -type DARK -exptime $exptime $filename", 136 139 verbose => 1 ) or die "Unable to run ppSim"; 137 run( command => "$inject --camera $camera --telescope $telescope -- workdir $workdir " .140 run( command => "$inject --camera $camera --telescope $telescope --path $path --workdir $workdir " . 138 141 "--dbname $dbname $basename", 139 142 verbose => 1 ) or die "Unable to inject file."; … … 146 149 my $basename; # Output base filename 147 150 ( $basename, $counter ) = filename( $name, $counter ); 148 my $filename = File::Spec->catfile( $workdir, $basename ) if defined $workdir; # File name151 my $filename = caturi( $path, $basename ); 149 152 run( command => "$ppSim -camera $camera -type FLAT -filter $filter -exptime $exptime $filename", 150 153 verbose => 1 ) or die "Unable to run ppSim"; 151 run( command => "$inject --camera $camera --telescope $telescope -- workdir $workdir " .154 run( command => "$inject --camera $camera --telescope $telescope --path $path --workdir $workdir " . 152 155 "--dbname $dbname $basename", 153 156 verbose => 1 ) or die "Unable to inject file."; … … 174 177 my $basename; # Output base filename 175 178 ( $basename, $counter ) = filename( $name, $counter ); 176 my $filename = File::Spec->catfile( $workdir, $basename ) if defined $workdir; # File name179 my $filename = caturi( $path, $basename ); 177 180 run( command => "$ppSim -camera $camera -type OBJECT -filter $filter -exptime $exptime " . 178 181 "-skyrate $sky -ra $ra -dec $dec -pa $pa -scale $scale -zp $zp -seeing $seeing $filename", 179 182 verbose => 1 ) or die "Unable to run ppSim"; 180 run( command => "$inject --camera $camera --telescope $telescope -- workdir $workdir " .181 "--dbname $dbname $basename ",183 run( command => "$inject --camera $camera --telescope $telescope --path $path --workdir $workdir " . 184 "--dbname $dbname $basename", 182 185 verbose => 1 ) or die "Unable to inject file."; 183 186 } … … 199 202 } 200 203 201 202 203 204 204 __END__
Note:
See TracChangeset
for help on using the changeset viewer.
