===== Combined light curve inference ===== Whereas the previous section dealt with stand-alone Bayesian inferences with different models (kilonova, GRB afterglow), NMMA enables to run a combined inference using multiple models. Below, we show examples for 2 different types of sources: * Binary Neutron Star (BNS) * Neutron-Star-Black-Hole (NSBH) Here, we use the observed [[https://arxiv.org/pdf/2204.10864.pdf | GRB211211A ]] signal as a case study to run Bayesian inference with multiple models. In principle, this sort of signal can originate from a BNS source, but also a NSBH source could be explain the observed signature. === Example: BNS source === If we assume a BNS source, we can use the model ''TrPi2018'' for modelling Gamma-ray burst afterglows along with the kilonova model ''Bu2019lm''. To run a joint inference with these 2 models, we use the [[GRB211211A-data|observed data]] ''GRB211211A.txt'', an adapted [[prior-GRB211211A|prior file]] which includes prior settings for both models and the [[https://github.com/nuclear-multimessenger-astronomy/nmma/tree/main/svdmodels|model grid]] for the ''Bu2019lm'' kilonova model. The joint inference can be started using the command: mpiexec -np 16 light_curve_analysis --model Bu2019lm,TrPi2018 --svd-path /nmma/svdmodels/ --interpolation_type sklearn_gp --outdir outdir --label GRB211211A --prior ./Bu2019lm_TrPi2018GRB211211A.prior --tmin 0.01 --tmax 10 --dt 0.01 --error-budget 1 --nlive 1024 --Ebv-max 0 --trigger-time 59559.54791666667 --data ./GRB211211A.txt --plot --filters u,g,r,i,J,K --xlim 0,14 --ylim 26,16 The joint Bayesian inference using both model yields posterior samples for the source parameters describing the kilonova and GRB afterglow. Some of the source parameter posteriors are shown below. {{:grb211211a_bns_bu2019_trpi2018.jpg}} === Example: NSBH source === For the assumption that also a NSBH source could produce a signal such as GRB211211A, we use a NSBH-kilonova model ''Bu2019nsbh'' and again the model ''TrPi2018'' for modelling Gamma-ray burst afterglows. We use the same observational data and adapt the [[prior-Bunsbh-GRB211211A|prior]] setting for the ''Bu2019nsbh'' model. To run tje joint inference with these 2 models, run the command: mpiexec -np 16 light_curve_analysis --model Bu2019nsbh,TrPi2018 --svd-path /nmma/svdmodels/ --interpolation_type sklearn_gp --outdir outdir --label GRB211211A_NSBH --prior ./Bu2019nsbh_TrPi2018_GRB211211A.prior --tmin 0.01 --tmax 10 --dt 0.01 --error-budget 1 --nlive 1024 --Ebv-max 0 --trigger-time 59559.54791666667 --data ./GRB211211A.txt --plot --filters u,g,r,i,J,K --xlim 0,14 --ylim 26,16