Skip to content

Commit

Permalink
geometry of dataset in model now validated by datasets submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandezfran committed Jan 30, 2024
1 parent cc3e3b5 commit b2121e3
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions galpynostatic/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,7 @@ def __init__(
def _validate_geometry(self):
"""Validate geometry (when dataset is a string)."""
if isinstance(self.dataset, str):
if self.dataset in ("spherical", "cylindrical", "planar"):
self.dataset = load_dataset(geometry=self.dataset)
else:
raise ValueError(f"{self.dataset} is not a valid geometry.")
self.dataset = load_dataset(geometry=self.dataset)

def _grid_points(self):
"""Grid points (D, k0) to evaluate in the grid search."""
Expand Down

0 comments on commit b2121e3

Please sign in to comment.