In [1]:
# imports
import imp
from astropy.coordinates import SkyCoord
from xastropy.igm.abs_sys import ionclms as xionc
from xastropy.igm.abs_sys import abssys_utils as xabsys
from linetools.spectralline import AbsLine
from linetools.lists.linelist import LineList
xa_path = imp.find_module('xastropy')[1]
In [2]:
reload(xabsys)
gensys = xabsys.GenericAbsSystem(NHI=16., zabs=1.244)
gensys.coord = SkyCoord(ra=123.1143*u.deg, dec=-12.4321*u.deg)
In [3]:
gensys
Out[3]:
In [4]:
ism = LineList('ISM')
In [5]:
few_lines = [1215.6700, 1334.5323, 1808.0129]*u.AA
for ilin in few_lines:
gensys.lines.append(AbsLine(ilin,linelist=ism))
gensys.lines
Out[5]:
In [6]:
Lya = gensys[1215.670*u.AA]
Lya[0]
Out[6]:
In [7]:
allfil = xa_path+'/igm/abs_sys/tests/files/UM184.z2929_MAGE.all'
gensys._ionclms = xionc.IonClms(all_file=allfil)
In [8]:
gensys['SiII']
Out[8]:
In [9]:
gensys[(14,2)]
Out[9]:
In [ ]: