In [8]:
%matplotlib notebook
In [25]:
# import
import pdb
import os
from linetools.spectra import io as lsio
from linetools import utils as ltu
from pyigm.surveys.dlasurvey import DLASurvey
In [31]:
spec_20456 = lsio.readspec(os.getenv('DROPBOX_DIR')+'/MachineLearning/DLAs/training_20456_5000.hdf5')
In [5]:
spec_20456.select = 196
In [9]:
# Strange qso.. Probably BAL nonsense
# And probably should not have inlucded it in the training set..
spec_20456.plot()
In [12]:
spec_20456.header['PLATE'], spec_20456.header['FIBER']
Out[12]:
In [13]:
spec_20456.header['zem']
Out[13]:
In [32]:
dlas = ltu.loadjson(os.getenv('DROPBOX_DIR')+'/MachineLearning/DLAs/training_20456_5000.json')
In [33]:
for ispec in range(spec_20456.nspec):
spec_20456.select = ispec
zem = spec_20456.header['zem']
for ii in range(dlas[str(ispec)]['nDLA']):
if dlas[str(ispec)][str(ii)]['zabs'] > zem:
pdb.set_trace()
In [23]:
spec_20456.select = 228
In [24]:
spec_20456.plot()
In [26]:
sdss = DLASurvey.load_SDSS_DR5(sample='all')
In [28]:
badsl = (sdss.sightlines['PLATE'] == 538) & (sdss.sightlines['FIB'] == 168)
In [29]:
sdss.sightlines[badsl]
Out[29]:
In [ ]: