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


Python DAPloaders.runLrauvLoader方法代码示例

本文整理汇总了Python中DAPloaders.runLrauvLoader方法的典型用法代码示例。如果您正苦于以下问题:Python DAPloaders.runLrauvLoader方法的具体用法?Python DAPloaders.runLrauvLoader怎么用?Python DAPloaders.runLrauvLoader使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DAPloaders的用法示例。


在下文中一共展示了DAPloaders.runLrauvLoader方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: loadTethys

# 需要导入模块: import DAPloaders [as 别名]
# 或者: from DAPloaders import runLrauvLoader [as 别名]
    def loadTethys(self, stride=None):
        '''
        Tethys specific load functions
        '''
        pName = 'tethys'
        stride = stride or self.stride
        for (aName, f) in zip([ a + getStrideText(stride) for a in self.tethys_files], self.tethys_files):
            url = self.tethys_base + f
            dataStartDatetime = None
            startDatetime = self.tethys_startDatetime
            endDatetime = self.tethys_endDatetime
            if self.args.append:
                # Return datetime of last timevalue - if data are loaded from multiple
                # activities return the earliest last datetime value
                dataStartDatetime = InstantPoint.objects.using(self.dbAlias).filter(
                                            activity__name=aName).aggregate(
                                            Max('timevalue'))['timevalue__max']

            try:
                DAPloaders.runLrauvLoader(url, self.campaignName, self.campaignDescription, aName,
                                          pName, self.colors['tethys'], 'auv', 'AUV mission',
                                          self.tethys_parms, self.dbAlias, stride,
                                          grdTerrain=self.grdTerrain, dataStartDatetime=dataStartDatetime,
                                          endDatetime=endDatetime, startDatetime=startDatetime, timezone='America/New_York')
            except DAPloaders.NoValidData:
                self.logger.info("No valid data in %s" % url)

        self.addPlatformResources('http://stoqs.mbari.org/x3d/lrauv/lrauv_tethys.x3d', pName)
开发者ID:brutzman,项目名称:stoqs,代码行数:30,代码来源:__init__.py

示例2: loadTethys

# 需要导入模块: import DAPloaders [as 别名]
# 或者: from DAPloaders import runLrauvLoader [as 别名]
    def loadTethys(self, stride=None):
        '''
        Tethys specific load functions
        '''
        stride = stride or self.stride
        for (aName, file) in zip([ a + getStrideText(stride) for a in self.tethys_files], self.tethys_files):
            url = self.tethys_base + file
            dataStartDatetime = None
            if self.args.append:
                # Return datetime of last timevalue - if data are loaded from multiple activities return the earliest last datetime value
                dataStartDatetime = InstantPoint.objects.using(self.dbAlias).filter(activity__name=aName).aggregate(Max('timevalue'))['timevalue__max']

            DAPloaders.runLrauvLoader(url, self.campaignName, self.campaignDescription, aName, 'Tethys', self.colors['tethys'], 'auv', 'AUV mission', 
                                        self.tethys_parms, self.dbAlias, stride, grdTerrain=self.grdTerrain, dataStartDatetime=dataStartDatetime)
开发者ID:Brett-Rankin,项目名称:stoqs,代码行数:16,代码来源:__init__.py

示例3: loadMakai

# 需要导入模块: import DAPloaders [as 别名]
# 或者: from DAPloaders import runLrauvLoader [as 别名]
    def loadMakai(self, stride=None):
        '''
        Makai specific load functions
        '''
        stride = stride or self.stride
        for (aName, file) in zip([ a + getStrideText(stride) for a in self.makai_files], self.makai_files):
            url = self.makai_base + file
            dataStartDatetime = None
            startDatetime = self.makai_startDatetime 
            endDatetime = self.makai_endDatetime 
            if self.args.append:
                # Return datetime of last timevalue - if data are loaded from multiple activities return the earliest last datetime value
                dataStartDatetime = InstantPoint.objects.using(self.dbAlias).filter(activity__name=aName).aggregate(Max('timevalue'))['timevalue__max']

            try:
                # Set stride to 1 for telemetered data
                DAPloaders.runLrauvLoader(url, self.campaignName, self.campaignDescription, aName, 'Makai', self.colors['makai'], 'auv', 'AUV mission',
                                        self.makai_parms, self.dbAlias, stride, grdTerrain=self.grdTerrain, dataStartDatetime=dataStartDatetime,
					endDatetime=endDatetime, startDatetime=startDatetime)
            except DAPloaders.NoValidData as e:
                self.logger.info("No valid data in %s" % url)
开发者ID:josephmfaulkner,项目名称:stoqs,代码行数:23,代码来源:__init__.py

示例4: loadTethys

# 需要导入模块: import DAPloaders [as 别名]
# 或者: from DAPloaders import runLrauvLoader [as 别名]
    def loadTethys(self, stride=None):
        '''
        Tethys specific load functions
        '''
        pName = 'tethys'
        stride = stride or self.stride
        for (aName, f) in zip([ a + getStrideText(stride) for a in self.tethys_files], self.tethys_files):
            url = self.tethys_base + f
            # shorten the activity names
            aName = aName.rsplit('/', 1)[-1]

            try:
                DAPloaders.runLrauvLoader(url, self.campaignName, self.campaignDescription, aName,
                                          pName, self.colors['tethys'], 'auv', 'AUV mission',
                                          self.tethys_parms, self.dbAlias, stride,
                                          grdTerrain=self.grdTerrain, command_line_args=self.args, 
                                          timezone='America/New_York')
            except DAPloaders.NoValidData:
                self.logger.info("No valid data in %s" % url)

        self.addPlatformResources('http://stoqs.mbari.org/x3d/lrauv/lrauv_tethys.x3d', pName)
开发者ID:carueda,项目名称:stoqs,代码行数:23,代码来源:__init__.py

示例5: int

# 需要导入模块: import DAPloaders [as 别名]
# 或者: from DAPloaders import runLrauvLoader [as 别名]
            if args.append:
                # Return datetime of last timevalue - if data are loaded from multiple activities return the earliest last datetime value
                dataStartDatetime = InstantPoint.objects.using(args.database).filter(activity__name=aName).aggregate(Max('timevalue'))['timevalue__max']

            try:
                if not args.debug:
                    logger.info("Instantiating Lrauv_Loader for url = %s", url_src)
                    lrauvLoad = DAPloaders.runLrauvLoader(cName = args.campaign,
                                                      cDesc = None,
                                                      aName = aName,
                                                      aTypeName = 'LRAUV mission',
                                                      pName = platformName,
                                                      pTypeName = 'auv',
                                                      pColor = colors[platformName],
                                                      url = url_src,
                                                      parmList = parm_list,
                                                      dbAlias = args.database,
                                                      stride = int(args.stride),
                                                      startDatetime = startDatetime,
                                                      dataStartDatetime = dataStartDatetime,
                                                      endDatetime = endDatetime,
                                                      contourUrl = args.contourUrl,
                                                      auxCoords = coord)

                endDatetimeUTC = pytz.utc.localize(endDatetime)
                endDatetimeLocal = endDatetimeUTC.astimezone(pytz.timezone('America/Los_Angeles'))
                startDatetimeUTC = pytz.utc.localize(startDatetime)
                startDatetimeLocal = startDatetimeUTC.astimezone(pytz.timezone('America/Los_Angeles'))

                # format contour output file name replacing file extension with .png
                if args.outDir.startswith('/tmp'):
开发者ID:josephmfaulkner,项目名称:stoqs,代码行数:33,代码来源:monitorLrauv.py

示例6: int

# 需要导入模块: import DAPloaders [as 别名]
# 或者: from DAPloaders import runLrauvLoader [as 别名]
                core_aName = aName.split('_')[0]
                # Return datetime of last timevalue - if data are loaded from multiple activities return the earliest last datetime value
                dataStartDatetime = InstantPoint.objects.using(args.database).filter(activity__name__contains=core_aName).aggregate(Max('timevalue'))['timevalue__max']

            try:
                if not args.debug:
                    logger.info("Instantiating Lrauv_Loader for url = %s", url_src)
                    lrauvLoad = DAPloaders.runLrauvLoader(cName = args.campaign,
                                                      cDesc = None,
                                                      aName = aName,
                                                      aTypeName = 'LRAUV mission',
                                                      pName = platformName,
                                                      pTypeName = 'auv',
                                                      pColor = cl.colors[platformName],
                                                      url = url_src,
                                                      parmList = args.plotparms,
                                                      dbAlias = args.database,
                                                      stride = int(args.stride),
                                                      startDatetime = startDatetime,
                                                      dataStartDatetime = dataStartDatetime,
                                                      endDatetime = endDatetime,
                                                      contourUrl = args.contourUrl,
                                                      auxCoords = coord,
                                                      timezone = 'America/Los_Angeles',
                                                      command_line_args = args)

                endDatetimeUTC = pytz.utc.localize(endDatetime)
                endDatetimeLocal = endDatetimeUTC.astimezone(pytz.timezone('America/Los_Angeles'))
                startDatetimeUTC = pytz.utc.localize(startDatetime)
                startDatetimeLocal = startDatetimeUTC.astimezone(pytz.timezone('America/Los_Angeles'))

                # format contour output file name replacing file extension with .png
开发者ID:carueda,项目名称:stoqs,代码行数:34,代码来源:monitorLrauv.py

示例7:

# 需要导入模块: import DAPloaders [as 别名]
# 或者: from DAPloaders import runLrauvLoader [as 别名]
                dataStartDatetime = (
                    InstantPoint.objects.using(args.database)
                    .filter(activity__name=aName)
                    .aggregate(Max("timevalue"))["timevalue__max"]
                )

            try:
                logger.debug("Instantiating Lrauv_Loader for url = %s", url_src)
                lrauvLoad = DAPloaders.runLrauvLoader(
                    cName=args.campaign,
                    cDesc=None,
                    aName=aName,
                    aTypeName="LRAUV mission",
                    pName=platformName,
                    pTypeName="auv",
                    pColor=colors[platformName],
                    url=url_src,
                    parmList=parms,
                    dbAlias=args.database,
                    stride=args.stride,
                    startDatetime=startDatetime,
                    dataStartDatetime=dataStartDatetime,
                    endDatetime=endDatetime,
                )

            except DAPloaders.NoValidData:
                logger.info("No measurements in this log set. Activity was not created as there was nothing to load.")

            except pydap.exceptions.ServerError as e:
                logger.warn(e)

            except DAPloaders.ParameterNotFound as e:
开发者ID:livyliv83,项目名称:stoqs,代码行数:34,代码来源:monitorLrauv.py


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