Skip to content

Commit

Permalink
change dtype field for precision, make dtype a property instead
Browse files Browse the repository at this point in the history
  • Loading branch information
sbiquard committed Feb 13, 2025
1 parent 30c486d commit 3ab8642
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/furax/mapmaking/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class MapMakingConfig:
psd_fmin: float = 1e-2
hits_cut: float = 1e-2
cond_cut: float = 1e-2
dtype: DTypeLike = jnp.float64
precision: Literal[32, 64] = 64
debug: bool = True
solver: SolverConfig = SolverConfig()
landscape: LandscapeConfig = LandscapeConfig()
Expand Down Expand Up @@ -90,3 +90,7 @@ def _to_yaml(self) -> str:
@property
def use_templates(self) -> bool:
return self.templates is not None

@property
def dtype(self) -> DTypeLike:
return jnp.float32 if self.precision == 32 else jnp.float64

0 comments on commit 3ab8642

Please sign in to comment.