本文整理汇总了Python中ucar.unidata.data.grid.GridUtil.setParamType方法的典型用法代码示例。如果您正苦于以下问题:Python GridUtil.setParamType方法的具体用法?Python GridUtil.setParamType怎么用?Python GridUtil.setParamType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ucar.unidata.data.grid.GridUtil
的用法示例。
在下文中一共展示了GridUtil.setParamType方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: mycombineRGB
# 需要导入模块: from ucar.unidata.data.grid import GridUtil [as 别名]
# 或者: from ucar.unidata.data.grid.GridUtil import setParamType [as 别名]
def mycombineRGB(red, green, blue):
"""Three Color (RGB) Image (Auto-scale) formula."""
global uniqueID
uniqueID += 1
red = GridUtil.setParamType(red, makeRealType("redimage%d" % uniqueID), 0)
green = GridUtil.setParamType(green, makeRealType("greenimage%d" % uniqueID), 0)
blue = GridUtil.setParamType(blue, makeRealType("blueimage%d" % uniqueID), 0)
return DerivedGridFactory.combineGrids([red, green, blue], 1)
示例2: noUnit
# 需要导入模块: from ucar.unidata.data.grid import GridUtil [as 别名]
# 或者: from ucar.unidata.data.grid.GridUtil import setParamType [as 别名]
def noUnit(field):
""" remove the units from a grid """
import visad
from visad import CommonUnit
newunit = CommonUnit.promiscuous
rt = GridUtil.getParamType(field).getRealComponents()[0]
newType = Util.makeRealType(rt.getName(), visad.CommonUnit.promiscuous)
return GridUtil.setParamType(field, newType,0)
示例3: newUnit
# 需要导入模块: from ucar.unidata.data.grid import GridUtil [as 别名]
# 或者: from ucar.unidata.data.grid.GridUtil import setParamType [as 别名]
def newUnit(field, varname, unitname):
""" set the name and unit on a grid """
newunit = Util.parseUnit(unitname)
newType = Util.makeRealType(varname, newunit)
return GridUtil.setParamType(field, newType,0)
示例4: newName
# 需要导入模块: from ucar.unidata.data.grid import GridUtil [as 别名]
# 或者: from ucar.unidata.data.grid.GridUtil import setParamType [as 别名]
def newName(field, varname, copy = 0):
""" create a new field with a new parameter name """
return GridUtil.setParamType(field, varname, copy)