IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 4, 2007, 4:52:03 PM (19 years ago)
Author:
Paul Price
Message:

Major upgrade to allow use of Nebulous

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippScripts/scripts/ipp_simulation_data.pl

    r13122 r13275  
    1313use Pod::Usage qw( pod2usage );
    1414use 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                       );
    2324
    2425my $ipprc = PS::IPP::Config->new(); # IPP configuration
     
    2829    $telescope,                 # Telesceope name
    2930    $dbname,                    # Database name
     31    $path,                      # Path to data
    3032    $workdir,                   # Working directory for data
    3133    $no_update                  # Don't update the database
     
    3739           'telescope=s'   => \$telescope,
    3840           'dbname=s'      => \$dbname,
     41           'path=s'        => \$path,
    3942           'workdir=s'     => \$workdir,
    4043           'no-update'     => \$no_update,
     
    4447
    4548pod2usage(
    46           -msg => "Required options: --name --camera --telescope --dbname",
     49          -msg => "Required options: --name --path --camera --telescope --dbname",
    4750            -exitval => 3,
    4851          ) unless
    4952    defined $name and
     53    defined $path and
    5054    defined $camera and
    5155    defined $telescope and
    5256    defined $dbname;
    5357
     58$workdir = $path if not defined $workdir;
    5459
    5560# Look for programs we need
     
    6469    exit($PS_EXIT_CONFIG_ERROR);
    6570}
    66 
    67 $workdir = $ipprc->convert_filename_absolute( $workdir );
    6871
    6972# Number of bias images
     
    120123    my $basename;               # Output base filename
    121124    ( $basename, $counter ) = filename( $name, $counter );
    122     my $filename = File::Spec->catfile( $workdir, $basename ) if defined $workdir; # File name
     125    my $filename = caturi( $path, $basename );
    123126    run( command => "$ppSim -camera $camera -type BIAS $filename",
    124127         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 " .
    126129         "--dbname $dbname $basename",
    127130         verbose => 1 ) or die "Unable to inject file.";
     
    132135    my $basename;               # Output base filename
    133136    ( $basename, $counter ) = filename( $name, $counter );
    134     my $filename = File::Spec->catfile( $workdir, $basename ) if defined $workdir; # File name
     137    my $filename = caturi( $path, $basename );
    135138    run ( command => "$ppSim -camera $camera -type DARK -exptime $exptime $filename",
    136139          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 " .
    138141         "--dbname $dbname $basename",
    139142         verbose => 1 ) or die "Unable to inject file.";
     
    146149        my $basename;           # Output base filename
    147150        ( $basename, $counter ) = filename( $name, $counter );
    148         my $filename = File::Spec->catfile( $workdir, $basename ) if defined $workdir; # File name
     151        my $filename = caturi( $path, $basename );
    149152        run( command => "$ppSim -camera $camera -type FLAT -filter $filter -exptime $exptime $filename",
    150153             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 " .
    152155             "--dbname $dbname $basename",
    153156             verbose => 1 ) or die "Unable to inject file.";
     
    174177        my $basename;           # Output base filename
    175178        ( $basename, $counter ) = filename( $name, $counter );
    176         my $filename = File::Spec->catfile( $workdir, $basename ) if defined $workdir; # File name
     179        my $filename = caturi( $path, $basename );
    177180        run( command => "$ppSim -camera $camera -type OBJECT -filter $filter -exptime $exptime " .
    178181             "-skyrate $sky -ra $ra -dec $dec -pa $pa -scale $scale -zp $zp -seeing $seeing $filename",
    179182             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",
    182185             verbose => 1 ) or die "Unable to inject file.";
    183186    }
     
    199202}
    200203
    201 
    202 
    203 
    204204__END__
Note: See TracChangeset for help on using the changeset viewer.