IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 19761 for trunk/pstamp/scripts


Ignore:
Timestamp:
Sep 25, 2008, 2:06:31 PM (18 years ago)
Author:
bills
Message:

get project information from database

Location:
trunk/pstamp/scripts
Files:
2 edited

Legend:

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

    r19279 r19761  
    163163        # unless $exp_id is null (e.g. stack images) get the metadata for this exposure
    164164        my ($row, $req_info, $project) = get_request_info($rows, $rownum);
    165         my ($image_db) = resolve_project($project);
     165        my $proj_hash = resolve_project($project);
     166        my $image_db = $proj_hash->{dbname};
    166167        my $exp_info = get_exposure_info($image_db, $exp_id);
    167168
  • trunk/pstamp/scripts/pstampparse.pl

    r19278 r19761  
    143143
    144144    $stamp_name = "" if $stamp_name eq "null";
     145    $class_id = "" if ($class_id eq "null" or $class_id eq "all");
    145146   
    146147    # XXX: TODO: sanity check all parameters
     
    151152    # trash the request.
    152153    die "job_type is list_uri but mode is $mode" if ($job_type eq "list_uri") and ($mode ne "list_uri");
    153     my ($image_db, $lookup_class_id, $camera, $magic_required ) = resolve_project($project, $img_type, $class_id);
     154
     155    my $proj_hash = resolve_project($ipprc, $project, $dbname);
     156    die "project $project not found\n" unless $proj_hash;
     157
     158    my $image_db = $proj_hash->{dbname};
     159    my $camera = $proj_hash->{camera};
     160    my $need_magic = $proj_hash->{need_magic};
    154161
    155162    my $roi_string;
     
    182189
    183190    # Call PStamp::Job's locate_images routinte to get the parameters for this request specification
    184     my $images = locate_images($ipprc, $image_db, $req_type, $img_type, $id, $lookup_class_id,
     191    my $images = locate_images($ipprc, $image_db, $req_type, $img_type, $id, $class_id,
    185192            $x, $y, $mjd_min, $mjd_max, $filter);
    186193
     
    217224    } else {
    218225        my $args = $roi_string ? $roi_string : "";
    219         $args .= " -class_id $class_id" if ($class_id and ($class_id ne "null"));
     226        $args .= " -class_id $class_id" if $class_id;
    220227
    221228        # sequence number for the the job for a request spec. Not to be confused with job_id
    222229        my $job_num = 0;
    223230
    224         # XXX for raw and chip level images and class_id "null" if there are multiple images
     231        # XXX TODO: for raw and chip level images and class_id "null" if there are multiple images
    225232        # use -list instead of -file
    226233        foreach my $image (@$images) {
     
    248255
    249256            # XXX sounds like magic will be handled outside of the postage stamp server
    250             #if ($magic_required) {
     257            #if ($need_magic) {
    251258            #    die "no magic mask available" if ! $image->{magic_mask};
    252259            #    $args .= " -magic_mask $image->{magic_mask}"
Note: See TracChangeset for help on using the changeset viewer.