Skip to content

Commit

Permalink
remove the filler code from emcee fit
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunsavel committed Aug 21, 2024
1 parent c8e2b27 commit 257f188
Showing 1 changed file with 0 additions and 40 deletions.
40 changes: 0 additions & 40 deletions src/scope/emcee_fit_hires.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,43 +181,3 @@ def sample(
sampler.run_mcmc(pos, nsample, progress=True)

return sampler


if __name__ == "__main__":
# example below!

# ind = eval(sys.argv[1])
ind = 111 # SNR = 60, blaze, tell, star, 4 PCA components
param_dict = parameter_list[ind]

blaze, NPC, star, SNR, telluric = (
param_dict["blaze"],
param_dict["n_princ_comp"],
param_dict["star"],
param_dict["SNR"],
param_dict["telluric"],
)

lls, ccfs = np.zeros((50, 50)), np.zeros((50, 50))

A_noplanet, fTemp, fTemp_nopca, just_tellurics = make_data(
1.0,
wl_cube_model,
do_pca=True,
blaze=blaze,
n_princ_comp=NPC,
tellurics=telluric,
Vsys=0,
star=star,
Kp=192.06,
SNR=SNR,
)

with open("mcmc_pre_pca.pkl", "wb") as f:
pickle.dump(fTemp_nopca, f)
nchains = 26
nsample = 5000
sampler = sample(nchains, nsample, A_noplanet, fTemp, do_pca=True)
with open("mcmc_samples.pkl", "wb") as f:
pickle.dump(sampler, f)
# np.savetxt('output/mcmc_samples.txt', samples)

0 comments on commit 257f188

Please sign in to comment.