IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 36201


Ignore:
Timestamp:
Oct 9, 2013, 4:53:45 PM (13 years ago)
Author:
heather
Message:

added feature of time range for P2/ST - doesnt work for ST yet, queue those seperately

Location:
trunk/ippToPsps
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippToPsps/config/changes.txt

    r35994 r36201  
    55
    66
     7alter table skychunk add trange_start timestamp after ST_cmf_version;
     8alter table skychunk add trange_end timestamp after trange_start;                   
     9
    710-- not yet alter table batch add column smf_version varchar(16) after comment;
  • trunk/ippToPsps/config/ippToPspsDbSchema.sql

    r35994 r36201  
    129129  `P2_smf_version` varchar(16) default NULL,
    130130  `ST_cmf_version` varchar(16) default NULL,
     131  `trange_start`  timestamp NOT NULL default '0000-00-00 00:00:00',
     132  `trange_end` timestamp NOT NULL default '0000-00-00 00:00:00', 
    131133  UNIQUE KEY `name` (`name`)
    132134) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  • trunk/ippToPsps/jython/dvo.py

    r36190 r36201  
    630630        maxDEC = boxDim['maxDEC'] + dD_border
    631631
     632        #find out if we use a time_range or not
     633        valid_trange_start = 0
     634        valid_trange_end = 0
     635        use_trange = 0
     636        if (self.skychunk.trange_start != '0000-00-00 00:00:00'):
     637            valid_trange_start = 1
     638        if (self.skychunk.trange_end != '0000-00-00 00:00:00'):
     639            valid_trange_end = 1             
     640
     641        if (valid_trange_start and valid_trange_end):
     642            use_trange = 1
     643
     644
    632645        # TODO path to DVO prog hardcoded temporarily
    633646        cmd = "dvopsps detections"
     
    646659            cmd += " -parallel"
    647660
     661        if use_trange:
     662            # make tranges valid for dvopsps
     663            time_start1 = self.skychunk.trange_start
     664            time_end1 = self.skychunk.trange_end
     665            time_start=re.sub('\s+',',',time_start1)
     666            time_end=re.sub('\s+',',',time_end1)
     667           
     668            # make command
     669            cmd += " -time-start " + time_start
     670            cmd += " -time-end " + time_end
     671   
    648672        self.logger.infoPair("Running dvopsps", cmd)
    649673        p = Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE)
  • trunk/ippToPsps/jython/gpc1db.py

    r35994 r36201  
    4949    NB this uses Bill's potentially temporary 'skycells' database when finding RA/Dec for stacks.
    5050    '''
    51     def getItemsInThisDVODbForThisStage(self, dvoDb, batchType, minRA=-999, maxRA=999, minDec=-999, maxDec=999):
     51    def getItemsInThisDVODbForThisStage(self, dvoDb, batchType, minRA=-999, maxRA=999, minDec=-999, maxDec=999, tstart="0000-00-00 00:00:00", tend = "0000-00-00 00:00:00"):
    5252
    5353        self.logger.debugPair("GPC1 RA range", "%.2f -> %.2f" % (minRA, maxRA))
    5454        self.logger.debugPair("GPC1 Dec range", "%.2f -> %.2f" % (minDec, maxDec))
    55 
     55       
    5656        rows = []
    5757
     
    8080                   AND addRun.state = 'full' \
    8181                   AND decl BETWEEN RADIANS(" + str(minDec) + ") AND RADIANS(" + str(maxDec) + ") \
    82                    AND ra BETWEEN RADIANS(" + str(minRA) + ") AND RADIANS(" + str(maxRA) + ")"
     82                   AND ra BETWEEN RADIANS(" + str(minRA) + ") AND RADIANS(" + str(maxRA) + ") \
     83                   AND dateobs >= '" + tstart + "'\
     84                   AND dateobs <= '" + tend  + "'"
    8385
    8486        elif batchType == "ST":       
  • trunk/ippToPsps/jython/ipptopspsdb.py

    r36099 r36201  
    11191119        ,P2_smf_version \
    11201120        ,ST_cmf_version \
     1121        ,trange_start \
     1122        ,trange_end \
    11211123        FROM skychunk \
    11221124        WHERE name = '" + self.skychunk.name + "'"
     
    11671169            self.skychunk.P2_smf_version = rs.getString(23)
    11681170            self.skychunk.ST_cmf_version = rs.getString(24)
     1171            self.skychunk.trange_start = rs.getString(25)
     1172            self.skychunk.trange_end = rs.getString(26)
    11691173
    11701174            if self.skychunk.parallel: print "USING parallel"
  • trunk/ippToPsps/jython/queue.py

    r35994 r36201  
    8686                            self.skychunk.maxRa,
    8787                            self.skychunk.minDec,
    88                             self.skychunk.maxDec)
     88                            self.skychunk.maxDec,
     89                            self.skychunk.trange_start,
     90                            self.skychunk.trange_end)
    8991                    rows = self.dvoObjects.allPopulatedRegionInfo
    9092                    self.dvoObjects.printSummary()
     
    98100                            self.skychunk.maxRa,
    99101                            self.skychunk.minDec,
    100                             self.skychunk.maxDec)
     102                            self.skychunk.maxDec,
     103                            self.skychunk.trange_start,
     104                            self.skychunk.trange_end)
    101105
    102106                # EAM TEST I/O
Note: See TracChangeset for help on using the changeset viewer.