Exemplo n.º 1
0
def test_model_abs():
    # Simple system (without an absline)
    dla = DLASystem.from_json(data_path('J010311.38+131616.7_z2.309_ESI.json'))
    spec_fil = linetools.__path__[0]+'/spectra/tests/files/PH957_f.fits'
    spec = lsio.readspec(spec_fil)
    model, lya_lines = dla.model_abs(spec)
    # import pdb; pdb.set_trace()
    # Check core
    ipx = np.argmin(np.abs(spec.wavelength.value-(1+dla.zabs)*1215.67))
    assert model.flux[ipx].value < 1e-4
Exemplo n.º 2
0
def test_dla_XY():
    spec_fil = linetools.__path__[0]+'/spectra/tests/files/PH957_f.fits'
    spec = lsio.readspec(spec_fil)
    dla = DLASystem.from_json(data_path('J010311.38+131616.7_z2.309_ESI.json'))
    #
    dla.measure_aodm(spec=spec)
    dla.update_component_colm()
    dla.fill_ionN()
    dla.XY = RelAbund.from_ionclm_table((1,21.37,0.08), dla._ionN)
    tbl = dla.XY.table()
    assert len(tbl) == 8
Exemplo n.º 3
0
def test_dla_XY():
    spec_fil = linetools.__path__[0]+'/spectra/tests/files/PH957_f.fits'
    spec = lsio.readspec(spec_fil)
    dla = DLASystem.from_json(data_path('J010311.38+131616.7_z2.309_ESI.json'))
    #
    dla.measure_aodm(spec=spec)
    dla.update_component_colm()
    dla.fill_ionN()
    dla.XY = RelAbund.from_ionclm_table((1,21.37,0.08), dla._ionN)
    tbl = dla.XY.table()
    assert len(tbl) == 8
Exemplo n.º 4
0
def test_dla_from_dict():
    dla = DLASystem.from_json(data_path('J010311.38+131616.7_z2.309_ESI.json'))
    assert len(dla._components) == 16
Exemplo n.º 5
0
def test_dla_from_dict():
    dla = DLASystem.from_json(data_path('J010311.38+131616.7_z2.309_ESI.json'))
    assert len(dla._components) == 16