IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 38124


Ignore:
Timestamp:
Apr 14, 2015, 2:16:20 PM (11 years ago)
Author:
bills
Message:

change ps1sc date. apply date cuts on bycoord and byskycell requests for less priviledged users.

File:
1 edited

Legend:

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

    r38062 r38124  
    528528        # avoid error from print below if $id isn't needed
    529529        $row->{ID} = "" if !$row->{ID};
     530
     531        # if this user does not have unlimited access rights adjust the date cut
     532        # to avoid more recent data
     533        my $mjd_max;
     534        # We do not adjust dates for stacks since they are not well defined enough.
     535        # We'll need to filter them by accessLevel during the lookup
     536        if ($stage ne 'stack' and adjustDateCuts($row, \$mjd_max)) {
     537            # if lower limit was supplied by user we can leave the value alone
     538            if ($row->{MJD_MAX}) {
     539                if ($row->{MJD_MAX} > $mjd_max) {
     540                    print STDERR "Access rights require limiting MJD_MAX to $mjd_max\n";
     541                    $row->{MJD_MAX} = $mjd_max;
     542                }
     543            } else {
     544                # no limit supplied we silently adjust it
     545                $row->{MJD_MAX} = $mjd_max;
     546            }
     547        }
    530548    }
    531549   
     
    12251243
    12261244    my $MJD_PS1_BEGIN = 54922;    # 2009-04-01
    1227     my $MJD_PS1_END   = 56838;    # 2014-06-30      XXX get the actual date
     1245    my $MJD_PS1_END   = 57082;    # 2015-03-01
    12281246
    12291247    if ($row->{accessLevel} == 1) {
Note: See TracChangeset for help on using the changeset viewer.