IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 18536


Ignore:
Timestamp:
Jul 15, 2008, 9:57:30 AM (18 years ago)
Author:
bills
Message:

adapt to changes in dsreg

Location:
trunk/ippScripts/scripts
Files:
2 edited

Legend:

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

    r18433 r18536  
    22
    33# ipp_image_path.pl print out the unix path name(s) for rawImage files for an exposure
     4# Note this program should really be called gpc1_image_path since the camera is
     5# hardcoded to gpc1 and the telescope is gpc1
    46#
    57
     
    3941my $ota_num;
    4042if ($class_id) {
     43    # we accept class_id in 3 formats (all we care about is the number)
     44    # xy23
     45    # ota23
     46    # 23
    4147    $class_id = lc($class_id);
    4248    my $extra;
     
    6874    if ($from_registered) {
    6975        $query = "SELECT exp_id, class_id, uri FROM rawImfile"
    70                 . " WHERE exp_name = \'$exp_name\'";
     76                . " WHERE exp_name = \'$exp_name\'"
     77                . " AND camera = \'gpc1\' AND telescope = \'ps1\'";
    7178        $query .= " AND class_id = \'xy$ota_num\'" if ($ota_num);
    7279    } else {
    73         $query = "SELECT exp_id FROM newExp WHERE tmp_exp_name = ?";
     80        $query = "SELECT exp_id FROM newExp WHERE tmp_exp_name = ?"
     81                . " AND tmp_camera = \'gpc1\' AND tmp_telescope = \'ps1\'";
    7482        my $stmt = $dbh->prepare($query);
    7583        $stmt->execute($exp_name);
  • trunk/ippScripts/scripts/ipp_serial_mops.pl

    r18150 r18536  
    106106    }
    107107
    108     print $dsFile "${output}|ipp-mops\n";
     108    # format: filename|filesize|md5sum|filetype| 
     109    # note: since we omit filesize and md5sum, dsreg will calculate them
     110    print $dsFile "${output}|||ipp-mops|\n";
    109111}
    110112close $dsFile;
     
    112114# Register new files with the data store
    113115unless ($no_update) {
    114     my $command = "$dsreg --add --product mops_transient_detections --type MOPS_TRANSIENT_DETECTIONS --fileset $fileset --list $dsName --copy --abspath --dbname DataStore";
     116    my $command = "$dsreg --add $fileset --product mops_transient_detections --type MOPS_TRANSIENT_DETECTIONS --list $dsName --copy --abspath --dbname DataStore";
    115117    my $success = run( command => $command, verbose => $verbose );
    116118    die "Couldn't register files with data store.\n" unless $success;
Note: See TracChangeset for help on using the changeset viewer.