IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 26289


Ignore:
Timestamp:
Nov 29, 2009, 3:17:29 PM (16 years ago)
Author:
bills
Message:

various changes to the postage stamp server.

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm

    r26242 r26289  
    4343    my $mjd_max  = shift;
    4444    my $filter   = shift;
    45     my $label    = shift;
     45    my $data_group    = shift;
    4646    my $verbose  = shift;
    4747
     
    128128    }
    129129
    130     my $results = lookup($ipprc, $image_db, $req_type, $img_type, $id, $tess_id, $component, $need_magic, $x, $y, $dateobs_begin, $dateobs_end, $filter, $label, $verbose);
     130    my $results = lookup($ipprc, $image_db, $req_type, $img_type, $id, $tess_id, $component, $need_magic, $x, $y, $dateobs_begin, $dateobs_end, $filter, $data_group, $verbose);
    131131
    132132    return $results;
     
    148148    my $dateobs_end   = shift;
    149149    my $filter = shift;
    150     my $label = shift;
     150    my $data_group = shift;
    151151    my $verbose  = shift;
    152152
     
    281281
    282282    $command .= " -filter $filter" if !isnull($filter);
    283     $command .= " -label $label" if !isnull($label);
     283    $command .= " -data_group $data_group" if !isnull($data_group);
    284284
    285285    # run the tool and parse the output
  • trunk/pstamp/scripts/pstamp_check_dependents.pl

    r25957 r26289  
    2525use PS::IPP::PStamp::Job qw( :standard );
    2626
    27 my ( $dep_id, $dep_state, $stage, $stage_id, $imagedb, $rlabel, $no_magic, $dbname, $dbserver);
     27my ( $dep_id, $dep_state, $stage, $stage_id, $imagedb, $no_magic, $dbname, $dbserver);
    2828my ( $no_update, $verbose, $save_temps, $logfile);
    2929
     
    3434           'stage_id=s'     => \$stage_id,
    3535           'imagedb=s'      => \$imagedb,
    36            'rlabel=s'       => \$rlabel,
    3736           'no-magic=s'     => \$no_magic,
    3837           'dbname=s'       => \$dbname,
     
    4645pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
    4746
    48 die "--dep_id --state --stage --stage_id --imagedb and --rlabel are requried \n"
    49     if !$dep_id or !$dep_state or !$stage or !$stage_id or !$imagedb or !$rlabel;
     47die "--dep_id --state --stage --stage_id and --imagedb are requried \n"
     48    if !$dep_id or !$dep_state or !$stage or !$stage_id or !$imagedb;
    5049
    5150my $ipprc = PS::IPP::Config->new(); # IPP Configuration
     
    103102    } else {
    104103
    105         # XXX: TODO set label to the "standard" update value
    106 
    107104        # don't update if in runs are in state goto_cleaned, wait for clean to finish
    108105        if ($state eq "cleaned") {
    109             runcommand("$chiptool -dbname $imagedb -chip_id $stage_id -updaterun -set_state update");
    110         }
    111 
    112         # don't update yet if magicDSRuns are in state goto_purged, wait for purge to finish
    113         if ($magic_ds_state eq "purged") {
     106            runcommand("$chiptool -dbname $imagedb -chip_id $stage_id -updaterun -set_state update -set_label update");
     107        }
     108
     109        # don't update yet if magicDSRuns are in state goto_cleaned, wait for purge to finish
     110        if ($magic_ds_state eq "cleaned") {
    114111            my $magic_ds_id = $run_state->{magic_ds_id};
    115112            runcommand("$magicdstool -dbname $imagedb -magic_ds_id $magic_ds_id -updaterun -set_state new");
     
    145142    } else {
    146143
    147         # XXX: TODO set label to the "standard" update value
    148 
    149144        # don't update if in runs are in state goto_cleaned, wait for clean to finish
    150145        if ($state eq 'cleaned') {
    151             runcommand("$warptool -dbname $imagedb -warp_id $stage_id -updaterun -set_state update");
     146            runcommand("$warptool -dbname $imagedb -warp_id $stage_id -updaterun -set_state update -set_label update");
    152147        }
    153148
    154149        if ($chip_state eq 'cleaned') {
    155150            my $chip_id = $run_state->{chip_id};
    156             runcommand("$chiptool -dbname $imagedb -chip_id $chip_id -updaterun -set_state update");
    157         }
    158 
    159         # don't update yet if magicDSRuns are in state goto_purged, wait for purge to finish
    160         if ($magic_ds_state eq 'purged') {
     151            runcommand("$chiptool -dbname $imagedb -chip_id $chip_id -updaterun -set_state update -set_label update");
     152        }
     153
     154        # don't update yet if magicDSRuns are in state goto_cleaned, wait for purge to finish
     155        if ($magic_ds_state eq 'cleaned') {
    161156            my $magic_ds_id = $run_state->{magic_ds_id};
    162157            runcommand("$magicdstool -dbname $imagedb -magic_ds_id $magic_ds_id -updaterun -set_state new");
     
    190185        }
    191186        return join "", @$stdout_buf if defined wantarray();
     187        return $success;
    192188    } else {
    193189        print STDERR "skipping $command\n";
    194190    }
     191    return 1;
    195192}
    196193
  • trunk/pstamp/scripts/pstamp_finish.pl

    r26048 r26289  
    315315    my $comment = $row->{COMMENT};
    316316    $comment = "null" if !$comment;
    317     my $label = $row->{LABEL};
    318     $label = "null" if !$label;
     317    my $data_group = $row->{DATA_GROUP};
     318    if (!defined $data_group) {
     319        # XXX: backwards compatibility hook. Remove "soon".
     320        $data_group = $row->{LABEL};
     321    }
     322    $data_group = "null" if !$data_group;
    319323
    320324    # This is ugly, error prone and hard to change.
    321325    # Create a results file module and provide a list of the names (we have the data in the columns)
    322326    my $rowinfo = "$row->{PROJECT}|$row->{JOB_TYPE}|$row->{REQ_TYPE}|$row->{IMG_TYPE}|";
    323     $rowinfo   .= "$row->{ID}|$tess_id|$component|$label|$row->{OPTION_MASK}|$row->{MJD_MIN}|$row->{MJD_MAX}|";
     327    $rowinfo   .= "$row->{ID}|$tess_id|$component|$data_group|$row->{OPTION_MASK}|$row->{MJD_MIN}|$row->{MJD_MAX}|";
    324328    $rowinfo   .= "$row->{REQFILT}|$row->{COORD_MASK}|$row->{CENTER_X}|$row->{CENTER_Y}|";
    325329    $rowinfo   .= "$row->{WIDTH}|$row->{HEIGHT}|";
  • trunk/pstamp/scripts/pstamp_request_file

    r25736 r26289  
    6969        { name => 'COMPONENT',  type => '64A', writetype => TSTRING },
    7070
    71         { name => 'LABEL ',     type => '64A', writetype => TSTRING },
     71        { name => 'DATA_GROUP ',type => '64A', writetype => TSTRING },
    7272
    7373        { name => 'REQFILT',    type => '16A', writetype => TSTRING },
     
    324324    print "  REQ_NAME EXTVER\n\n";
    325325    print "REQUEST specification (1 or more lines). Format:\n\n";
    326     print "  ROWNUM CENTER_X CENTER_Y WIDTH HEIGHT COORD_MASK JOB_TYPE OPTION_MASK PROJECT REQ_TYPE IMG_TYPE ID TESS_ID COMPONENT LABEL REQFILT MJD_MIN MJD_MAX | COMMENT\n\n";
     326    print "  ROWNUM CENTER_X CENTER_Y WIDTH HEIGHT COORD_MASK JOB_TYPE OPTION_MASK PROJECT REQ_TYPE IMG_TYPE ID TESS_ID COMPONENT DATA_GROUP REQFILT MJD_MIN MJD_MAX | COMMENT\n\n";
    327327
    328328    exit 0;
  • trunk/pstamp/scripts/pstamp_results_file.pl

    r25739 r26289  
    9090        { name => 'TESS_ID',    type => '64A', writetype => TSTRING },   
    9191        { name => 'COMPONENT',  type => '64A', writetype => TSTRING },   
    92         { name => 'LABEL',      type => '64A', writetype => TSTRING },   
     92        { name => 'DATA_GROUP', type => '64A', writetype => TSTRING },   
    9393
    9494        # output parameters
  • trunk/pstamp/scripts/pstampparse.pl

    r26242 r26289  
    193193    my $mjd_min = $row->{MJD_MIN};
    194194    my $mjd_max = $row->{MJD_MAX};
    195     my $label   = $row->{LABEL};
     195    my $data_group = $row->{DATA_GROUP};
     196    if (!defined $data_group) {
     197        # backwards compatability hook
     198        $data_group = $row->{LABEL};
     199    }
     200       
    196201    my $x       = $row->{CENTER_X};
    197202    my $y       = $row->{CENTER_Y};
     
    272277    # request specification. An array reference is returned.
    273278    $imageList = locate_images($ipprc, $image_db, $req_type, $stage, $id, $tess_id, $search_component,
    274                 $inverse, $need_magic, $x, $y, $mjd_min, $mjd_max, $filter, $label, $verbose);
     279                $inverse, $need_magic, $x, $y, $mjd_min, $mjd_max, $filter, $data_group, $verbose);
    275280
    276281    if (!$imageList or !@$imageList) {
     
    424429                    # set up to queue an update run
    425430                    queue_update_run(\$newState, \$fault, \$dep_id, $image->{image_db},
    426                         $run_state, $stage, $image->{stage_id}, $need_magic, $image->{label});
     431                        $run_state, $stage, $image->{stage_id}, $need_magic);
    427432                }
    428433            }
     
    548553                # we collected a set of sky coordinates above.
    549554                # filter the images so that only those that contain the centers of the ROIs are processed
    550                 my $command = "$dvoImagesAtCoords $pointsListName";
     555                my $command = "$dvoImagesAtCoords -coords $pointsListName";
    551556                if ($have_skycells) {
    552557                    my $tess_id = $thisRun->[0]->{tess_id};
     
    671676                    # set up to queue an update run
    672677                    queue_update_run(\$newState, \$fault, \$dep_id, $image->{image_db},
    673                         $run_state, $stage, $image->{stage_id}, $need_magic, $image->{label});
     678                        $run_state, $stage, $image->{stage_id}, $need_magic);
    674679                }
    675680            }
     
    801806    return 0 if ($r1->{TESS_ID}  ne $r2->{TESS_ID});
    802807    return 0 if ($r1->{REQFILT}  ne $r2->{REQFILT});
    803     return 0 if ($r1->{LABEL}    ne $r2->{LABEL});
     808    return 0 if ($r1->{DATA_GROUP}    ne $r2->{DATA_GROUP});
    804809    return 0 if ($r1->{MJD_MIN}  ne $r2->{MJD_MAX});
    805810    return 0 if ($r1->{MJD_MAX}  ne $r2->{MJD_MAX});
     
    850855sub queue_update_run
    851856{
    852     my ($r_jobState, $r_fault, $r_dep_id, $imagedb, $state, $stage, $stage_id, $need_magic, $label) = @_;
     857    my ($r_jobState, $r_fault, $r_dep_id, $imagedb, $state, $stage, $stage_id, $need_magic) = @_;
    853858
    854859    if (($state ne 'cleaned') and ($state ne 'update') and ($state ne 'goto_cleaned')) {
     
    858863    my $dep_id;
    859864    my $command = "$pstamptool -getdependent -stage $stage -stage_id $stage_id -imagedb $imagedb";
    860     $command .= " -rlabel $label" if $label;
    861865    $command .= " -no_magic" if !$need_magic;
    862866    if (!$no_update) {
  • trunk/pstamp/src/pstamprequest.c

    r25709 r26289  
    1919    "REQ_TYPE", // byid,  byexp, bydiff, bycoord
    2020    "ID",       // db id, exposure name, diff_image_id, n/a
    21     "CLASS_ID",
     21    "COMPONENT",
    2222    "REQFILT",
    2323    "STAMP_NAME",
     
    126126    switch (getType(argnum, pArgc, argv, options, "ID")) {
    127127    case PSTAMP_RAW:
    128         getId("CLASS_ID", argnum, pArgc, argv, options);
     128        getId("COMPONENT", argnum, pArgc, argv, options);
    129129        break;
    130130    case PSTAMP_CHIP:
    131         getId("CLASS_ID", argnum, pArgc, argv, options);
     131        getId("COMPONENT", argnum, pArgc, argv, options);
    132132        break;
    133133    case PSTAMP_WARP:
     
    145145    switch (getType(argnum, pArgc, argv, options, "ID")) {
    146146    case PSTAMP_RAW:
    147         getId("CLASS_ID", argnum, pArgc, argv, options);
     147        getId("COMPONENT", argnum, pArgc, argv, options);
    148148        break;
    149149    case PSTAMP_CHIP:
    150         getId("CLASS_ID", argnum, pArgc, argv, options);
     150        getId("COMPONENT", argnum, pArgc, argv, options);
    151151        break;
    152152    case PSTAMP_WARP:
     
    163163    switch (getType(argnum, pArgc, argv, options, NULL)) {
    164164    case PSTAMP_RAW:
    165         getId("CLASS_ID", argnum, pArgc, argv, options);
     165        getId("COMPONENT", argnum, pArgc, argv, options);
    166166        break;
    167167    case PSTAMP_CHIP:
    168         getId("CLASS_ID", argnum, pArgc, argv, options);
     168        getId("COMPONENT", argnum, pArgc, argv, options);
    169169        break;
    170170    case PSTAMP_WARP:
  • trunk/pstamp/test/ps1-0905001-all.txt

    r26242 r26289  
    1010
    1111# REQ_NAME      EXTVER
    12 byskycell_test     1
     12CHANGEME          1
    1313
    1414# subsequent lines define the rows in the table
    1515
    16 # If ROWNUM is set to zero, pstamp_request_file will set insert a value for each row beginning with 1
    17 # If a later input row reuses one of the automatically assigned values an error is reported.
    18 
    1916
    2017# ID    |     ROI Specification                   |  JOB Specification | Images of interest specification
    21 # ROWNUM CENTER_X         CENTER_Y         WIDTH HEIGHT COORD_MASK JOB_TYPE OPTION_MASK PROJECT REQ_TYPE IMG_TYPE    ID   TESS_ID COMPONENT    LABEL     REQFILT MJD_MIN MJD_MAX | COMMENT
     18# ROWNUM CENTER_X         CENTER_Y         WIDTH HEIGHT COORD_MASK JOB_TYPE OPTION_MASK PROJECT REQ_TYPE IMG_TYPE    ID   TESS_ID COMPONENT DIST_GROUP     REQFILT MJD_MIN MJD_MAX | COMMENT
    2219#
    2320# various looks at the location of SN candidate PS1-0905001
    24 1         243.035580     55.128140          250   250      2        stamp       63        gpc1    byid     raw   70853         null   null       null        null    0      0    |PS1-0905001 r
    25 2         243.035580     55.128140          250   250      2        stamp       63       gpc1    byid     chip  20272         null   null  MD08.200905.v1   null    0      0    |PS1-0905001 r
     211         243.035580     55.128140          250   250      2        stamp       63       gpc1    byid     raw   70853         null   null       null        null    0      0    |PS1-0905001 r
     222         243.035580     55.128140          250   250      2        stamp       63       gpc1    byid     chip  20272         null   null       null        null    0      0    |PS1-0905001 r
    2623
    2724# 3 and 4 will fail because the weight images was damaged by the destreaking
    2825# process
    29 3         243.035580     55.128140          250   250      2        stamp       63       gpc1    byid     warp  6323          null   null  MD08.200905.v1   null    0      0    |PS1-0905001 r
    30 4         243.035580     55.128140          250   250      2        stamp       63       gpc1    byid     diff  16880         null   null  MD08.200905.v1   null    0      0    |PS1-0905001 r
     263         243.035580     55.128140          250   250      2        stamp       63       gpc1    byid     warp  6323          null   null       null        null    0      0    |PS1-0905001 r
     274         243.035580     55.128140          250   250      2        stamp       63       gpc1    byid     diff  16880         null   null       null        null    0      0    |PS1-0905001 r
    3128# these will work
    32 103       243.035580     55.128140          250   250      2        stamp       59       gpc1    byid     warp  6323          null   null  MD08.200905.v1   null    0      0    |PS1-0905001 r
    33 104       243.035580     55.128140          250   250      2        stamp       59       gpc1    byid     diff  16880         null   null  MD08.200905.v1   null    0      0    |PS1-0905001 r
     29103       243.035580     55.128140          250   250      2        stamp       59       gpc1    byid     warp  6323          null   null       null        null    0      0    |PS1-0905001 r
     30104       243.035580     55.128140          250   250      2        stamp       59       gpc1    byid     diff  16880         null   null       null        null    0      0    |PS1-0905001 r
    3431
    35 5         243.035580     55.128140          250   250      2        stamp       63       gpc1    byid     stack 14032         null   null  null             null    0      0    |PS1-0905001 r
     325         243.035580     55.128140          250   250      2        stamp       63       gpc1    byid     stack 14032         null   null       null        null    0      0    |PS1-0905001 r
    3633
    37346         243.035580     55.128140          250   250      2        stamp       1        gpc1    byexp    raw   o4973g0133o   null   null       null        null    0      0    |PS1-0905001 r
    38 7         243.035580     55.128140          250   250      2        stamp       1        gpc1    byexp    chip  o4973g0133o   null   null  MD08.200905.v1   null    0      0    |PS1-0905001 r
    39 8         243.035580     55.128140          250   250      2        stamp       1        gpc1    byexp    warp  o4973g0133o   null   null  MD08.200905.v1   null    0      0    |PS1-0905001 r
    40 9         243.035580     55.128140          250   250      2        stamp       1        gpc1    byexp    diff  o4973g0133o   null   null  MD08.200905.v1   null    0      0    |PS1-0905001 r
     357         243.035580     55.128140          250   250      2        stamp       1        gpc1    byexp    chip  o4973g0133o   null   null  MD08.2009110     null    0      0    |PS1-0905001 r
     368         243.035580     55.128140          250   250      2        stamp       1        gpc1    byexp    warp  o4973g0133o   null   null  MD08.2009110     null    0      0    |PS1-0905001 r
     379         243.035580     55.128140          250   250      2        stamp       1        gpc1    byexp    diff  o4973g0133o   null   null  MD08.2009110     null    0      0    |PS1-0905001 r
    4138
    4239
Note: See TracChangeset for help on using the changeset viewer.