IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 25, 2020, 5:26:50 PM (6 years ago)
Author:
mhuber
Message:

add PROJECT, COMPONENT_ID, TESS_ID and modifications to allow for gpc2 in dquery and add restrictions to prevent oddities

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pstamp/scripts/detect_query_read

    r40747 r41440  
    8383my ($EXTVER,$headerEXTNAME,$QUERY_ID,
    8484    $FPA_ID,$MJD_OBS,$FILTER,
    85     $OBSCODE,$STAGE) =
     85    $OBSCODE,$STAGE,$COMPONENT_ID,$PROJECT,$TESS_ID) =
    8686    ($inHeader->{EXTVER},$inHeader->{EXTNAME},$inHeader->{QUERY_ID},
    8787     $inHeader->{FPA_ID},$inHeader->{'MJD-OBS'},$inHeader->{FILTER},
    88      $inHeader->{OBSCODE},$inHeader->{STAGE});
     88     $inHeader->{OBSCODE},$inHeader->{STAGE},$inHeader->{COMPONENT_ID},
     89     $inHeader->{PROJECT},$inHeader->{TESS_ID});
    8990
    9091unless(defined($EXTVER) && defined($headerEXTNAME) &&
     
    126127    # v2 stage: stage name to perform query on, allowed values of 'chip', 'warp', 'stack', and 'diff'
    127128    { name => 'STAGE', type => '20A', writetype => TSTRING, version => 2, default => $STAGE },
     129    #
     130    { name => 'COMPONENT_ID', type => '20A', writetype => TSTRING, version => 2, default => $COMPONENT_ID },
     131    #
     132    { name => 'PROJECT', type => '16A', writetype => TSTRING, version => 2, default => $PROJECT },   
     133    #
     134    { name => 'TESS_ID', type => '64A', writetype => TSTRING, version => 2, default => $TESS_ID },
    128135];
    129136
     
    203210                my ($key,$type,$value) = @line;
    204211#               print "$entry => $key / $type / $value \n";
     212                # if gpc2 then needs .00002
    205213                if ($key =~ /filter/i) {
    206214                    $value =~ s/.00000//;
     
    215223        # HACK!
    216224        my $mjd = $colData{FPA_ID}[$i];
     225        # need to remove g for gpc2
    217226        $mjd =~ s/o(....)g.*/$1/;
    218227        $mjd += 50000;
     
    227236        my $ra = $colData{'RA1_DEG'}[$i];
    228237        my $dec = $colData{'DEC1_DEG'}[$i];
     238        # if gpc2 then .00002
    229239        my $filter = $colData{'FILTER'}[$i] . ".00000";
    230240        my $cmd;
     
    294304
    295305# Verify uniqueness of important columns:
     306# -- need to add PROJECT as well?
    296307my @unique_fields = ('QUERY_ID','OBSCODE','STAGE');
    297308foreach my $colName (@unique_fields) {
Note: See TracChangeset for help on using the changeset viewer.