gwkokab.analysis.n_pls_m_gs.analytical ====================================== .. py:module:: gwkokab.analysis.n_pls_m_gs.analytical Classes ------- .. autoapisummary:: gwkokab.analysis.n_pls_m_gs.analytical.NPowerlawMGaussianAnalyticalAnalysis gwkokab.analysis.n_pls_m_gs.analytical.NPowerlawMGaussianFAnalyticalAnalysis gwkokab.analysis.n_pls_m_gs.analytical.NPowerlawMGaussianNAnalyticalAnalysis Functions --------- .. autoapisummary:: gwkokab.analysis.n_pls_m_gs.analytical.main Module Contents --------------- .. py:class:: NPowerlawMGaussianAnalyticalAnalysis(N_pl: int, N_g: int, use_beta_spin_magnitude: bool, use_spin_magnitude_mixture: bool, use_truncated_normal_spin_x: bool, use_truncated_normal_spin_y: bool, use_truncated_normal_spin_z: bool, use_chi_eff_mixture: bool, use_skew_normal_chi_eff: bool, use_truncated_normal_chi_p: bool, use_tilt: bool, use_eccentricity_mixture: bool, use_eccentricity_powerlaw: bool, use_powerlaw_redshift: bool, use_madau_dickinson_redshift: bool, use_cos_iota: bool, use_phi_12: bool, use_polarization_angle: bool, use_right_ascension: bool, use_sin_declination: bool, use_detection_time: bool, use_phi_1: bool, use_phi_2: bool, use_phi_orb: bool, use_mean_anomaly: bool, likelihood_fn: collections.abc.Callable[Ellipsis, collections.abc.Callable], data_loader: gwkokab.analysis.core.inference_io.AnalyticalPELoader, prior_filename: str, poisson_mean_filename: str, sampler_cfg, variance_cut_threshold: float | None, n_samples: int, debug_nans: bool = False, profile_memory: bool = False, check_leaks: bool = False) Bases: :py:obj:`gwkokab.analysis.n_pls_m_gs.common.NPowerlawMGaussianCore`, :py:obj:`gwkokab.analysis.core.analytical_base.AnalyticalBase` AnalysisBase is a class which contains all the common functionality among the different analyses. It is not meant to be used directly, but rather to be subclassed by the specific analyses. :param likelihood_fn: A function that takes the model parameters and returns a function that computes the log-likelihood. :type likelihood_fn: Callable[..., Callable[..., Array]] :param model: model to be used in the AnalyticalBase class. It can be a Distribution or a callable that returns a Distribution. :type model: Union[Distribution, Callable[..., Distribution]] :param data_loader: data loader for the analytical PE data. :type data_loader: AnalyticalPELoader :param seed: seed for the random number generator. :type seed: int :param prior_filename: path to the JSON file containing the prior distributions. :type prior_filename: str :param poisson_mean_filename: path to the JSON file containing the Poisson mean configuration. :type poisson_mean_filename: str :param flowMC_settings_filename: path to the JSON file containing the flowMC settings. :type flowMC_settings_filename: str :param debug_nans: If True, checks for NaNs in each computation. See details in the [documentation](https://jax.readthedocs.io/en/latest/_autosummary/jax.debug_nans.html#jax.debug_nans), by default False :type debug_nans: bool, optional :param profile_memory: If True, enables memory profiling, by default False :type profile_memory: bool, optional :param check_leaks: If True, checks for JAX Tracer leaks. See details in the [documentation](https://jax.readthedocs.io/en/latest/_autosummary/jax.checking_leaks.html#jax.checking_leaks), by default False :type check_leaks: bool, optional :param analysis_name: Name of the analysis, by default "" :type analysis_name: str, optional .. py:class:: NPowerlawMGaussianFAnalyticalAnalysis(N_pl: int, N_g: int, use_beta_spin_magnitude: bool, use_spin_magnitude_mixture: bool, use_truncated_normal_spin_x: bool, use_truncated_normal_spin_y: bool, use_truncated_normal_spin_z: bool, use_chi_eff_mixture: bool, use_skew_normal_chi_eff: bool, use_truncated_normal_chi_p: bool, use_tilt: bool, use_eccentricity_mixture: bool, use_eccentricity_powerlaw: bool, use_powerlaw_redshift: bool, use_madau_dickinson_redshift: bool, use_cos_iota: bool, use_phi_12: bool, use_polarization_angle: bool, use_right_ascension: bool, use_sin_declination: bool, use_detection_time: bool, use_phi_1: bool, use_phi_2: bool, use_phi_orb: bool, use_mean_anomaly: bool, likelihood_fn: collections.abc.Callable[Ellipsis, collections.abc.Callable], data_loader: gwkokab.analysis.core.inference_io.AnalyticalPELoader, prior_filename: str, poisson_mean_filename: str, sampler_cfg, variance_cut_threshold: float | None, n_samples: int, debug_nans: bool = False, profile_memory: bool = False, check_leaks: bool = False) Bases: :py:obj:`NPowerlawMGaussianAnalyticalAnalysis`, :py:obj:`gwkokab.analysis.core.flowMC_base.FlowMCBase` AnalysisBase is a class which contains all the common functionality among the different analyses. It is not meant to be used directly, but rather to be subclassed by the specific analyses. :param likelihood_fn: A function that takes the model parameters and returns a function that computes the log-likelihood. :type likelihood_fn: Callable[..., Callable[..., Array]] :param model: model to be used in the AnalyticalBase class. It can be a Distribution or a callable that returns a Distribution. :type model: Union[Distribution, Callable[..., Distribution]] :param data_loader: data loader for the analytical PE data. :type data_loader: AnalyticalPELoader :param seed: seed for the random number generator. :type seed: int :param prior_filename: path to the JSON file containing the prior distributions. :type prior_filename: str :param poisson_mean_filename: path to the JSON file containing the Poisson mean configuration. :type poisson_mean_filename: str :param flowMC_settings_filename: path to the JSON file containing the flowMC settings. :type flowMC_settings_filename: str :param debug_nans: If True, checks for NaNs in each computation. See details in the [documentation](https://jax.readthedocs.io/en/latest/_autosummary/jax.debug_nans.html#jax.debug_nans), by default False :type debug_nans: bool, optional :param profile_memory: If True, enables memory profiling, by default False :type profile_memory: bool, optional :param check_leaks: If True, checks for JAX Tracer leaks. See details in the [documentation](https://jax.readthedocs.io/en/latest/_autosummary/jax.checking_leaks.html#jax.checking_leaks), by default False :type check_leaks: bool, optional :param analysis_name: Name of the analysis, by default "" :type analysis_name: str, optional .. py:class:: NPowerlawMGaussianNAnalyticalAnalysis(N_pl: int, N_g: int, use_beta_spin_magnitude: bool, use_spin_magnitude_mixture: bool, use_truncated_normal_spin_x: bool, use_truncated_normal_spin_y: bool, use_truncated_normal_spin_z: bool, use_chi_eff_mixture: bool, use_skew_normal_chi_eff: bool, use_truncated_normal_chi_p: bool, use_tilt: bool, use_eccentricity_mixture: bool, use_eccentricity_powerlaw: bool, use_powerlaw_redshift: bool, use_madau_dickinson_redshift: bool, use_cos_iota: bool, use_phi_12: bool, use_polarization_angle: bool, use_right_ascension: bool, use_sin_declination: bool, use_detection_time: bool, use_phi_1: bool, use_phi_2: bool, use_phi_orb: bool, use_mean_anomaly: bool, likelihood_fn: collections.abc.Callable[Ellipsis, collections.abc.Callable], data_loader: gwkokab.analysis.core.inference_io.AnalyticalPELoader, prior_filename: str, poisson_mean_filename: str, sampler_cfg, variance_cut_threshold: float | None, n_samples: int, debug_nans: bool = False, profile_memory: bool = False, check_leaks: bool = False) Bases: :py:obj:`NPowerlawMGaussianAnalyticalAnalysis`, :py:obj:`gwkokab.analysis.core.numpyro_base.NumpyroBase` AnalysisBase is a class which contains all the common functionality among the different analyses. It is not meant to be used directly, but rather to be subclassed by the specific analyses. :param likelihood_fn: A function that takes the model parameters and returns a function that computes the log-likelihood. :type likelihood_fn: Callable[..., Callable[..., Array]] :param model: model to be used in the AnalyticalBase class. It can be a Distribution or a callable that returns a Distribution. :type model: Union[Distribution, Callable[..., Distribution]] :param data_loader: data loader for the analytical PE data. :type data_loader: AnalyticalPELoader :param seed: seed for the random number generator. :type seed: int :param prior_filename: path to the JSON file containing the prior distributions. :type prior_filename: str :param poisson_mean_filename: path to the JSON file containing the Poisson mean configuration. :type poisson_mean_filename: str :param flowMC_settings_filename: path to the JSON file containing the flowMC settings. :type flowMC_settings_filename: str :param debug_nans: If True, checks for NaNs in each computation. See details in the [documentation](https://jax.readthedocs.io/en/latest/_autosummary/jax.debug_nans.html#jax.debug_nans), by default False :type debug_nans: bool, optional :param profile_memory: If True, enables memory profiling, by default False :type profile_memory: bool, optional :param check_leaks: If True, checks for JAX Tracer leaks. See details in the [documentation](https://jax.readthedocs.io/en/latest/_autosummary/jax.checking_leaks.html#jax.checking_leaks), by default False :type check_leaks: bool, optional :param analysis_name: Name of the analysis, by default "" :type analysis_name: str, optional .. py:function:: main() -> None