Skip to content

Commit

Permalink
added functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
andped10 committed Oct 10, 2024
1 parent c2d73b3 commit 38ec431
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/easyreflectometry/data/data_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ def __init__(
if xe is None:
xe = np.zeros_like(x)

if len(x) != len(y):
raise ValueError('x and y must be the same length')

self.name = name
if not isinstance(x, np.ndarray):
x = np.array(x)
Expand All @@ -109,6 +112,10 @@ def __init__(

self._color = None

@property
def data_points(self) -> int:
return zip(self.x, self.y)

@property
def model(self) -> Model:
return self._model
Expand Down

0 comments on commit 38ec431

Please sign in to comment.