IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 29, 2014, 10:55:53 AM (12 years ago)
Author:
bills
Message:

To avoid conflicting with LAP processing, disable 3PI updates for RA > than some limit.
Currently 21hours.

File:
1 edited

Legend:

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

    r36688 r36700  
    2222
    2323my $disable_3PI_updates = 1;
     24my $ra_max_3PI_hours = 21;                              # disable updates for skycells with ra greater than this (hours)
     25my $ra_max_3PI = $ra_max_3PI_hours * 15 / 180 * 3.14149; # rawExp.ra is in radians
    2426
    2527# XXX: put this in a module somewhere
     
    260262
    261263        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            }
    265272        }
    266273
     
    381388    # we are getting close to the end of PV2. optionally do not update 3Pi data.
    382389    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        }
    385397    }
    386398
     
    465477        }
    466478        $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};
    467482
    468483        # if chip has been magicked before require it to be magicked again
Note: See TracChangeset for help on using the changeset viewer.