Posteriors for "The Milky Way - Large Magellanic Cloud Interaction with Simulation Based Inference"
收藏资源简介:
A minimum working example to sample from these posteriors is as follows:import torchimport numpy as npdataset_summary_statistics = np.array([radial-velocities, tangential-velocities, LMC-pos-vel])[NOTE - dataset_summary_statistics depends on which posterior is to be sampled from i.e., h3-quadfoot-with-vtb has the following array strucutre: np.array([RV Q1, RV Q2, RV Q3, RV Q4, V_tb, LMC-pos-vel]), where e.g., RV Q1 are the summary statistic values in Fig.2(c).]posterior = torch.load("{posterior}.pth", weights_only=False)samples = posterior.sample(({Number-of-samples},), x={dataset_summary_statistics})Which will return {Number-of-samples} for each of the following parameters: total MW mass [10^11Msun], total LMC mass [10^10 Msun], log(DF strength), vtravel [km/s], l_axex [deg], b_apex [deg].



