本文整理汇总了Python中linetools.spectralline.AbsLine.analy['flg_eye']方法的典型用法代码示例。如果您正苦于以下问题:Python AbsLine.analy['flg_eye']方法的具体用法?Python AbsLine.analy['flg_eye']怎么用?Python AbsLine.analy['flg_eye']使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类linetools.spectralline.AbsLine
的用法示例。
在下文中一共展示了AbsLine.analy['flg_eye']方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: parse_absid_file
# 需要导入模块: from linetools.spectralline import AbsLine [as 别名]
# 或者: from linetools.spectralline.AbsLine import analy['flg_eye'] [as 别名]
def parse_absid_file(self, abs_fil):
from xastropy import spec as xxspec
if self.linelist is None:
self.linelist = LineList('ISM')
# FITS binary table
hdu = fits.open(abs_fil)
table = hdu[1].data
newz = table[0]['ZABS']
if (self.zabs > 0.) & (np.abs(self.zabs-newz) > 1e-4):
print('WARNING: Updating zabs from {:s}'.format(abs_fil))
self.zabs = newz
self.absid_file = abs_fil
# Load up lines
for row in table:
aline = AbsLine(row['WREST']*u.AA, linelist=self.linelist,
closest=True)
# Velocity limits and flags
try:
aline.analy['vlim'] = row['VLIM'] * u.km/u.s
except KeyError:
aline.analy['vlim'] = row['DV'] * u.km/u.s
try:
aline.analy['do_analysis'] = row['do_analysis']
except KeyError:
aline.analy['do_analysis'] = row['FLG_ANLY']
aline.analy['flg_eye'] = row['FLG_EYE']
aline.analy['flg_limit'] = row['FLG_LIMIT']
try:
aline.analy['datafile'] = row['datafile']
except KeyError:
aline.analy['datafile'] = row['DATFIL']
aline.analy['spec'] = None # Spectrum
aline.attrib['z'] = self.zabs
# Append
self.lines.append(aline)
''' OLD FORMAT