Skip to content

Commit

Permalink
add the rest of the log like args
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunsavel committed Aug 21, 2024
1 parent 2bf1f66 commit dcba311
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
29 changes: 28 additions & 1 deletion src/scope/emcee_fit_hires.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ def log_prob(
A_noplanet,
star,
n_princ_comp,
flux_cube,
wl_model,
Fstar_conv,
Rp_solar,
Rstar,
phases,
do_pca,
):
"""
Expand All @@ -37,6 +43,7 @@ def log_prob(
-------
:log_prob: (float) log probability.
"""
rv_semiamp_orbit = 0.0
Kp, Vsys, log_scale = x
scale = np.power(10, log_scale)
prior_val = prior(x, best_kp)
Expand All @@ -49,14 +56,22 @@ def log_prob(
Kp,
scale,
wl_cube_model,
wl_model,
Fp_conv,
Fstar_conv,
flux_cube,
n_order,
n_exposure,
n_pixel,
A_noplanet=A_noplanet,
phases,
Rp_solar,
Rstar,
rv_semiamp_orbit,
A_noplanet,
do_pca=do_pca,
n_princ_comp=n_princ_comp,
star=star,
observation="emission",
)[0]
)

Expand Down Expand Up @@ -96,6 +111,12 @@ def sample(
n_pixel,
star,
n_princ_comp,
flux_cube,
wl_model,
Fstar_conv,
Rp_solar,
Rstar,
phases,
do_pca=True,
best_kp=192.06,
best_vsys=0.0,
Expand Down Expand Up @@ -148,6 +169,12 @@ def sample(
A_noplanet,
star,
n_princ_comp,
flux_cube,
wl_model,
Fstar_conv,
Rp_solar,
Rstar,
phases,
do_pca,
),
pool=pool,
Expand Down
15 changes: 15 additions & 0 deletions src/scope/tests/test_emcee_fit_hires.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ def test_likelihood(test_baseline_outouts, test_inputs):
n_pixel,
) = test_baseline_outouts
star = True
Rp_solar = 0.1
Rstar = 1.0
phases = np.linspace(-0.01, 0.01, n_exposure)
Fp_conv, Fstar_conv, wl_cube_model, wl_model = test_inputs
best_kp = 150
x_good = [150, 0, 0]
Expand All @@ -54,6 +57,12 @@ def test_likelihood(test_baseline_outouts, test_inputs):
A_noplanet,
star,
n_princ_comp,
flux_cube,
wl_model,
Fstar_conv,
Rp_solar,
Rstar,
phases,
do_pca,
)

Expand All @@ -68,6 +77,12 @@ def test_likelihood(test_baseline_outouts, test_inputs):
A_noplanet,
star,
n_princ_comp,
flux_cube,
wl_model,
Fstar_conv,
Rp_solar,
Rstar,
phases,
do_pca,
)

Expand Down

0 comments on commit dcba311

Please sign in to comment.