IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 20220


Ignore:
Timestamp:
Oct 17, 2008, 9:40:59 AM (18 years ago)
Author:
bills
Message:

set chipname column for raw images to class_id

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pstamp/scripts/pstamp_get_image_job.pl

    r18543 r20220  
    106106    my $pathname = shift @fields;
    107107    my $filetype = shift @fields;
     108    my $class_id = shift @fields;
    108109
    109110    ($pathname , my $filename) = resolvepath($pathname);
     
    121122
    122123    # XXX is pstamp always the right file type, if not where can we get the right one?
    123     print REGLIST file_registration_line($filename, $dest_path, $filetype);
     124    print REGLIST file_registration_line($filename, $dest_path, $filetype, $class_id);
    124125
    125126    foreach my $f (@fields) {
     
    136137    my $pathname = $_[0];
    137138
     139    # use the basename of the unresolved file as the name of the file
     140    # in order to avoid nebulous name mangled paths in the datastore
     141    my $file = basename($pathname);
     142
    138143    my $slash = index($pathname, "/");
    139144    if ($slash != 0) {
     
    141146            $ipprc = PS::IPP::Config->new();
    142147        }
    143         $pathname = $ipprc->convert_filename_absolute($pathname);
     148        $pathname = $ipprc->file_resolve($pathname);
    144149    }
    145150
    146     my $file = basename($pathname);
    147151
    148152    return ($pathname, $file);
     
    154158    my $path     = shift;
    155159    my $filetype = shift;
     160    my $chipname = shift;
     161    $chipname = $chipname ? "$chipname|" : "";
     162
    156163    if (-e $path) {
    157164        my @finfo = stat($path);
     
    160167        my $md5sum = file_md5_hex($path);
    161168
    162         return "$filename|$bytes|$md5sum|$filetype|";
     169        return "$filename|$bytes|$md5sum|$filetype|$chipname";
    163170    } else {
    164171        die "$filename not found at $path";
Note: See TracChangeset for help on using the changeset viewer.