當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。