Changeset 34735 for branches/eam_branches/ipp-20120905/pstamp/scripts
- Timestamp:
- Nov 29, 2012, 2:15:01 PM (14 years ago)
- Location:
- branches/eam_branches/ipp-20120905
- Files:
-
- 4 edited
-
. (modified) (1 prop)
-
pstamp/scripts (modified) (1 prop)
-
pstamp/scripts/psmkreq (modified) (9 diffs)
-
pstamp/scripts/pstamp_checkdependent.pl (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20120905
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20120905/pstamp/scripts
- Property svn:mergeinfo changed
/trunk/pstamp/scripts merged: 34595,34597,34611,34716
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20120905/pstamp/scripts/psmkreq
r34466 r34735 52 52 my $comment; 53 53 54 my $survey_name = 'null';55 my $release = 'null';56 my $stack_type = 'null';57 my $bgrestore;58 my $jpeg;59 my $nocompress;60 61 54 my $missing_tools; 62 55 my $pstamp_request_file = can_run('pstamp_request_file') or (warn "Can't find required program pstamp_request_file" and $missing_tools = 1); … … 75 68 'width=i' => \$width, 76 69 'height=i' => \$height, 77 # pixcenter is deprecated 78 # 'pixcenter' => \$pixcenter, 70 'pixcenter' => \$pixcenter, 79 71 'arcseconds' => \$arcseconds, 80 72 'coord_mask=i' => \$coord_mask, … … 95 87 'comment=s' => \$comment, 96 88 97 # new columns for version 298 'survey=s' => \$survey_name,99 'release=s' => \$release,100 'stack_type' => \$stack_type,101 102 89 'option_mask=i' => \$option_mask, 103 90 'image' => \$image, 104 91 'mask' => \$mask, 105 92 'variance' => \$variance, 106 ' sources'=> \$cmf,93 'cmf' => \$cmf, 107 94 'psf' => \$psf, 108 95 'backmdl' => \$backmdl, … … 112 99 'do_not_wait' => \$no_wait, 113 100 114 # new options for version 2115 'no_compress' => \$nocompress,116 'bgrestore' => \$bgrestore,117 118 101 'verbose' => \$verbose, 119 102 'save-temps' => \$save_temps, … … 127 110 128 111 pod2usage( -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 114 if ($job_type eq 'stamp') { 132 115 if (defined $list) { 133 116 pod2usage( -msg => "--ra --dec --x --y are not used with --list", -exitval =>1 ) … … 169 152 $id = 0 if !$id; 170 153 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"; 154 unless ($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"; 174 156 } 175 157 … … 225 207 } else { 226 208 $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); 228 210 } 229 211 230 212 my ($tdf, $table_def_name) = tempfile ("/tmp/tabledef.XXXX", UNLINK => !$save_temps); 231 print $tdf "$req_name 2\n";213 print $tdf "$req_name 1\n"; 232 214 my $rownum = 0; 233 215 foreach my $row (@$rows) { 234 216 $rownum++; 235 217 my $line = "$rownum $row->{ra}\t$row->{dec}\t$width $height" 236 . " $coord_mask $job_type $option_mask $project $r ow->{survey_name} $row->{release} $req_type"218 . " $coord_mask $job_type $option_mask $project $req_type" 237 219 . " $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}"; 239 221 240 222 if ($row->{comment} and $row->{comment} ne '') { … … 248 230 } 249 231 close $tdf; 250 251 system "cat $table_def_name";252 #exit 0;253 232 254 233 { … … 298 277 $row->{dec} = checkDEC($vals[1], $linenumber); 299 278 $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);; 305 281 $row->{comment} = $comment; 306 282 -
branches/eam_branches/ipp-20120905/pstamp/scripts/pstamp_checkdependent.pl
r34466 r34735 262 262 } elsif ($chip->{state} eq 'goto_cleaned') { 263 263 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 267 269 # XXX: In the very rare case that this chip run is actually in the running cleanup pantasks 268 270 # queue things may get confused but we can live with that … … 341 343 } 342 344 } 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 } 343 351 if (($state =~ /error/) or ($state =~ /purged/) or ($state =~ /scrubbed/) or ($state eq 'drop') or 344 352 ($data_state =~ /error/) or ($data_state =~ /purged/) or ($data_state =~ /scrubbed/) or ($data_state eq 'drop')) { … … 365 373 my $skycell = $metadata; 366 374 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 370 380 my $command = "$warptool -updaterun -set_state update -warp_id $warp_id"; 371 381 $command .= " -set_label $rlabel" if $rlabel; … … 468 478 my $skycell_id = $skycell->{skycell_id}; 469 479 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 471 484 print "changing state of diffRun $diff_id from goto_cleaned to update. skycell $skycell_id is full\n"; 472 485 my $command = "$difftool -updaterun -set_state update -diff_id $diff_id";
Note:
See TracChangeset
for help on using the changeset viewer.
