IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 29895


Ignore:
Timestamp:
Dec 1, 2010, 12:51:46 PM (15 years ago)
Author:
bills
Message:

Allow the user to supply an exp_name. Add a new file type for Megacam

File:
1 edited

Legend:

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

    r24201 r29895  
    2424# Parse the command-line arguments
    2525my ($camera, $telescope, $workdir, $reduction, $dvo_db, $tess_id, $end_stage, $label, $dbname, $no_op, $help);
     26my $exp_name;
    2627GetOptions('camera|i=s'     => \$camera,    # user-supplied camera name
    2728           'telescope|t=s'  => \$telescope, # user-supplied telescope name
     29           'exp_name|=s'    => \$exp_name,  # user-supplied exp_name name
    2830           'workdir|w=s'    => \$workdir,   # working directory for output files
    2931           'reduction=s'    => \$reduction, # user-supplied camera name
     
    7981}
    8082
    81 # use the first file name as the exp_name (strip off .fits)
     83# if not supplied, use the first file name as the exp_name (strip off .fits)
    8284my $num = 0;
    83 my $exp_name;
    8485foreach my $file ( @ARGV ) {
    8586    # check for file existence
     
    8990        # strip off the extension
    9091        my ( $vol, $path, $name ) = File::Spec->splitpath( $file );
    91         ( $exp_name ) = $name =~ /(.*)\.(fits|fit|fts)(|.gz)/;
     92        ( $exp_name ) = $name =~ /(.*)\.(fits|fit|fts|flt)(|.gz)/;
    9293        print "exp_name : $exp_name.\n";
    9394    }
Note: See TracChangeset for help on using the changeset viewer.