Skip to content

Commit

Permalink
Update src/tdastro/math_nodes/ra_dec_sampler.py
Browse files Browse the repository at this point in the history
Co-authored-by: Konstantin Malanchev <[email protected]>
  • Loading branch information
jeremykubica and hombit authored Jan 2, 2025
1 parent 725ea80 commit 159e85e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tdastro/math_nodes/ra_dec_sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def compute(self, graph_state, rng_info=None, **kwargs):

# Generate the random (RA, dec) lists.
ra = rng.uniform(0.0, 2.0 * np.pi, size=graph_state.num_samples)
dec = np.arccos(2.0 * rng.uniform(0.0, 1.0, size=graph_state.num_samples) - 1.0) - (np.pi / 2.0)
dec = np.arcsin(rng.uniform(-1.0, 1.0, size=graph_state.num_samples))
if self.use_degrees:
ra = np.degrees(ra)
dec = np.degrees(dec)
Expand Down

0 comments on commit 159e85e

Please sign in to comment.