How to use the function in bilby

To help you get started, we’ve selected a few bilby examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ColmTalbot / gwpopulation / gwpopulation / View on Github external
        new_samples = {
            key: xp.vstack(
                [[key][ii, new_idxs[ii]] for ii in range(self.n_posteriors)]
            for key in
        event_weights = list(event_weights)
        weight_string = " ".join([f"{float(weight):.1f}" for weight in event_weights])"Resampling done, sum of weights for events are {weight_string}")
        if return_weights:
            return new_samples, weights
            return new_samples
github ColmTalbot / gwpopulation / gwpopulation / View on Github external
if not isinstance(hyper_prior, Model):
            hyper_prior = Model([hyper_prior])
        self.hyper_prior = hyper_prior
        Likelihood.__init__(self, hyper_prior.parameters)

        if sampling_prior is not None:
            raise ValueError(
                "Passing a sampling_prior is deprecated and will be removed "
                "in the next release. This should be passed as a 'prior' "
                "column in the posteriors."
        elif "prior" in
            self.sampling_prior ="prior")
  "No prior values provided, defaulting to 1.")
            self.sampling_prior = 1

        if ln_evidences is not None:
            self.total_noise_evidence = np.sum(ln_evidences)
            self.total_noise_evidence = np.nan

        self.conversion_function = conversion_function
        self.selection_function = selection_function

        self.n_posteriors = len(posteriors)