Example Usage of IonClms Class (v1.0)


In [48]:
# imports
import imp
from xastropy.igm.abs_sys import ionclms as xionc
from xastropy.atomic.elements import ELEMENTS
from xastropy.atomic import ionization as xai
from xastropy.outils import roman

xa_path = imp.find_module('xastropy')[1]

Instantiate with .all file


In [64]:
reload(xionc)
allfil = xa_path+'/igm/abs_sys/tests/files/UM184.z2929_MAGE.all'
ions = xionc.IonClms(all_file=allfil)

In [58]:
ions


Out[58]:
[IonClms]
<Table masked=False length=14>
  Z    ion    clm   sig_clm flg_clm flg_inst
int64 int64 float64 float64  int64   int64  
----- ----- ------- ------- ------- --------
    1     1   0.467   0.015       1        0
    6     1  13.091     0.0       3       16
    6     2  14.004   0.038       1        8
    6     4    13.9   0.019       1       16
    8     1  14.162   0.059       1        8
   13     2  12.591    0.06       1        8
   13     3  12.752     0.0       3       16
   14     2    13.7   0.046       1       16
   14     4  13.517    0.03       1        8
   16     2  14.411     0.0       3       24
   24     2  13.366     0.0       3        8
   26     2  13.512     0.0       3        8
   28     2  13.632     0.0       3       32
   30     2  12.601     0.0       3        8

Accessing data on a given ion


In [59]:
reload(xionc)
ions['SiII']


Out[59]:
{'Z': 14,
 'clm': 13.699999999999999,
 'flg_clm': 1,
 'flg_inst': 16,
 'ion': 2,
 'sig_clm': 0.045999999999999999}

In [61]:
ions[(14,2)]


Out[61]:
{'Z': 14,
 'clm': 13.699999999999999,
 'flg_clm': 1,
 'flg_inst': 16,
 'ion': 2,
 'sig_clm': 0.045999999999999999}

Grabbing a column of the data


In [68]:
ions.Z


Out[68]:
array([ 1,  6,  6,  6,  8, 13, 13, 14, 14, 16, 24, 26, 28, 30])