Advanced JAVELIN
Now that we’ve seen all of the arguments to the JAVELIN module of pyPetal, we can use more complex arguments:
[1]:
%matplotlib inline
import pypetal_jav.pipeline as pl
import numpy as np
output_dir = 'javelin_output5/'
line_names = ['Continuum', 'H-alpha', 'H-beta']
fixed1 = None
p_fix1 = None
fixed2 = [ 1, 0, 1, 0, 1, 1 ]
p_fix2 = [ 0, np.log(190), 0, 15, 0, 0 ]
params = {
'nwalker': 50,
'nburn': 50,
'nchain': 100,
'lagtobaseline': 0.1,
'subtract_mean': False,
'nbin': 100,
'together': False,
'rm_type': "phot",
'fixed': [fixed1, fixed2],
'p_fix': [p_fix1, p_fix2]
}
res = pl.run_pipeline( output_dir, line_names,
javelin_params=params,
verbose=True,
plot=True,
file_fmt='ascii',
lag_bounds=['baseline', [-600, 800]],
threads=30)
Running JAVELIN
--------------------
rm_type: phot
lagtobaseline: 0.1
laglimit: [[-1976.98849, 1976.98849], [-600, 800]]
fixed: True
p_fix: True
subtract_mean: False
nwalker: 50
nburn: 50
nchain: 100
output_chains: True
output_burn: True
output_logp: True
nbin: 100
metric: med
together: False
--------------------
start burn-in
nburn: 50 nwalkers: 50 --> number of burn-in iterations: 2500
burn-in finished
save burn-in chains to /home/stone28/pypetal/javelin_output5/H-alpha/javelin/burn_cont.txt
start sampling
sampling finished
acceptance fractions for all walkers are
0.67 0.78 0.70 0.66 0.59 0.78 0.67 0.67 0.82 0.74 0.75 0.66 0.67 0.71 0.72 0.74 0.70 0.81 0.69 0.76 0.75 0.71 0.67 0.65 0.78 0.67 0.65 0.69 0.74 0.66 0.72 0.64 0.72 0.69 0.78 0.71 0.69 0.72 0.80 0.79 0.60 0.75 0.74 0.73 0.70 0.73 0.69 0.64 0.75 0.72
save MCMC chains to /home/stone28/pypetal/javelin_output5/H-alpha/javelin/chain_cont.txt
save logp of MCMC chains to /home/stone28/pypetal/javelin_output5/H-alpha/javelin/logp_cont.txt
HPD of sigma
low: 1.776 med 2.150 hig 2.894
HPD of tau
low: 140.726 med 215.777 hig 393.146
run parallel chains of number 30
start burn-in
using priors on sigma and tau from continuum fitting
[[ 1.776 140.726]
[ 2.15 215.777]
[ 2.894 393.146]]
penalize lags longer than 0.10 of the baseline
nburn: 50 nwalkers: 50 --> number of burn-in iterations: 2500
burn-in finished
save burn-in chains to /home/stone28/pypetal/javelin_output5/H-alpha/javelin/burn_rmap.txt
start sampling
sampling finished
acceptance fractions are
0.11 0.09 0.13 0.05 0.04 0.11 0.07 0.09 0.02 0.09 0.03 0.04 0.04 0.11 0.08 0.05 0.08 0.06 0.07 0.01 0.03 0.14 0.14 0.13 0.07 0.02 0.05 0.09 0.04 0.09 0.10 0.06 0.13 0.07 0.05 0.05 0.09 0.12 0.06 0.03 0.06 0.15 0.06 0.09 0.07 0.05 0.13 0.12 0.15 0.07
save MCMC chains to /home/stone28/pypetal/javelin_output5/H-alpha/javelin/chain_rmap.txt
save logp of MCMC chains to /home/stone28/pypetal/javelin_output5/H-alpha/javelin/logp_rmap.txt
HPD of sigma
low: 1.991 med 2.244 hig 2.670
HPD of tau
low: 171.247 med 226.595 hig 312.716
HPD of lag_line
low: -1935.102 med 179.421 hig 1932.166
HPD of wid_line
low: 5.948 med 8.832 hig 10.833
HPD of scale_line
low: 0.529 med 0.708 hig 0.899
HPD of alpha
low: 0.163 med 0.346 hig 0.615
covariance matrix calculated
covariance matrix decomposed and updated by U
start burn-in
nburn: 50 nwalkers: 50 --> number of burn-in iterations: 2500
burn-in finished
save burn-in chains to /home/stone28/pypetal/javelin_output5/H-beta/javelin/burn_cont.txt
start sampling
sampling finished
acceptance fractions for all walkers are
0.82 0.76 0.78 0.69 0.77 0.84 0.73 0.76 0.74 0.77 0.86 0.77 0.76 0.88 0.83 0.84 0.67 0.83 0.65 0.75 0.85 0.76 0.63 0.79 0.76 0.85 0.74 0.76 0.74 0.78 0.78 0.78 0.78 0.84 0.78 0.71 0.82 0.76 0.70 0.72 0.78 0.76 0.72 0.81 0.83 0.81 0.74 0.73 0.78 0.81
save MCMC chains to /home/stone28/pypetal/javelin_output5/H-beta/javelin/chain_cont.txt
save logp of MCMC chains to /home/stone28/pypetal/javelin_output5/H-beta/javelin/logp_cont.txt
HPD of sigma
low: 1.882 med 2.028 hig 2.204
HPD of tau
low: 190.000 med 190.000 hig 190.000
run parallel chains of number 30
start burn-in
using priors on sigma and tau from continuum fitting
[[ 1.882 190. ]
[ 2.028 190. ]
[ 2.204 190. ]]
penalize lags longer than 0.10 of the baseline
nburn: 50 nwalkers: 50 --> number of burn-in iterations: 2500
burn-in finished
save burn-in chains to /home/stone28/pypetal/javelin_output5/H-beta/javelin/burn_rmap.txt
start sampling
sampling finished
acceptance fractions are
0.14 0.05 0.14 0.07 0.02 0.12 0.09 0.14 0.15 0.08 0.18 0.14 0.18 0.14 0.10 0.11 0.13 0.06 0.09 0.15 0.08 0.13 0.07 0.13 0.17 0.08 0.15 0.22 0.14 0.09 0.21 0.07 0.26 0.03 0.08 0.18 0.12 0.10 0.04 0.11 0.17 0.09 0.08 0.15 0.08 0.25 0.08 0.23 0.09 0.09
save MCMC chains to /home/stone28/pypetal/javelin_output5/H-beta/javelin/chain_rmap.txt
save logp of MCMC chains to /home/stone28/pypetal/javelin_output5/H-beta/javelin/logp_rmap.txt
HPD of sigma
low: 1.980 med 2.048 hig 2.106
HPD of tau
low: 190.000 med 190.000 hig 190.000
HPD of lag_line
low: -536.977 med 191.348 hig 553.831
HPD of wid_line
low: 15.000 med 15.000 hig 15.000
HPD of scale_line
low: 0.651 med 0.769 hig 0.907
HPD of alpha
low: 0.057 med 0.238 hig 0.479
covariance matrix calculated
covariance matrix decomposed and updated by U
This produces the following output:
[ ]:
#For line 1:
res[0]
[ ]:
#For line 2:
res[1]