本文整理匯總了Python中lsst.daf.base.PropertySet.setLongLong方法的典型用法代碼示例。如果您正苦於以下問題:Python PropertySet.setLongLong方法的具體用法?Python PropertySet.setLongLong怎麽用?Python PropertySet.setLongLong使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類lsst.daf.base.PropertySet
的用法示例。
在下文中一共展示了PropertySet.setLongLong方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: process
# 需要導入模塊: from lsst.daf.base import PropertySet [as 別名]
# 或者: from lsst.daf.base.PropertySet import setLongLong [as 別名]
def process(self):
clipboard = self.inputQueue.getNextDataset()
eventName = self._policy.get("inputEvent")
event = clipboard.get(eventName)
visitId = event.get("visitId")
exposureId = event.get("exposureId")
ccdId = clipboard.get("ccdId")
ampId = clipboard.get("ampId")
fpaExposureId = (long(visitId) << 1) + exposureId
ccdExposureId = (fpaExposureId << 8) + ccdId
ampExposureId = (ccdExposureId << 6) + ampId
clipboard.put("visitId", visitId)
exposureMetadata = PropertySet()
exposureMetadata.setInt("filterId",
self.lookupFilterId(event.get("filter")))
exposureMetadata.setLongLong("fpaExposureId", fpaExposureId)
exposureMetadata.setLongLong("ccdExposureId", ccdExposureId)
exposureMetadata.setLongLong("ampExposureId", ampExposureId)
clipboard.put("exposureMetadata" + str(exposureId), exposureMetadata)
self.outputQueue.addDataset(clipboard)
示例2: preprocess
# 需要導入模塊: from lsst.daf.base import PropertySet [as 別名]
# 或者: from lsst.daf.base.PropertySet import setLongLong [as 別名]
def preprocess(self):
self.activeClipboard = self.inputQueue.getNextDataset()
eventName = self._policy.get("inputEvent")
event = self.activeClipboard.get(eventName)
visitId = event.get("visitId")
exposureId = event.get("exposureId")
fpaExposureId = (long(visitId) << 1) + exposureId
visit = PropertySet()
visit.setInt("visitId", visitId)
visit.setLongLong("exposureId", fpaExposureId)
self.activeClipboard.put("visit" + str(exposureId), visit)
rawFpaExposure = PropertySet()
rawFpaExposure.setLongLong("rawFPAExposureId", fpaExposureId)
rawFpaExposure.set("ra", event.get("ra"))
rawFpaExposure.set("decl", event.get("decl"))
rawFpaExposure.set("filterId",
self.lookupFilterId(event.get("filter")))
rawFpaExposure.set("equinox", event.get("equinox"))
rawFpaExposure.set("dateObs", DateTime(event.get("dateObs")))
rawFpaExposure.set("mjdObs", DateTime(event.get("dateObs")).mjd())
rawFpaExposure.set("expTime", event.get("expTime"))
rawFpaExposure.set("airmass", event.get("airmass"))
self.activeClipboard.put("fpaExposure" + str(exposureId), rawFpaExposure)