IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 13, 2007, 6:03:39 PM (19 years ago)
Author:
Paul Price
Message:

Need to fix filter for finding matches when there's square brackets in
it --- they need to be escaped in the string.

File:
1 edited

Legend:

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

    r13643 r13826  
    129129            my $fileLevel = $imfile->{filelevel};
    130130            my $entry = "";
    131             if ($fileLevel eq "chip") {
     131            if (lc($fileLevel) eq "chip") {
    132132                my $class_id = $imfile->{class_id};
    133133                my $chipRoot = $ipprc->file_resolve( $imfile->{chip_path_base} );
     
    136136                print STDERR "class: $class_id, chiproot: $chipRoot, extname: $extname\n";
    137137               
    138                 $entry = "$psastroRootFile\[$extname\]";
     138                $entry = $psastroRootFile . '\[' . $extname . '\]';
    139139            } else {
    140140                $entry = "$psastroRootFile";
    141141            }
     142
    142143            my @skycells = &select_skycells ($entry, @matchlist);
    143144            foreach my $skycell (@skycells) {
     
    150151                push @overlaps, \%overlap;
    151152               
    152                 printf STDERR "overlap: %s : %s\n", $skycell, $imfile->{cam_id};
     153                printf STDERR "overlap: %s : %s , %s\n", $skycell, $imfile->{cam_id}, $imfile->{class_id};
    153154               
    154155                # generate a unique list of the skycells
     
    204205close $overlapFile;
    205206
     207system "cat $overlapName";
     208
    206209# Add the processed file to the database
    207210unless ($no_update) {
     
    232235sub select_skycells
    233236{
    234     my $entry = shift;
    235     my @list = @_;
    236 
    237     my $skycell;
     237    my $entry = shift;          # File+Ext to search for
     238    my @list = @_;              # List of "File+Ext : skycell"
     239
    238240    my @skycells = ();
    239241
    240242    foreach my $line (@list) {
    241243        if ($line =~ m|$entry|) {
    242             ($skycell) = $line =~ m|$entry\S*\s+:\s+(\S+)|;
     244            my ($skycell) = $line =~ m|$entry\S*\s+:\s+(\S+)|;
    243245            push @skycells, $skycell;
    244246        }
Note: See TracChangeset for help on using the changeset viewer.