IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 12614


Ignore:
Timestamp:
Mar 27, 2007, 5:18:07 PM (19 years ago)
Author:
Paul Price
Message:

No exp_type needed.

File:
1 edited

Legend:

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

    r12613 r12614  
    1414my ($camera,                    # Camera used
    1515    $telescope,                 # Telescope used
    16     $exp_type,                  # Type of exposure
    1716    $path,                      # Path to use
    1817    );
     
    2019           'camera|c=s' => \$camera,
    2120           'telescope|t=s' => \$telescope,
    22            'exp_type|e=s' => \$exp_type,
    2321           'path=s' => \$path,
    2422) or pod2usage( 2 );
    2523
    2624pod2usage(
    27           -msg => "Required options: --camera --telescope --exp_type --path",
     25          -msg => "Required options: --camera --telescope --path",
    2826          -exitval => 3,
    2927          ) unless scalar @ARGV == 0 or (defined $camera
    3028                                         and defined $telescope
    31                                          and defined $exp_type
    3229                                         and defined $path);
    3330
     
    4239    my @classes;
    4340    my $imfiles;
     41    my $add_dir;                # Add directory name to get file name?
    4442    if ($camera eq "MEGACAM") {
    4543        for (my $i = 0; $i < 36; $i++) {
     
    5250    } elsif ($camera eq "TC3") {
    5351        @classes = ( '00', '01', '10', '11', '20', '21', '30', '31' );
     52        $add_dir = 1;
    5453    } else {
    5554        die "Unrecognised camera name: $camera.\n";
     
    5756
    5857    foreach my $exp ( @ARGV ) {
    59         my $command = "$pxinject -newExp -exp_id $exp -inst $camera -telescope $telescope -exp_type $exp_type -imfiles " . (scalar @classes or 1) ; # Command to run
     58        my $command = "$pxinject -newExp -exp_id $exp -inst $camera -telescope $telescope -imfiles " . (scalar @classes or 1) ; # Command to run
    6059        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    6160            run( command => $command, verbose => 1 );
     
    6564        my $exp_tag = $line[2]; # The exposure tag
    6665        foreach my $class_id (@classes) {
    67             my $command = "$pxinject -newImfile -exp_tag $exp_tag -class chip -class_id $class_id -uri $path/$exp$class_id.fits"; # Command to run
     66            my $filename = "$exp$class_id.fits";
     67            $filename = File::Spec->catfile( $exp, $filename ) if defined $add_dir;
     68            $filename = File::Spec->catfile( $path, $filename);
     69            my $command = "$pxinject -newImfile -exp_tag $exp_tag -class chip -class_id $class_id -uri $filename"; # Command to run
    6870            my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    6971                run( command => $command, verbose => 1 );
     
    7274
    7375        if (scalar @classes == 0) {
    74             my $command = "$pxinject -newImfile -exp_tag $exp_tag -class fpa -class_id fpa -uri $path/$exp.fits"; # Command to run
     76            my $filename = "$exp$class_id.fits";
     77            $filename = File::Spec->catfile( $exp, $filename ) if defined $add_dir;
     78            $filename = File::Spec->catfile( $path, $filename);
     79            my $command = "$pxinject -newImfile -exp_tag $exp_tag -class fpa -class_id fpa -uri $filename"; # Command to run
    7580            my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    7681                run( command => $command, verbose => 1 );
Note: See TracChangeset for help on using the changeset viewer.