Newer
Older
using QSFit, DataStructures
import QSFit: AbstractSpectralLine, DefaultRecipe, CombinedLine, NarrowLine, BroadLine, BroadBaseLine, ComboBroadLine,
default_options, qso_cont_component, line_component, known_spectral_lines
abstract type q1927p654 <: DefaultRecipe end
export q1927p654
function default_options(::Type{T}) where T <: q1927p654
out = default_options(supertype(T))
out[:use_host_template] = true
#out[:host_template] = "S0"
#out[:wavelength_range][1] = 4000
out[:n_unk] = 0
return out
end
function qso_cont_component(::Type{T}) where T <: q1927p654
comp = qso_cont_component(supertype(T))
comp.alpha.low = -5
comp.alpha.high = 5
return comp
end
struct AsymmNarrowLine <: AbstractSpectralLine
λ::Float64
end
function known_spectral_lines(::Type{T}) where T <: q1927p654
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
list = OrderedDict{Symbol, AbstractSpectralLine}()
#list[:Lyb ] = CombinedLine( 1026.0 )
list[:Lya ] = CombinedLine( 1215.24 )
list[:NV_1241 ] = NarrowLine( 1240.81 )
list[:OI_1306 ] = BroadLine( 1305.53 )
list[:CII_1335 ] = BroadLine( 1335.31 )
list[:SiIV_1400 ] = BroadLine( 1399.8 )
list[:CIV_1549 ] = CombinedLine( 1549.48 )
#list[:HeII ] = BroadLine( 1640.4 )
#list[:OIII ] = BroadLine( 1665.85 )
#list[:AlIII ] = BroadLine( 1857.4 )
list[:CIII_1909 ] = BroadLine( 1908.734)
list[:CII ] = BroadLine( 2326.0 )
list[:F2420 ] = BroadLine( 2420.0 )
list[:MgII_2798 ] = CombinedLine( 2799.117)
#list[:NeVN ] = NarrowLine( 3346.79 )
list[:NeVI_3426 ] = NarrowLine( 3426.85 )
list[:OII_3727 ] = NarrowLine( 3729.875)
list[:NeIII_3869 ] = NarrowLine( 3869.81 )
#list[:Hd ] = BroadLine( 4102.89 )
list[:Hg ] = BroadLine( 4341.68 )
list[:OIII_4363 ] = NarrowLine( 4363.00 ) # TODO: Check wavelength is correct
list[:BOH ] = BroadLine( 4490. )
list[:HeII ] = BroadLine( 4686. )
list[:Hb ] = CombinedLine( 4862.68 )
list[:Hb_base ] = BroadBaseLine( 4862.68 )
list[:OIII_4959 ] = NarrowLine( 4960.295)
list[:OIII_5007 ] = AsymmNarrowLine(5008.240)
#list[:OIII_5007_bw] = NarrowLine( 5008.240)
list[:HeI_5876 ] = BroadLine( 5877.30 )
list[:OI_6300 ] = NarrowLine( 6300.00 ) # TODO: Check wavelength is correct
list[:OI_6364 ] = NarrowLine( 6364.00 ) # TODO: Check wavelength is correct
list[:NII_6549 ] = NarrowLine( 6549.86 )
list[:Ha ] = CombinedLine( 6564.61 )
list[:Ha_base ] = BroadBaseLine( 6564.61 )
list[:NII_6583 ] = NarrowLine( 6585.27 )
list[:SII_6716 ] = NarrowLine( 6718.29 )
list[:SII_6731 ] = NarrowLine( 6732.67 )
function line_component(::Type{T}, line::AsymmNarrowLine) where T <: q1927p654
comp = QSFit.SpecLineAsymmGauss(line.λ)
comp.fwhm.val = 5e2
comp.fwhm.low = 100
comp.fwhm.high = 2e3
comp.voff.low = -1e3
comp.voff.high = 1e3
return comp
end
function line_component(::Type{T}, line::ComboBroadLine) where T <: q1927p654
comp = QSFit.SpecLineAsymmGauss(line.λ)
comp.fwhm.val = 5e3
comp.fwhm.low = 900
comp.fwhm.high = 1.5e4
comp.voff.low = -3e3
comp.voff.high = 3e3
return comp