IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 29, 2012, 2:15:01 PM (14 years ago)
Author:
eugene
Message:

merge changes from trunk

Location:
branches/eam_branches/ipp-20120905
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20120905

  • branches/eam_branches/ipp-20120905/pstamp/scripts

  • branches/eam_branches/ipp-20120905/pstamp/scripts/psmkreq

    r34466 r34735  
    5252my $comment;
    5353
    54 my $survey_name = 'null';
    55 my $release = 'null';
    56 my $stack_type = 'null';
    57 my $bgrestore;
    58 my $jpeg;
    59 my $nocompress;
    60 
    6154my $missing_tools;
    6255my $pstamp_request_file  = can_run('pstamp_request_file')  or (warn "Can't find required program pstamp_request_file"  and $missing_tools = 1);
     
    7568    'width=i'           => \$width,
    7669    'height=i'          => \$height,
    77 # pixcenter is deprecated
    78 #    'pixcenter'         => \$pixcenter,
     70    'pixcenter'         => \$pixcenter,
    7971    'arcseconds'        => \$arcseconds,
    8072    'coord_mask=i'      => \$coord_mask,
     
    9587    'comment=s'         => \$comment,
    9688
    97     # new columns for version 2
    98     'survey=s'          => \$survey_name,
    99     'release=s'         => \$release,
    100     'stack_type'        => \$stack_type,
    101 
    10289    'option_mask=i'     => \$option_mask,
    10390    'image'             => \$image,
    10491    'mask'              => \$mask,
    10592    'variance'          => \$variance,
    106     'sources'           => \$cmf,
     93    'cmf'               => \$cmf,
    10794    'psf'               => \$psf,
    10895    'backmdl'           => \$backmdl,
     
    11299    'do_not_wait'       => \$no_wait,
    113100
    114     # new options for version 2
    115     'no_compress'       => \$nocompress,
    116     'bgrestore'         => \$bgrestore,
    117 
    118101    'verbose'           => \$verbose,
    119102    'save-temps'        => \$save_temps,
     
    127110
    128111pod2usage( -msg => "Invalid job_type: $job_type", -exitval =>1 )
    129         unless ($job_type eq 'stamp' or $job_type eq 'get_image' or $job_type eq 'listtargets');
    130 
    131 if (($job_type eq 'stamp') or ($job_type eq 'listtargets')) {
     112        unless ($job_type eq 'stamp' or $job_type eq 'get_image');
     113
     114if ($job_type eq 'stamp') {
    132115    if (defined $list) {
    133116        pod2usage( -msg => "--ra --dec --x --y are not used with --list", -exitval =>1 )
     
    169152$id = 0 if !$id;
    170153
    171 
    172 unless (($job_type eq 'listtargets' and $stage eq 'exposure') or $stage eq 'raw' or $stage eq 'chip' or $stage eq 'warp' or $stage eq 'diff' or $stage eq 'stack') {
    173     die "$stage is not a valid stage for $job_type jobs\n";
     154unless ($stage eq 'raw' or $stage eq 'chip' or $stage eq 'warp' or $stage eq 'diff' or $stage eq 'stack') {
     155    die "$stage is not a valid value for stage\n";
    174156}
    175157
     
    225207} else {
    226208    $rows = [];
    227     push @$rows, buildRow("", $comment, $x, $y, $filter, $mjd_min, $mjd_max, $survey_name, $release, $stack_type);
     209    push @$rows, buildRow("", $comment, $x, $y, $filter, $mjd_min, $mjd_max);
    228210}
    229211
    230212my ($tdf, $table_def_name) = tempfile ("/tmp/tabledef.XXXX", UNLINK => !$save_temps);
    231 print $tdf "$req_name 2\n";
     213print $tdf "$req_name 1\n";
    232214my $rownum = 0;
    233215foreach my $row (@$rows) {
    234216    $rownum++;
    235217    my $line = "$rownum $row->{ra}\t$row->{dec}\t$width $height"
    236         . " $coord_mask $job_type $option_mask $project $row->{survey_name} $row->{release} $req_type"
     218        . " $coord_mask $job_type $option_mask $project $req_type"
    237219        . " $stage $id $tess_id $component $data_group"
    238         . " $row->{filter} $row->{mjd_min} $row->{mjd_max} $row->{stack_type}";
     220        . " $row->{filter} $row->{mjd_min} $row->{mjd_max}";
    239221
    240222    if ($row->{comment} and $row->{comment} ne '') {
     
    248230}
    249231close $tdf;
    250 
    251 system "cat $table_def_name";
    252 #exit 0;
    253232
    254233{
     
    298277    $row->{dec}     = checkDEC($vals[1], $linenumber);
    299278    $row->{filter}  = checkFilter($vals[2], $filter, $linenumber);
    300     $row->{mjd_min} = checkMJD($vals[3], $mjd_min, $linenumber);
    301     $row->{mjd_max} = checkMJD($vals[4], $mjd_max, $linenumber);
    302     $row->{survey_name}  = $vals[5];
    303     $row->{release} = $vals[6];
    304     $row->{stack_type} = $vals[7];
     279    $row->{mjd_min} = checkMJD($vals[3], $mjd_min, $linenumber);;
     280    $row->{mjd_max} = checkMJD($vals[4], $mjd_max, $linenumber);;
    305281    $row->{comment} = $comment;
    306282
  • branches/eam_branches/ipp-20120905/pstamp/scripts/pstamp_checkdependent.pl

    r34466 r34735  
    262262        } elsif ($chip->{state} eq 'goto_cleaned') {
    263263
    264             if ($chip->{data_state} eq 'full') {
    265                 # cleanup has been queued, but has not yet finished. (cleanup pantasks is probably stopped)
    266                 # Since this chip is in full go ahead and set the run to state update and change the label.
     264            # we don't need to check for full data_state
     265            # if ($chip->{data_state} eq 'full') {
     266            {
     267                # cleanup must not be running. Set state to update. If this chip is not 'full' it will be
     268                # set to be updated the next time this script is invoked
    267269                # XXX: In the very rare case that this chip run is actually in the running cleanup pantasks
    268270                # queue things may get confused but we can live with that
     
    341343    }
    342344}
     345
     346    my $tess_id = $metadata->{tess_id};
     347    if ($tess_id eq 'RINGS.V0') {
     348        # we have stopped updating data from RINGS.V0
     349        return $PSTAMP_GONE
     350    }
    343351    if (($state =~ /error/) or ($state =~ /purged/) or ($state =~ /scrubbed/) or ($state eq 'drop') or
    344352         ($data_state =~ /error/) or ($data_state =~ /purged/) or ($data_state =~ /scrubbed/) or ($data_state eq 'drop')) {
     
    365373    my $skycell = $metadata;
    366374
    367     if ($skycell->{state} eq 'goto_cleaned' and $skycell->{data_state} eq 'full') {
    368         # cleanup has been queued, but hasn't been done. it's "safe" to set the state back to full
    369         # XXX: seem comments in check_states_chip
     375    # if ($skycell->{state} eq 'goto_cleaned' and $skycell->{data_state} eq 'full') {
     376    if ($skycell->{state} eq 'goto_cleaned') {
     377        # cleanup has been queued, but hasn't finished, probably due to an error or cleanup is not running.
     378        # It's "safe" to set the state to update. If the skycell is not full it will be set to update
     379        # the next time this task runs
    370380        my $command = "$warptool -updaterun -set_state update -warp_id $warp_id";
    371381        $command .= " -set_label $rlabel" if $rlabel;
     
    468478    my $skycell_id = $skycell->{skycell_id};
    469479
    470     if ($metadata->{state} eq 'goto_cleaned' and $metadata->{data_state} eq 'full') {
     480    # if ($metadata->{state} eq 'goto_cleaned' and $metadata->{data_state} eq 'full') {
     481    if ($metadata->{state} eq 'goto_cleaned') {
     482        # cleanup must not be running. Set state to update. If the skycell is not 'full' it will be
     483        # set to be updated the next time this script is invoked
    471484        print "changing state of diffRun $diff_id from goto_cleaned to update. skycell $skycell_id is full\n";
    472485        my $command = "$difftool -updaterun -set_state update -diff_id $diff_id";
Note: See TracChangeset for help on using the changeset viewer.