From 928d43793c6fc1990f0f35c97d9163255d847f46 Mon Sep 17 00:00:00 2001 From: MatthieuR18 Date: Thu, 8 Aug 2024 14:38:41 +0200 Subject: [PATCH] MR: Correction of the HiRISE type data loops when using cuts --- ForMoSA/adapt/adapt_obs_mod.py | 4 ++-- ForMoSA/nested_sampling/nested_sampling.py | 4 ++-- RELEASE_NOTES.txt | 15 +++++++++++++++ 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/ForMoSA/adapt/adapt_obs_mod.py b/ForMoSA/adapt/adapt_obs_mod.py index 016af49..3ac780f 100755 --- a/ForMoSA/adapt/adapt_obs_mod.py +++ b/ForMoSA/adapt/adapt_obs_mod.py @@ -88,9 +88,9 @@ def launch_adapt(global_params, justobs='no'): if len(transm_obs_extract) != 0: transm_obs_extract = np.concatenate((transm_obs_extract, obs_opt[c][1])) if len(star_flx_obs_extract) != 0: - star_flx_obs_extract = np.concatenate((star_flx_obs_extract, obs_opt[c][2])) + star_flx_obs_extract = np.concatenate((star_flx_obs_extract, obs_opt[c][2]), axis=1) if len(system_obs_extract) != 0: - system_obs_extract = np.concatenate((system_obs_extract, obs_opt[c][3]), axis=0) + system_obs_extract = np.concatenate((system_obs_extract, obs_opt[c][3]), axis=1) # Save the interpolated resolution of the grid res_mod_obs_merge.append(res_mod_cut) diff --git a/ForMoSA/nested_sampling/nested_sampling.py b/ForMoSA/nested_sampling/nested_sampling.py index b2c1232..5aad104 100755 --- a/ForMoSA/nested_sampling/nested_sampling.py +++ b/ForMoSA/nested_sampling/nested_sampling.py @@ -213,9 +213,9 @@ def loglike(theta, theta_index, global_params, main_file, for_plot='no'): if len(transm_obs_ns_u) != 0: # Merge the transmissions (if necessary) transm_obs_ns_u = np.concatenate((transm_obs_ns_u, transm_obs[ind_spectro])) if len(star_flx_obs_ns_u) != 0: # Merge star fluxes (if necessary) - star_flx_obs_ns_u = np.concatenate((star_flx_obs_ns_u, star_flx_obs[0,ind_grid_spectro_sel]),axis=0) + star_flx_obs_ns_u = np.concatenate((star_flx_obs_ns_u, star_flx_obs[0,ind_grid_spectro_sel]),axis=1) if len(system_obs) != 0: # Merge systematics model (if necessary) - system_obs_ns_u = np.concatenate((system_obs_ns_u, system_obs[0,ind_grid_spectro_sel]), axis=0) + system_obs_ns_u = np.concatenate((system_obs_ns_u, system_obs[0,ind_grid_spectro_sel]), axis=1) wav_obs_photo_ns_u = np.concatenate((wav_obs_photo_ns_u, wav_obs_photo[ind_photo])) flx_obs_photo_ns_u = np.concatenate((flx_obs_photo_ns_u, flx_obs_photo[ind_photo])) err_obs_photo_ns_u = np.concatenate((err_obs_photo_ns_u, err_obs_photo[ind_photo])) diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt index 02f2971..fc28c8c 100644 --- a/RELEASE_NOTES.txt +++ b/RELEASE_NOTES.txt @@ -361,3 +361,18 @@ Comments: Tests: Webpage API is generating without issues locally (make html) + + +- - - + +08/08/2024 + +Matthieu Ravet + +Comments: + - Correcting for the HiRISE type data merging when using cuts (i.e. remplacing axis=0 by axis=1). In the future, it would be + nice to create a more simple version of the star and systematic matrix (for now its (1, lambda, sys/star) it would be best to + have (lambda, sys/star) to avoid keeping large matrices accross the inversion) + +Tests: + - Test with CRIRES+ datasets with cuts in the adapt and in the fit \ No newline at end of file