Loading Manifest.toml +2 −2 Original line number Diff line number Diff line Loading @@ -269,7 +269,7 @@ uuid = "ac42e6ba-c0bf-4fcf-827d-deea44b16255" version = "0.1.0" [[GFitViewer]] deps = ["DataStructures", "DefaultApplication", "GFit", "JLD2", "JSON", "Pkg", "Statistics"] deps = ["DataStructures", "DefaultApplication", "GFit", "Gnuplot", "JLD2", "JSON", "Pkg", "Statistics"] path = "/home/gcalderone/.julia/dev/GFitViewer" uuid = "5d93b50e-5cc7-4feb-a740-ec85257caa01" version = "0.1.0" Loading @@ -288,7 +288,7 @@ version = "0.5.0" [[Gnuplot]] deps = ["ColorSchemes", "ColorTypes", "Colors", "DataStructures", "REPL", "ReplMaker", "StatsBase", "StructC14N", "Test"] git-tree-sha1 = "637ee67f78c4adb222ee11c590bd1d0a1a50ba88" path = "/home/gcalderone/.julia/dev/Gnuplot" uuid = "dc211083-a33a-5b79-959f-2ff34033469d" version = "1.4.0" Loading src/Recipe_multi.jl +6 −2 Original line number Diff line number Diff line Loading @@ -34,7 +34,11 @@ function multi_fit(source::QSO{TRecipe}; ref_id=1) where TRecipe <: q1927p654 (minimum(λ) .< 5500 .< maximum(λ)) model[:galaxy] = QSFit.hostgalaxy(source.options[:host_template]) model[:Continuum] = SumReducer([:qso_cont, :galaxy]) model[:galaxy].norm.val = Spline1D(λ, source.data[id].val, k=1, bc="error")(5500.) #Allow half of the flux to the continuum and half to host galaxy model[:galaxy].norm.val = Spline1D(λ, source.data[id].val, k=1, bc="error")(5500.) / 2. model[:qso_cont].x0.val /= 2 if id != ref_id model[:galaxy].norm.fixed = true @patch! multi m -> begin Loading Loading @@ -120,7 +124,7 @@ function multi_fit(source::QSO{TRecipe}; ref_id=1) where TRecipe <: q1927p654 source.options[:instr_broadening] || (fwhm = sqrt(fwhm^2 + (source.spectra[id].resolution * 2.355)^2)) model[:ironoptbr] = comp model[:ironoptna] = QSFit.ironopt_narrow(fwhm) model[:ironoptbr].norm.val = 0.5 model[:ironoptbr].norm.val = 0.1 # TODO: guess a sensible value model[:ironoptna].norm.val = 0.0 freeze(model, :ironoptna) # will be freed during last run push!(iron_components, :ironoptbr, :ironoptna) Loading src/Recipe_single.jl +6 −3 Original line number Diff line number Diff line Loading @@ -23,7 +23,10 @@ function fit(source::QSO{TRecipe}; id=1) where TRecipe <: q1927p654 (minimum(λ) .< 5500 .< maximum(λ)) model[:galaxy] = QSFit.hostgalaxy(source.options[:host_template]) model[:Continuum] = SumReducer([:qso_cont, :galaxy]) model[:galaxy].norm.val = Spline1D(λ, source.data[id].val, k=1, bc="error")(5500.) #Allow half of the flux to the continuum and half to host galaxy model[:galaxy].norm.val = Spline1D(λ, source.data[id].val, k=1, bc="error")(5500.) / 2. model[:qso_cont].x0.val /= 2 end # Balmer continuum and pseudo-continuum Loading @@ -48,9 +51,9 @@ function fit(source::QSO{TRecipe}; id=1) where TRecipe <: q1927p654 # QSO continuum renormalization freeze(model, :qso_cont) c = model[:qso_cont] initialnorm = c.norm.val if c.norm.val > 0 println(logio(source), "Cont. norm. (before): ", c.norm.val) initialnorm = c.norm.val while true residuals = (model() - source.data[id].val) ./ source.data[id].unc (count(residuals .< 0) / length(residuals) > 0.9) && break Loading Loading @@ -96,7 +99,7 @@ function fit(source::QSO{TRecipe}; id=1) where TRecipe <: q1927p654 source.options[:instr_broadening] || (fwhm = sqrt(fwhm^2 + (source.spectra[id].resolution * 2.355)^2)) model[:ironoptbr] = comp model[:ironoptna] = QSFit.ironopt_narrow(fwhm) model[:ironoptbr].norm.val = 0.5 model[:ironoptbr].norm.val = 0.1 # TODO: guess a sensible value model[:ironoptna].norm.val = 0.0 freeze(model, :ironoptna) # will be freed during last run push!(iron_components, :ironoptbr, :ironoptna) Loading Loading
Manifest.toml +2 −2 Original line number Diff line number Diff line Loading @@ -269,7 +269,7 @@ uuid = "ac42e6ba-c0bf-4fcf-827d-deea44b16255" version = "0.1.0" [[GFitViewer]] deps = ["DataStructures", "DefaultApplication", "GFit", "JLD2", "JSON", "Pkg", "Statistics"] deps = ["DataStructures", "DefaultApplication", "GFit", "Gnuplot", "JLD2", "JSON", "Pkg", "Statistics"] path = "/home/gcalderone/.julia/dev/GFitViewer" uuid = "5d93b50e-5cc7-4feb-a740-ec85257caa01" version = "0.1.0" Loading @@ -288,7 +288,7 @@ version = "0.5.0" [[Gnuplot]] deps = ["ColorSchemes", "ColorTypes", "Colors", "DataStructures", "REPL", "ReplMaker", "StatsBase", "StructC14N", "Test"] git-tree-sha1 = "637ee67f78c4adb222ee11c590bd1d0a1a50ba88" path = "/home/gcalderone/.julia/dev/Gnuplot" uuid = "dc211083-a33a-5b79-959f-2ff34033469d" version = "1.4.0" Loading
src/Recipe_multi.jl +6 −2 Original line number Diff line number Diff line Loading @@ -34,7 +34,11 @@ function multi_fit(source::QSO{TRecipe}; ref_id=1) where TRecipe <: q1927p654 (minimum(λ) .< 5500 .< maximum(λ)) model[:galaxy] = QSFit.hostgalaxy(source.options[:host_template]) model[:Continuum] = SumReducer([:qso_cont, :galaxy]) model[:galaxy].norm.val = Spline1D(λ, source.data[id].val, k=1, bc="error")(5500.) #Allow half of the flux to the continuum and half to host galaxy model[:galaxy].norm.val = Spline1D(λ, source.data[id].val, k=1, bc="error")(5500.) / 2. model[:qso_cont].x0.val /= 2 if id != ref_id model[:galaxy].norm.fixed = true @patch! multi m -> begin Loading Loading @@ -120,7 +124,7 @@ function multi_fit(source::QSO{TRecipe}; ref_id=1) where TRecipe <: q1927p654 source.options[:instr_broadening] || (fwhm = sqrt(fwhm^2 + (source.spectra[id].resolution * 2.355)^2)) model[:ironoptbr] = comp model[:ironoptna] = QSFit.ironopt_narrow(fwhm) model[:ironoptbr].norm.val = 0.5 model[:ironoptbr].norm.val = 0.1 # TODO: guess a sensible value model[:ironoptna].norm.val = 0.0 freeze(model, :ironoptna) # will be freed during last run push!(iron_components, :ironoptbr, :ironoptna) Loading
src/Recipe_single.jl +6 −3 Original line number Diff line number Diff line Loading @@ -23,7 +23,10 @@ function fit(source::QSO{TRecipe}; id=1) where TRecipe <: q1927p654 (minimum(λ) .< 5500 .< maximum(λ)) model[:galaxy] = QSFit.hostgalaxy(source.options[:host_template]) model[:Continuum] = SumReducer([:qso_cont, :galaxy]) model[:galaxy].norm.val = Spline1D(λ, source.data[id].val, k=1, bc="error")(5500.) #Allow half of the flux to the continuum and half to host galaxy model[:galaxy].norm.val = Spline1D(λ, source.data[id].val, k=1, bc="error")(5500.) / 2. model[:qso_cont].x0.val /= 2 end # Balmer continuum and pseudo-continuum Loading @@ -48,9 +51,9 @@ function fit(source::QSO{TRecipe}; id=1) where TRecipe <: q1927p654 # QSO continuum renormalization freeze(model, :qso_cont) c = model[:qso_cont] initialnorm = c.norm.val if c.norm.val > 0 println(logio(source), "Cont. norm. (before): ", c.norm.val) initialnorm = c.norm.val while true residuals = (model() - source.data[id].val) ./ source.data[id].unc (count(residuals .< 0) / length(residuals) > 0.9) && break Loading Loading @@ -96,7 +99,7 @@ function fit(source::QSO{TRecipe}; id=1) where TRecipe <: q1927p654 source.options[:instr_broadening] || (fwhm = sqrt(fwhm^2 + (source.spectra[id].resolution * 2.355)^2)) model[:ironoptbr] = comp model[:ironoptna] = QSFit.ironopt_narrow(fwhm) model[:ironoptbr].norm.val = 0.5 model[:ironoptbr].norm.val = 0.1 # TODO: guess a sensible value model[:ironoptna].norm.val = 0.0 freeze(model, :ironoptna) # will be freed during last run push!(iron_components, :ironoptbr, :ironoptna) Loading