本文整理汇总了Python中astrodata.AstroData.gain方法的典型用法代码示例。如果您正苦于以下问题:Python AstroData.gain方法的具体用法?Python AstroData.gain怎么用?Python AstroData.gain使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类astrodata.AstroData
的用法示例。
在下文中一共展示了AstroData.gain方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: eval
# 需要导入模块: from astrodata import AstroData [as 别名]
# 或者: from astrodata.AstroData import gain [as 别名]
print "using DescriptorValue as a float"
a = math.sin(h)
print "math.sin(h) =",a
a = math.sin(2.0)
print "math.sin(2.0) =",a
print "^"*80
for dv in dvs:
print "="*20 + dv.myname + "="*20
print dv
print "()"*80
ad.descriptorFormat = "value"
g = ad.detector_x_bin()
h = ad.gain()
i = ad.gain(format="as_dict")
j = ad.amp_read_area(format="db")
dvsnames = ["g","h","i","j"]
dvs = []
for dvname in dvsnames:
dv = eval(dvname)
dv.myname = dvname
dvs.append(dv)
for dv in dvs:
print "="*20 + dv.myname + "(%s)" % dv.name + "="*20
print dv
示例2: AstroData
# 需要导入模块: from astrodata import AstroData [as 别名]
# 或者: from astrodata.AstroData import gain [as 别名]
from astrodata import AstroData
from astrodata.structuredslice import pixel_exts,bintable_exts
# some files for tests, of === the one used
ffile = "../../../../test_data/gmosspect/gsN20011222S027.fits"
od = "../../../../test_data/gndeploy1/N20110826S0336.fits"
of = nf = "../../../../test_data/multibins.fits"
od = AstroData(of) #original od
print od.infostr()
pixad = od[pixel_exts]
print pixad.infostr()
binad = od[bintable_exts]
print binad.infostr()
print od.gain()
for ext in od:
try:
print "<<"*20
print "gain", ext.gain()
print ">>"*20
except:
print "failed on "
print ext.infostr()
raise