Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions stdd_calculator/src/stddc/ppd.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@ def __init__(self, stddmaker: STDDMaker, w_range: npt.NDArray):
self._distribute_stddmakers()
self.sal_grid = np.zeros((self.w_len, self.w_len, 2))

def __getstate__(self) -> dict:
"""Custom __getstate__ for pickle.

Strip away the heavy _stddmaker_grid when pickling.
"""
state = self.__dict__.copy()
state["_stddmaker_grid"] = []
return state

@property
def sal_12(self) -> npt.NDArray:
"""SAL values for W_12 (shape: w_len × w_len)."""
Expand Down
Loading