本文整理汇总了Python中astrodata.AstroData.exposure_time方法的典型用法代码示例。如果您正苦于以下问题:Python AstroData.exposure_time方法的具体用法?Python AstroData.exposure_time怎么用?Python AstroData.exposure_time使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类astrodata.AstroData
的用法示例。
在下文中一共展示了AstroData.exposure_time方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: float
# 需要导入模块: from astrodata import AstroData [as 别名]
# 或者: from astrodata.AstroData import exposure_time [as 别名]
mag = np.where((sxflag==0), mag, None)
mag = np.where((dqflag==0), mag, None)
# Now ditch the values out of the arrays where mag is None
# NB do mag last
magerr = magerr[np.flatnonzero(mag)]
refmag = refmag[np.flatnonzero(mag)]
refmagerr = refmagerr[np.flatnonzero(mag)]
mag = mag[np.flatnonzero(mag)]
if(len(mag) == 0):
print "No good sources to plot"
sys.exit(1)
# Now apply the exposure time and nom_at_ext corrections to mag
et = float(ad.exposure_time())
if(ad.is_type('GMOS_NODANDSHUFFLE')):
print "Imaging Nod-And-Shuffle. Photometry may be dubious"
et /= 2.0
etmag = 2.5*math.log10(et)
nom_at_ext = float(ad.nominal_atmospheric_extinction())
mag += etmag
mag += nom_at_ext
# Can now calculate the zp array
zp = refmag - mag
zperr = np.sqrt(refmagerr*refmagerr + magerr*magerr)
# Trim values out of zp where the zeropoint error is > 0.1
示例2: AstroData
# 需要导入模块: from astrodata import AstroData [as 别名]
# 或者: from astrodata.AstroData import exposure_time [as 别名]
from astrodata import AstroData
import urllib2, urllib
# This is a GMOS_N imaging science dataset
ad = AstroData("/home/callen/SVN-AD/gemini_python/test_data/calsearch/N20110531S0114.fits")
desc_dict = {'instrument':ad.instrument().for_db(),
'observation_type': ad.observation_type().for_db(),
'data_label':ad.data_label().for_db(),
'detector_x_bin':ad.detector_x_bin().for_db(),
'detector_y_bin':ad.detector_y_bin().for_db(),
'read_speed_setting':ad.read_speed_setting().for_db(),
'gain_setting':ad.gain_setting().for_db(),
'amp_read_area':ad.amp_read_area().for_db(),
'ut_datetime':ad.ut_datetime().for_db(),
'exposure_time':ad.exposure_time().for_db(),
'object': ad.object().for_db(),
'filter_name':ad.filter_name().for_db(),
'focal_plane_mask':ad.focal_plane_mask().for_db(),
}
print repr(desc_dict)
type_list = ad.types
ad.close()
sequence = [('descriptors', desc_dict), ('types', type_list)]
postdata = urllib.urlencode(sequence)
#postdata = urllib.urlencode({"hello":1.})
url = "http://hbffits3.hi.gemini.edu/calmgr/processed_flat/"
#url = "http://hbffits1/calmgr/processed_bias/"