Changeset 36700 for trunk/pstamp/scripts/pstamp_checkdependent.pl
- Timestamp:
- Apr 29, 2014, 10:55:53 AM (12 years ago)
- File:
-
- 1 edited
-
trunk/pstamp/scripts/pstamp_checkdependent.pl (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pstamp/scripts/pstamp_checkdependent.pl
r36688 r36700 22 22 23 23 my $disable_3PI_updates = 1; 24 my $ra_max_3PI_hours = 21; # disable updates for skycells with ra greater than this (hours) 25 my $ra_max_3PI = $ra_max_3PI_hours * 15 / 180 * 3.14149; # rawExp.ra is in radians 24 26 25 27 # XXX: put this in a module somewhere … … 260 262 261 263 if ($disable_3PI_updates && ($chip->{data_group} =~ /ThreePi/)) { 262 # we are getting close to the end of PV2. Do not update PV1 chips. 263 print "3PI updates are currently disabled\n"; 264 return $PSTAMP_NOT_AVAILABLE; 264 # we are getting close to the end of PV2. Do not update PV1 chips if RA is above the limit. 265 my $ra = $chip->{ra}; 266 if (!defined($ra) or ($ra > $ra_max_3PI)) { 267 print "3PI updates are currently disabled for RA $ra > $ra_max_3PI (radians)\n"; 268 return $PSTAMP_NOT_AVAILABLE; 269 } else { 270 print "allowing 3PI updates RA $ra\n"; 271 } 265 272 } 266 273 … … 381 388 # we are getting close to the end of PV2. optionally do not update 3Pi data. 382 389 if ($disable_3PI_updates && ($metadata->{data_group} =~ /ThreePi/)) { 383 print "3PI updates are currently disabled\n"; 384 return $PSTAMP_NOT_AVAILABLE; 390 my $ra = $metadata->{ra}; 391 if (!defined $ra or ($ra > $ra_max_3PI)) { 392 print "3PI updates are currently disabled for RA $ra > $ra_max_3PI (radians)\n"; 393 return $PSTAMP_NOT_AVAILABLE; 394 } else { 395 print "allowing 3PI updates RA $ra\n"; 396 } 385 397 } 386 398 … … 465 477 } 466 478 $chip_id = $chip->{chip_id}; 479 # XXX: -scmap doesn't have ra and dec. Copy it from the warp 480 $chip->{ra} = $metadata->{ra}; 481 $chip->{decl} = $metadata->{decl}; 467 482 468 483 # if chip has been magicked before require it to be magicked again
Note:
See TracChangeset
for help on using the changeset viewer.
