IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 15, 2007, 2:23:33 PM (19 years ago)
Author:
Paul Price
Message:

Adding --no-op option which turns off processing (so one can track only the database work flow) for everything except the phase 0 scripts (need to have some real data in the database in order to track it).

File:
1 edited

Legend:

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

    r11829 r11837  
    3232use Pod::Usage qw( pod2usage );
    3333
    34 my ($det_id, $dbname, $workdir, $no_update);
     34my ($p4_id, $dbname, $workdir, $no_update, $no_op);
    3535GetOptions(
    3636    'p4_id|i=s'         => \$p4_id, # Phase 4 identifier
    3737    'dbname|d=s'        => \$dbname, # Database name
    3838    'workdir|w=s'       => \$workdir, # Working directory, for output files
    39     'no-update'         => \$no_update
     39    'no-update'         => \$no_update, # Don't update the database?
     40    'no-op'             => \$no_op, # Don't do any operations
    4041) or pod2usage( 2 );
    4142
     
    6768    }
    6869
     70    my $mdcParser = PS::IPP::Metadata::Config->new;     # Parser for metadata config files
    6971    my $metadata = $mdcParser->parse(join "", @$stdout_buf) or
    7072        &my_die("Unable to parse metadata config doc", $p4_id, $PS_EXIT_PROG_ERROR);
     
    7375}
    7476
     77unless ($no_op) {
     78
    7579### Calculates, in some as-yet unknown way the overlaps between imfiles and skycells
    7680
    77 # Add in the skycell and tesselation for each imfile
    78 foreach my $imfile (@$imfiles) {
    79     $imfile->{skycell_id} = 'default';
    80     $imfile->{tess_id} = 'default';
     81} else {
     82    # Add in the skycell and tesselation for each imfile
     83    foreach my $imfile (@$imfiles) {
     84        $imfile->{skycell_id} = 'default';
     85        $imfile->{tess_id} = 'default';
     86    }
    8187}
    82 
     88   
    8389
    8490# Generate a MDC file with the overlaps
    8591$workdir = $ipprc->convert_filename_absolute( $workdir );
    86 my $overlapName = File::Spec->catfile( $workdir, $p4_id . ".overlap.mdc" );
    87 open my $overlapFile "> $overlapName" or
     92my $overlapName = File::Spec->catfile( $workdir, $p4_id . '.overlap.mdc' );
     93open my $overlapFile, "> $overlapName" or
    8894    &my_die("Unable to open mdc file $overlapName", $p4_id, $PS_EXIT_DATA_ERROR);
    8995print $overlapFile "p4SkyCellMap MULTI\n\n";
Note: See TracChangeset for help on using the changeset viewer.