IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 2, 2007, 3:22:15 PM (19 years ago)
Author:
Paul Price
Message:

Allowing use of multiple tessellations.

File:
1 edited

Legend:

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

    r13159 r13168  
    108108    # Calculate the overlaps between imfiles and skycells
    109109
    110     # The tess_id is the catdir used to define the tessalation
    111     my $command = "ppConfigDump -camera $camera -dump-recipe PSWARP -";
    112     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    113         run(command => $command, verbose => 1);
    114     unless ($success) {
    115         $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
    116         &my_die("Unable to perform ppConfigDump: $error_code", $error_code);
    117     }
    118     my $parser = PS::IPP::Metadata::Config->new;        # Parser for metadata config files
    119     my $recipe = $parser->parse( join '', @$stdout_buf);
    120     my @tesselations = split(/\s+/, metadataLookupStr($recipe, 'DVO.TESSELLATION')); # List of tessellations
    121     foreach my $tess_id ( @tesselations ) {
    122         print STDERR "tessellation: $tess_id\n";
     110    my $tessellations = $ipprc->tessellations(); # Hash of defined tessellations
     111    foreach my $tess_id ( keys %$tessellations ) {
     112        my $tess_dir = $$tessellations{$tess_id};
     113        print STDERR "tessellation: $tess_id, $tess_dir\n";
    123114
    124115        my $imfile = $imfiles->[0];
     
    131122       
    132123        # run the dvoImageOverlaps program to get the overlaps with this image
    133         my $command = "dvoImageOverlaps -D CATDIR $tess_id $psastroFile";
     124        my $command = "dvoImageOverlaps -D CATDIR $tess_dir $psastroFile";
    134125        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    135126            run(command => $command, verbose => 1);
     
    140131        my @matchlist = split ('\n', (join "", @$stdout_buf));
    141132       
    142         # The command "dvoImageOverlaps -D CATDIR tessalation (megacam)" returns:
     133        # The command "dvoImageOverlaps -D CATDIR tessellation (megacam)" returns:
    143134        # 729534pa.cmf[ccd00.hdr]  :  skycell.051.fits
    144135        # PSASTRO.OUTPUT[CMF.HEAD] : SKYCELL
     
    187178            system "mkdir -p $skyDir" unless -d $skyDir;
    188179            my $skyFile = File::Spec->catfile( $skyDir , $skycell_id );
    189             my $command = "dvoImageExtract -D CATDIR $tess_id $skycell_id -o $skyFile";
     180            my $command = "dvoImageExtract -D CATDIR $tess_dir $skycell_id -o $skyFile";
    190181            my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    191182                run(command => $command, verbose => 1);
Note: See TracChangeset for help on using the changeset viewer.