当前位置: 首页>>代码示例>>Python>>正文


Python PropertySet.setLongLong方法代码示例

本文整理汇总了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)
开发者ID:jonathansick-shadow,项目名称:ctrl_dc3pipe,代码行数:28,代码来源:ExposureMetadataStage.py

示例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)
开发者ID:jonathansick-shadow,项目名称:ctrl_dc3pipe,代码行数:29,代码来源:ExposureMetadataStage.py


注:本文中的lsst.daf.base.PropertySet.setLongLong方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。