Skip to content

Commit

Permalink
Sine is an illegal transform since its Jacobian could be negative
Browse files Browse the repository at this point in the history
  • Loading branch information
kazewong committed Jul 25, 2024
1 parent ca1d6b6 commit 2f3f412
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/jimgw/prior.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ class Uniform(Prior):
xmax: float

def __repr__(self):
return f"Uniform(xmin={self.xmin}, xmax={self.xmax})"
return f"Uniform(xmin={self.xmin}, xmax={self.xmax}, naming={self.parameter_names})"

def __init__(
self,
Expand Down
8 changes: 4 additions & 4 deletions src/jimgw/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,10 @@ def __init__(
super().__init__(name_mapping)
self.transform_func = lambda x: 1 / (1 + jnp.exp(-x))

class Sine(UnivariateTransform):
class ArcSine(UnivariateTransform):
"""
Transform from unconstrained space to uniform space.
ArcSine transformation
Parameters
----------
name_mapping : tuple[list[str], list[str]]
Expand All @@ -151,4 +151,4 @@ def __init__(
name_mapping: tuple[list[str], list[str]],
):
super().__init__(name_mapping)
self.transform_func = lambda x: jnp.sin(x)
self.transform_func = lambda x: jnp.arcsin(x)

0 comments on commit 2f3f412

Please sign in to comment.