Skip to content

Commit

Permalink
Extra parameters in petitcode_param
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasstolker committed Jun 12, 2021
1 parent 01bb8ff commit 83f3489
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
14 changes: 9 additions & 5 deletions species/data/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -2926,6 +2926,15 @@ def petitcode_param(self,
if 'fsed' in model_param:
pcode_param['fsed'] = model_param['fsed']

if 'sigma_lnorm' in model_param:
pcode_param['sigma_lnorm'] = model_param['sigma_lnorm']

if 'log_p_quench' in model_param:
pcode_param['log_p_quench'] = model_param['log_p_quench']
p_quench = 10.**model_param['log_p_quench']
else:
p_quench = None

pressure = np.logspace(-6., 3., 180)

if sample_box.attributes['pt_profile'] == 'molliere':
Expand All @@ -2951,11 +2960,6 @@ def petitcode_param(self,
temperature = retrieval_util.pt_spline_interp(
knot_press, knot_temp, pressure, pt_smooth=pt_smooth)

if 'log_p_quench' in model_param:
p_quench = 10.**model_param['log_p_quench']
else:
p_quench = None

from poor_mans_nonequ_chem.poor_mans_nonequ_chem import interpol_abundances

# Interpolate the abundances, following chemical equilibrium
Expand Down
3 changes: 1 addition & 2 deletions species/read/read_radtrans.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,8 +372,7 @@ def get_model(self,

wavelength, flux, emission_contr = retrieval_util.calc_spectrum_clouds(
self.rt_object, self.pressure, temp, c_o_ratio, metallicity,
p_quench, log_x_abund, log_x_base, model_param['fsed'],
log_kzz, model_param['logg'], model_param['sigma_lnorm'],
p_quench, log_x_abund, log_x_base, model_param, model_param['logg'],
chemistry=chemistry, pressure_grid=self.pressure_grid,
plotting=False, contribution=True, tau_cloud=tau_cloud,
cloud_wavel=self.cloud_wavel)
Expand Down

0 comments on commit 83f3489

Please sign in to comment.