Loading run.jl +39 −32 Original line number Diff line number Diff line Loading @@ -176,7 +176,7 @@ for loop in 1:Nloop end serialize(file, (res, all_scale, OIII_norm)) else (res, all_scale, OIII_norm) = deserialize(file) (res, all_scale, OIII_norm) = deserialize(file); end end Loading Loading @@ -230,18 +230,24 @@ tabellone = DataFrame(epoch=Int[], date=String[], galaxy=Float64[], na_Hb_norm=Float64[], na_Hb_fwhm=Float64[], na_Hb_voff=Float64[], oiii_fwhm=Float64[], oiii_voff=Float64[]) for id in 1:length(bestfit.preds) l5100 = Vector{Float64}() for id in 1:length(res.bestfit.preds) push!(l5100, 5100 .* Spline1D(domain(res.model[id])[:], res.model[id]())(5100.)) end for id in 1:length(res.bestfit.preds) push!(tabellone, (id, epoch_filenames[id][27:end-4], bestfit[id][:galaxy].norm.val, bestfit[id][:qso_cont].alpha.val, cont_at(bestfit[id], 4000)[1], models[(id,:l5100)], bestfit[id][:bb_Ha].norm.patched, bestfit[id][:bb_Ha].fwhm.patched, bestfit[id][:bb_Ha].voff.patched, bestfit[id][:br_Ha].norm.patched, bestfit[id][:br_Ha].fwhm.patched, bestfit[id][:br_Ha].voff.patched, bestfit[id][:na_Ha].norm.patched, bestfit[id][:na_Ha].fwhm.patched, bestfit[id][:na_Ha].voff.patched, bestfit[id][:bb_Hb].norm.patched, bestfit[id][:bb_Hb].fwhm.patched, bestfit[id][:bb_Hb].voff.patched, bestfit[id][:br_Hb].norm.patched, bestfit[id][:br_Hb].fwhm.patched, bestfit[id][:br_Hb].voff.patched, bestfit[id][:na_Hb].norm.patched, bestfit[id][:na_Hb].fwhm.patched, bestfit[id][:na_Hb].voff.patched, bestfit[id][:OIII_5007].fwhm.patched, bestfit[id][:OIII_5007].voff.patched)) res.bestfit[id][:galaxy].norm.val, res.bestfit[id][:qso_cont].alpha.val, cont_at(res.bestfit[id], 4000)[1], l5100[id], res.bestfit[id][:bb_Ha].norm.patched, res.bestfit[id][:bb_Ha].fwhm.patched, res.bestfit[id][:bb_Ha].voff.patched, res.bestfit[id][:br_Ha].norm.patched, res.bestfit[id][:br_Ha].fwhm.patched, res.bestfit[id][:br_Ha].voff.patched, res.bestfit[id][:na_Ha].norm.patched, res.bestfit[id][:na_Ha].fwhm.patched, res.bestfit[id][:na_Ha].voff.patched, res.bestfit[id][:bb_Hb].norm.patched, res.bestfit[id][:bb_Hb].fwhm.patched, res.bestfit[id][:bb_Hb].voff.patched, res.bestfit[id][:br_Hb].norm.patched, res.bestfit[id][:br_Hb].fwhm.patched, res.bestfit[id][:br_Hb].voff.patched, res.bestfit[id][:na_Hb].norm.patched, res.bestfit[id][:na_Hb].fwhm.patched, res.bestfit[id][:na_Hb].voff.patched, res.bestfit[id][:OIII_5007].fwhm.patched, res.bestfit[id][:OIII_5007].voff.patched)) end dd = Date.(tabellone.date, Ref("yyyymmdd")) Loading @@ -251,42 +257,43 @@ f = FITS("1ES_1927p654_results_$(job).fits", "w") write(f, tabellone) close(f) @gp( [bestfit[id][:qso_cont].alpha.val for id in 1:length(chosen_epochs)], [bestfit[id][:br_Ha].norm.patched for id in 1:length(chosen_epochs)], @gp( [res.bestfit[id][:qso_cont].alpha.val for id in 1:length(chosen_epochs)], [res.bestfit[id][:br_Ha].norm.patched for id in 1:length(chosen_epochs)], "w l") @gp(:-, [bestfit[id][:qso_cont].alpha.val for id in 1:length(chosen_epochs)], [bestfit[id][:br_Hb].norm.patched for id in 1:length(chosen_epochs)], [res.bestfit[id][:qso_cont].alpha.val for id in 1:length(chosen_epochs)], [res.bestfit[id][:br_Hb].norm.patched for id in 1:length(chosen_epochs)], "w l") @gp( [bestfit[id][:qso_cont].alpha.val for id in 1:length(chosen_epochs)], [cont_at(bestfit[id], 5100)[1] for id in 1:length(chosen_epochs)], @gp( [res.bestfit[id][:qso_cont].alpha.val for id in 1:length(chosen_epochs)], [cont_at(res.bestfit[id], 5100)[1] for id in 1:length(chosen_epochs)], "w l") @gp( [cont_at(bestfit[id], 5100)[1] for id in 1:length(chosen_epochs)], [bestfit[id][:br_Ha].norm.patched for id in 1:length(chosen_epochs)], @gp( [cont_at(res.bestfit[id], 5100)[1] for id in 1:length(chosen_epochs)], [res.bestfit[id][:br_Ha].norm.patched for id in 1:length(chosen_epochs)], "w l") @gp( [models[(id, :l5100)] for id in 1:length(chosen_epochs)], [bestfit[id][:br_Ha].norm.patched for id in 1:length(chosen_epochs)], @gp( l5100, [res.bestfit[id][:br_Ha].norm.patched for id in 1:length(chosen_epochs)], "w l") @gp tabellone.day [cont_at(bestfit[id], 5100)[1] for id in 1:length(chosen_epochs)] "w lp" ylog=true @gp :- tabellone.day [bestfit[id][:br_Ha].norm.patched for id in 1:length(chosen_epochs)] .* 1e2 "w lp" @gp :- tabellone.day [bestfit[id][:br_Hb].norm.patched for id in 1:length(chosen_epochs)] .* 1e2 "w lp" @gp :- tabellone.day [models[(id, :l5100)] for id in 1:length(chosen_epochs)] "w lp" @gp tabellone.day [cont_at(res.bestfit[id], 5100)[1] for id in 1:length(chosen_epochs)] "w lp" ylog=true @gp :- tabellone.day [res.bestfit[id][:br_Ha].norm.patched for id in 1:length(chosen_epochs)] .* 1e2 "w lp" @gp :- tabellone.day [res.bestfit[id][:br_Hb].norm.patched for id in 1:length(chosen_epochs)] .* 1e2 "w lp" @gp :- tabellone.day l5100 "w lp" @gp tabellone.day -3 .+ 1e-3 .*[cont_at(bestfit[id], 5100)[1] for id in 1:length(chosen_epochs)] "w lp" @gp :- tabellone.day [bestfit[id][:qso_cont].alpha.val for id in 1:length(chosen_epochs)] "w lp" @gp tabellone.day -3 .+ 1e-3 .*[cont_at(res.bestfit[id], 5100)[1] for id in 1:length(chosen_epochs)] "w lp" @gp :- tabellone.day [res.bestfit[id][:qso_cont].alpha.val for id in 1:length(chosen_epochs)] "w lp" @gp "set grid" for id in 1:length(chosen_epochs) @gp :- models[(id, :x)] models[(id, :y)] "w l t '$id' lw 3" #@gp :- domain(res.model[id])[:] res.model[id]() "w l t '$id' lw 3" @gp :- domain(res.model[id])[:] res.model[id](:qso_cont) "w l t '$id' lw 3" #@gp :- models[(id, :x)] models[(id, :qso_cont)] "w l t '$id' lw 2" end save(:prenorm, term="png size 800,600", output="output/evolution.png") Loading @@ -294,10 +301,10 @@ save(:prenorm, term="png size 800,600", output="output/evolution.png") @gp "set grid" for id in 1:length(chosen_epochs) println(bestfit[id][:OIII_5007]) x = models[(id, :x)] y = models[(id, :y)] y0 = y .- models[(id, :OIII_5007)] println(res.bestfit[id][:OIII_5007]) x = domain(res.model[id])[:] y = res.model[id]() y0 = y .- res.model[id](:OIII_5007) #@gp :- x y0 .- Spline1D(x, y0)(5007.) "w l t '$id'" @gp :- x y .- Spline1D(x, y0)(5007.) "w l t '$id'" end Loading Loading
run.jl +39 −32 Original line number Diff line number Diff line Loading @@ -176,7 +176,7 @@ for loop in 1:Nloop end serialize(file, (res, all_scale, OIII_norm)) else (res, all_scale, OIII_norm) = deserialize(file) (res, all_scale, OIII_norm) = deserialize(file); end end Loading Loading @@ -230,18 +230,24 @@ tabellone = DataFrame(epoch=Int[], date=String[], galaxy=Float64[], na_Hb_norm=Float64[], na_Hb_fwhm=Float64[], na_Hb_voff=Float64[], oiii_fwhm=Float64[], oiii_voff=Float64[]) for id in 1:length(bestfit.preds) l5100 = Vector{Float64}() for id in 1:length(res.bestfit.preds) push!(l5100, 5100 .* Spline1D(domain(res.model[id])[:], res.model[id]())(5100.)) end for id in 1:length(res.bestfit.preds) push!(tabellone, (id, epoch_filenames[id][27:end-4], bestfit[id][:galaxy].norm.val, bestfit[id][:qso_cont].alpha.val, cont_at(bestfit[id], 4000)[1], models[(id,:l5100)], bestfit[id][:bb_Ha].norm.patched, bestfit[id][:bb_Ha].fwhm.patched, bestfit[id][:bb_Ha].voff.patched, bestfit[id][:br_Ha].norm.patched, bestfit[id][:br_Ha].fwhm.patched, bestfit[id][:br_Ha].voff.patched, bestfit[id][:na_Ha].norm.patched, bestfit[id][:na_Ha].fwhm.patched, bestfit[id][:na_Ha].voff.patched, bestfit[id][:bb_Hb].norm.patched, bestfit[id][:bb_Hb].fwhm.patched, bestfit[id][:bb_Hb].voff.patched, bestfit[id][:br_Hb].norm.patched, bestfit[id][:br_Hb].fwhm.patched, bestfit[id][:br_Hb].voff.patched, bestfit[id][:na_Hb].norm.patched, bestfit[id][:na_Hb].fwhm.patched, bestfit[id][:na_Hb].voff.patched, bestfit[id][:OIII_5007].fwhm.patched, bestfit[id][:OIII_5007].voff.patched)) res.bestfit[id][:galaxy].norm.val, res.bestfit[id][:qso_cont].alpha.val, cont_at(res.bestfit[id], 4000)[1], l5100[id], res.bestfit[id][:bb_Ha].norm.patched, res.bestfit[id][:bb_Ha].fwhm.patched, res.bestfit[id][:bb_Ha].voff.patched, res.bestfit[id][:br_Ha].norm.patched, res.bestfit[id][:br_Ha].fwhm.patched, res.bestfit[id][:br_Ha].voff.patched, res.bestfit[id][:na_Ha].norm.patched, res.bestfit[id][:na_Ha].fwhm.patched, res.bestfit[id][:na_Ha].voff.patched, res.bestfit[id][:bb_Hb].norm.patched, res.bestfit[id][:bb_Hb].fwhm.patched, res.bestfit[id][:bb_Hb].voff.patched, res.bestfit[id][:br_Hb].norm.patched, res.bestfit[id][:br_Hb].fwhm.patched, res.bestfit[id][:br_Hb].voff.patched, res.bestfit[id][:na_Hb].norm.patched, res.bestfit[id][:na_Hb].fwhm.patched, res.bestfit[id][:na_Hb].voff.patched, res.bestfit[id][:OIII_5007].fwhm.patched, res.bestfit[id][:OIII_5007].voff.patched)) end dd = Date.(tabellone.date, Ref("yyyymmdd")) Loading @@ -251,42 +257,43 @@ f = FITS("1ES_1927p654_results_$(job).fits", "w") write(f, tabellone) close(f) @gp( [bestfit[id][:qso_cont].alpha.val for id in 1:length(chosen_epochs)], [bestfit[id][:br_Ha].norm.patched for id in 1:length(chosen_epochs)], @gp( [res.bestfit[id][:qso_cont].alpha.val for id in 1:length(chosen_epochs)], [res.bestfit[id][:br_Ha].norm.patched for id in 1:length(chosen_epochs)], "w l") @gp(:-, [bestfit[id][:qso_cont].alpha.val for id in 1:length(chosen_epochs)], [bestfit[id][:br_Hb].norm.patched for id in 1:length(chosen_epochs)], [res.bestfit[id][:qso_cont].alpha.val for id in 1:length(chosen_epochs)], [res.bestfit[id][:br_Hb].norm.patched for id in 1:length(chosen_epochs)], "w l") @gp( [bestfit[id][:qso_cont].alpha.val for id in 1:length(chosen_epochs)], [cont_at(bestfit[id], 5100)[1] for id in 1:length(chosen_epochs)], @gp( [res.bestfit[id][:qso_cont].alpha.val for id in 1:length(chosen_epochs)], [cont_at(res.bestfit[id], 5100)[1] for id in 1:length(chosen_epochs)], "w l") @gp( [cont_at(bestfit[id], 5100)[1] for id in 1:length(chosen_epochs)], [bestfit[id][:br_Ha].norm.patched for id in 1:length(chosen_epochs)], @gp( [cont_at(res.bestfit[id], 5100)[1] for id in 1:length(chosen_epochs)], [res.bestfit[id][:br_Ha].norm.patched for id in 1:length(chosen_epochs)], "w l") @gp( [models[(id, :l5100)] for id in 1:length(chosen_epochs)], [bestfit[id][:br_Ha].norm.patched for id in 1:length(chosen_epochs)], @gp( l5100, [res.bestfit[id][:br_Ha].norm.patched for id in 1:length(chosen_epochs)], "w l") @gp tabellone.day [cont_at(bestfit[id], 5100)[1] for id in 1:length(chosen_epochs)] "w lp" ylog=true @gp :- tabellone.day [bestfit[id][:br_Ha].norm.patched for id in 1:length(chosen_epochs)] .* 1e2 "w lp" @gp :- tabellone.day [bestfit[id][:br_Hb].norm.patched for id in 1:length(chosen_epochs)] .* 1e2 "w lp" @gp :- tabellone.day [models[(id, :l5100)] for id in 1:length(chosen_epochs)] "w lp" @gp tabellone.day [cont_at(res.bestfit[id], 5100)[1] for id in 1:length(chosen_epochs)] "w lp" ylog=true @gp :- tabellone.day [res.bestfit[id][:br_Ha].norm.patched for id in 1:length(chosen_epochs)] .* 1e2 "w lp" @gp :- tabellone.day [res.bestfit[id][:br_Hb].norm.patched for id in 1:length(chosen_epochs)] .* 1e2 "w lp" @gp :- tabellone.day l5100 "w lp" @gp tabellone.day -3 .+ 1e-3 .*[cont_at(bestfit[id], 5100)[1] for id in 1:length(chosen_epochs)] "w lp" @gp :- tabellone.day [bestfit[id][:qso_cont].alpha.val for id in 1:length(chosen_epochs)] "w lp" @gp tabellone.day -3 .+ 1e-3 .*[cont_at(res.bestfit[id], 5100)[1] for id in 1:length(chosen_epochs)] "w lp" @gp :- tabellone.day [res.bestfit[id][:qso_cont].alpha.val for id in 1:length(chosen_epochs)] "w lp" @gp "set grid" for id in 1:length(chosen_epochs) @gp :- models[(id, :x)] models[(id, :y)] "w l t '$id' lw 3" #@gp :- domain(res.model[id])[:] res.model[id]() "w l t '$id' lw 3" @gp :- domain(res.model[id])[:] res.model[id](:qso_cont) "w l t '$id' lw 3" #@gp :- models[(id, :x)] models[(id, :qso_cont)] "w l t '$id' lw 2" end save(:prenorm, term="png size 800,600", output="output/evolution.png") Loading @@ -294,10 +301,10 @@ save(:prenorm, term="png size 800,600", output="output/evolution.png") @gp "set grid" for id in 1:length(chosen_epochs) println(bestfit[id][:OIII_5007]) x = models[(id, :x)] y = models[(id, :y)] y0 = y .- models[(id, :OIII_5007)] println(res.bestfit[id][:OIII_5007]) x = domain(res.model[id])[:] y = res.model[id]() y0 = y .- res.model[id](:OIII_5007) #@gp :- x y0 .- Spline1D(x, y0)(5007.) "w l t '$id'" @gp :- x y .- Spline1D(x, y0)(5007.) "w l t '$id'" end Loading