本文整理汇总了Python中DAPloaders类的典型用法代码示例。如果您正苦于以下问题:Python DAPloaders类的具体用法?Python DAPloaders怎么用?Python DAPloaders使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了DAPloaders类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: loadBEDS
def loadBEDS(self, stride=None, featureType='trajectory'):
'''
BEDS specific load functions; featureType can be 'trajectory' or 'timeSeries'.
Use 'trajectory' for events that we've fudged into a trajectory netCDF file
using the canyon's thalweg. Use 'timeSeries' for events for which the BED
does not significantly translate.
'''
stride = stride or self.stride
for (aName, pName, file, plotTimeSeriesDepth, fg) in zip(
[ a.split('/')[-1] + ' (stride=%d)' % stride for a in self.bed_files],
self.bed_platforms, self.bed_files, self.bed_depths, self.bed_framegrabs):
url = os.path.join(self.bed_base, file)
try:
if featureType.lower() == 'trajectory':
# To get timeSeries plotting for trajectories (in the Parameter tab of the UI)
# assign a plotTimeSeriesDepth value of the starting depth in meters.
DAPloaders.runBEDTrajectoryLoader(url, self.campaignName, self.campaignDescription,
aName, pName, self.colors[pName.lower()], 'bed',
'deployment', self.bed_parms, self.dbAlias, stride,
plotTimeSeriesDepth=plotTimeSeriesDepth,
grdTerrain=self.grdTerrain, framegrab=fg)
elif featureType.lower() == 'timeseries':
DAPloaders.runTimeSeriesLoader(url, self.campaignName, self.campaignDescription,
aName, pName, self.colors[pName.lower()], 'bed',
'deployment', self.bed_parms, self.dbAlias, stride)
self.addPlatformResources('http://stoqs.mbari.org/x3d/beds/beds_housing_with_axes_src_scene.x3d',
pName, scalefactor=10)
except (DAPloaders.OpendapError, DAPloaders.InvalidSliceRequest):
pass
示例2: loadM1
def loadM1(self, stride=None):
'''
Mooring M1 specific load functions
'''
platformName = 'M1_Mooring'
stride = stride or self.stride
for (aName, file) in zip([ a + getStrideText(stride) for a in self.m1_files], self.m1_files):
url = os.path.join(self.m1_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']
if dataStartDatetime:
# Subract an hour to fill in missing_values at end from previous load
dataStartDatetime = dataStartDatetime - timedelta(seconds=3600)
DAPloaders.runMooringLoader(url, self.campaignName, self.campaignDescription, aName, platformName, self.colors['m1'], 'mooring', 'Mooring Deployment',
self.m1_parms, self.dbAlias, stride, self.m1_startDatetime, self.m1_endDatetime, dataStartDatetime)
# For timeseriesProfile data we need to pass the nominaldepth of the plaform
# so that the model is put at the correct depth in the Spatial -> 3D view.
try:
self.addPlatformResources('http://stoqs.mbari.org/x3d/m1_assembly/m1_assembly_scene.x3d',
platformName, nominaldepth=self.m1_nominaldepth)
except AttributeError:
self.addPlatformResources('http://stoqs.mbari.org/x3d/m1_assembly/m1_assembly_scene.x3d',
platformName)
示例3: loadTethys
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)
示例4: loadCastaway
def loadCastaway(self):
'''
Sparus specific load functions
'''
for (aName, file) in zip([ a + ' (stride=%d)' % self.stride for a in self.castaway_files], self.castaway_files):
url = self.castaway_base + file
DAPloaders.runTrajectoryLoader(url, self.campaignName, aName, 'castaway', self.colors['castaway'], 'mooring', 'CTD Profile',
self.castaway_parms, self.dbAlias, self.stride)
示例5: loadSparus
def loadSparus(self):
'''
Sparus specific load functions
'''
for (aName, file) in zip([ a + ' (stride=%d)' % self.stride for a in self.sparus_files], self.sparus_files):
url = self.sparus_base + file
DAPloaders.runTrajectoryLoader(url, self.campaignName, aName, 'sparus', self.colors['sparus'], 'auv', 'AUV mission',
self.sparus_parms, self.dbAlias, self.stride)
示例6: loadFulmar
def loadFulmar(self, stride=None):
'''
Fulmar specific load functions
'''
stride = stride or self.stride
for (aName, file) in zip([ a + getStrideText(stride) for a in self.fulmar_files], self.fulmar_files):
url = self.fulmar_base + file
DAPloaders.runTrajectoryLoader(url, self.campaignName, self.campaignDescription, aName, 'fulmar', self.colors['fulmar'], 'ship', 'cruise',
self.fulmar_parms, self.dbAlias, stride, grdTerrain=self.grdTerrain)
示例7: loadJMuctd
def loadJMuctd(self, stride=None):
'''
Martin specific underway load functions
'''
stride = stride or self.stride
for (aName, file) in zip([ a + getStrideText(stride) for a in self.JMuctd_files], self.JMuctd_files):
url = self.JMuctd_base + file
DAPloaders.runTrajectoryLoader(url, self.campaignName, self.campaignDescription, aName, 'John_Martin_UCTD', self.colors['martin'], 'ship', 'cruise',
self.JMuctd_parms, self.dbAlias, stride, grdTerrain=self.grdTerrain)
示例8: loadOA2met
def loadOA2met(self, stride=None):
'''
Mooring OA specific load functions
'''
stride = stride or self.stride
for (aName, file) in zip([ a + getStrideText(stride) for a in self.OA2met_files], self.OA2met_files):
url = os.path.join(self.OA2met_base, file)
DAPloaders.runMooringLoader(url, self.campaignName, self.campaignDescription, aName, 'OA2_Mooring', self.colors['oa2'], 'mooring', 'Mooring Deployment',
self.OA2met_parms, self.dbAlias, stride, self.OA2met_startDatetime, self.OA2met_endDatetime)
示例9: loadCarmen
def loadCarmen(self, stride=None):
'''
Glider specific load functions
'''
stride = stride or self.stride
for (aName, file) in zip([ a + getStrideText(stride) for a in self.carmen_files], self.carmen_files):
url = self.carmen_base + file
DAPloaders.runGliderLoader(url, self.campaignName, self.campaignDescription, aName, 'carmen', self.colors['carmen'], 'glider', 'Glider Mission',
self.carmen_parms, self.dbAlias, stride, grdTerrain=self.grdTerrain)
示例10: loadM1met
def loadM1met(self, stride=None):
'''
Mooring M1met specific load functions
'''
stride = stride or self.stride
for (aName, file) in zip([ a + getStrideText(stride) for a in self.m1met_files], self.m1met_files):
url = self.m1met_base + file
DAPloaders.runMooringLoader(url, self.campaignName, self.campaignDescription, aName, 'M1_Mooring', self.colors['m1'], 'mooring', 'Mooring Deployment',
self.m1met_parms, self.dbAlias, stride, self.m1met_startDatetime, self.m1met_endDatetime)
示例11: loadESPbruce
def loadESPbruce(self, stride=None):
'''
ESPbruce specific load functions
'''
stride = stride or self.stride
for (aName, file) in zip([ a + getStrideText(stride) for a in self.espbruce_files], self.espbruce_files):
url = self.espbruce_base + file
DAPloaders.runTrajectoryLoader(url, self.campaignName, self.campaignDescription, aName, 'espbruce', self.colors['espbruce'], 'espbruce', 'ESP bruce Mission',
self.espbruce_parms, self.dbAlias, stride, grdTerrain=self.grdTerrain)
示例12: loadRCuctd
def loadRCuctd(self, stride=None, platformName='RachelCarson_UCTD', activitytypeName='Rachel Carson Underway CTD Data'):
'''
RC uctd specific load functions
'''
stride = stride or self.stride
for (aName, file) in zip([ a + getStrideText(stride) for a in self.rcuctd_files], self.rcuctd_files):
url = self.rcuctd_base + file
DAPloaders.runTrajectoryLoader(url, self.campaignName, self.campaignDescription, aName, platformName, self.colors['carson'], 'ship', activitytypeName,
self.rcuctd_parms, self.dbAlias, stride, grdTerrain=self.grdTerrain)
示例13: load_slocum_260
def load_slocum_260(self, stride=None):
'''
Glider specific load functions
'''
stride = stride or self.stride
for (aName, file) in zip([ a + getStrideText(stride) for a in self.slocum_260_files], self.slocum_260_files):
url = self.slocum_260_base + file
DAPloaders.runGliderLoader(url, self.campaignName, self.campaignDescription, aName, 'Slocum_260', self.colors['slocum_260'], 'glider', 'Glider Mission',
self.slocum_260_parms, self.dbAlias, stride, self.slocum_260_startDatetime, self.slocum_260_endDatetime, grdTerrain=self.grdTerrain)
示例14: loadRusalka
def loadRusalka(self, stride=None):
'''
Glider specific load functions
'''
stride = stride or self.stride
for (aName, file) in zip([ a + getStrideText(stride) for a in self.rusalka_files], self.rusalka_files):
url = self.rusalka_base + file
print "url = %s" % url
DAPloaders.runGliderLoader(url, self.campaignName, self.campaignDescription, aName, 'rusalka', self.colors['rusalka'], 'glider', 'Glider Mission',
self.rusalka_parms, self.dbAlias, stride, grdTerrain=self.grdTerrain)
示例15: load_wg_tex_met
def load_wg_tex_met(self, stride=None):
'''
Glider specific load functions
'''
stride = stride or self.stride
for (aName, file) in zip([ a + getStrideText(stride) for a in self.wg_tex_met_files], self.wg_tex_met_files):
url = self.wg_tex_met_base + file
DAPloaders.runGliderLoader(url, self.campaignName, self.campaignDescription, aName, 'wg_Tex_Glider', self.colors['wg_tex'], 'waveglider', 'Glider Mission',
self.wg_tex_met_parms, self.dbAlias, stride, self.wg_tex_met_startDatetime, self.wg_tex_met_endDatetime,
grdTerrain=self.grdTerrain)