diff --git a/AUTHORS.md b/AUTHORS.md index 1c137a2aa05b8a7e471cb02f51d91c5a2021068e..8c227ed6fe28947d34bf93e400af3837634bd689 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -29,6 +29,7 @@ Gregory Ashton Hank Hua Hector Estelles Ignacio Magaña Hernandez +Isaac McMahon Isobel Marguarethe Romero-Shaw Jack Heinzel Jacob Golomb diff --git a/bilby/gw/prior.py b/bilby/gw/prior.py index 5e9f670d5acb0fa7c8bf5de0519dad6ca9e6d87b..2176741113110de29a0499ba4ee2d525094c6d80 100644 --- a/bilby/gw/prior.py +++ b/bilby/gw/prior.py @@ -1362,6 +1362,7 @@ class HealPixMapPriorDist(BaseJointPriorDist): else: self.distance = False self.prob = self.hp.read_map(hp_file) + self.prob = self._check_norm(self.prob) super(HealPixMapPriorDist, self).__init__(names=names, bounds=bounds) self.distname = "hpmap" @@ -1501,9 +1502,7 @@ class HealPixMapPriorDist(BaseJointPriorDist): sample : array_like sample of ra, and dec (and distance if 3D=True) """ - pixel_choices = np.arange(self.npix) - pixel_probs = self._check_norm(self.prob) - sample_pix = random.rng.choice(pixel_choices, size=size, p=pixel_probs, replace=True) + sample_pix = random.rng.choice(self.npix, size=size, p=self.prob, replace=True) sample = np.empty((size, self.num_vars)) for samp in range(size): theta, ra = self.hp.pix2ang(self.nside, sample_pix[samp]) diff --git a/test/check_author_list.py b/test/check_author_list.py index c04932d5eaa945867eb4be4bf2e5f328d40d5946..95d5be1ca2ac9cbd0a601b24460435e1f69731b2 100644 --- a/test/check_author_list.py +++ b/test/check_author_list.py @@ -3,7 +3,7 @@ import re import subprocess -special_cases = ["plasky", "thomas", "mj-will", "richard", "douglas"] +special_cases = ["plasky", "thomas", "mj-will", "richard", "douglas", "nixnyxnyx"] AUTHORS_list = [] with open("AUTHORS.md", "r") as f: AUTHORS_list = " ".join([line for line in f]).lower()