本文整理汇总了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)