Loading run.jl +8 −8 Original line number Diff line number Diff line Loading @@ -28,11 +28,11 @@ function read_spec(epoch_id; kw...) file = epoch_filenames[epoch_id] end println(file) spec = Spectrum(Val(:ASCII), file, columns=[1,2]; kw...); spec = Spectrum(Val(:ASCII), file, columns=[1,2]; label="$epoch_id: $file", kw...); if isa(epoch_id, Number) spec.flux ./= all_scale[epoch_id] end spec.err .= 0.05 .* spec.flux; spec.err .= 0.05 .* median(spec.flux); return spec end Loading Loading @@ -125,8 +125,8 @@ dict_chosen_epochs = Dict( :lowres => [8,9,10,11,12,14,15,16,18,21,22,23,24,25], :highres => [5, 7, 13, 17, 20], :limited => [1,2,3,13], :all => collect(1:26)) deleteat!(dict_chosen_epochs[:all], 4) #insufficient coverage in na_Hg :all => collect(5:26)) # deleteat!(dict_chosen_epochs[:all], 4) #insufficient coverage in na_Hg # Can't use resolution smaller than 150 km / s otherwise some line # will be neglected because of spectral coverage Loading @@ -136,16 +136,16 @@ resolution = Dict( job = :all chosen_epochs = dict_chosen_epochs[job] Nloop = 6 for loop in 1:Nloop chosen_epochs = dict_chosen_epochs[job] source = QSO{q1927p654}("1ES 1927+654", Z, ebv=EBV); source.options[:min_spectral_coverage][:OIII_5007] = 0.5 @gp :zoom "set grid" :- for id in 1:length(chosen_epochs) spec = read_spec(chosen_epochs[id], resolution=get(resolution, job, NaN)) for id in chosen_epochs spec = read_spec(id, resolution=get(resolution, job, NaN)) add_spec!(source, spec); @gp :- :zoom xr=[4750,5150] spec.λ ./ (1 + source.z) spec.flux "w l t '$(chosen_epochs[id])'" @gp :- :zoom xr=[4750,5150] spec.λ ./ (1 + source.z) spec.flux "w l t '$(id)'" end (model, bestfit) = multi_fit(source); viewer(model, source, bestfit, showcomps=[:qso_cont, :galaxy, :balmer], Loading Loading
run.jl +8 −8 Original line number Diff line number Diff line Loading @@ -28,11 +28,11 @@ function read_spec(epoch_id; kw...) file = epoch_filenames[epoch_id] end println(file) spec = Spectrum(Val(:ASCII), file, columns=[1,2]; kw...); spec = Spectrum(Val(:ASCII), file, columns=[1,2]; label="$epoch_id: $file", kw...); if isa(epoch_id, Number) spec.flux ./= all_scale[epoch_id] end spec.err .= 0.05 .* spec.flux; spec.err .= 0.05 .* median(spec.flux); return spec end Loading Loading @@ -125,8 +125,8 @@ dict_chosen_epochs = Dict( :lowres => [8,9,10,11,12,14,15,16,18,21,22,23,24,25], :highres => [5, 7, 13, 17, 20], :limited => [1,2,3,13], :all => collect(1:26)) deleteat!(dict_chosen_epochs[:all], 4) #insufficient coverage in na_Hg :all => collect(5:26)) # deleteat!(dict_chosen_epochs[:all], 4) #insufficient coverage in na_Hg # Can't use resolution smaller than 150 km / s otherwise some line # will be neglected because of spectral coverage Loading @@ -136,16 +136,16 @@ resolution = Dict( job = :all chosen_epochs = dict_chosen_epochs[job] Nloop = 6 for loop in 1:Nloop chosen_epochs = dict_chosen_epochs[job] source = QSO{q1927p654}("1ES 1927+654", Z, ebv=EBV); source.options[:min_spectral_coverage][:OIII_5007] = 0.5 @gp :zoom "set grid" :- for id in 1:length(chosen_epochs) spec = read_spec(chosen_epochs[id], resolution=get(resolution, job, NaN)) for id in chosen_epochs spec = read_spec(id, resolution=get(resolution, job, NaN)) add_spec!(source, spec); @gp :- :zoom xr=[4750,5150] spec.λ ./ (1 + source.z) spec.flux "w l t '$(chosen_epochs[id])'" @gp :- :zoom xr=[4750,5150] spec.λ ./ (1 + source.z) spec.flux "w l t '$(id)'" end (model, bestfit) = multi_fit(source); viewer(model, source, bestfit, showcomps=[:qso_cont, :galaxy, :balmer], Loading