Skip to content

Commit bcf0b7b

Browse files
committed
Squash into a single commit
1 parent a7bf35e commit bcf0b7b

5 files changed

Lines changed: 1046 additions & 6 deletions

File tree

docs/utilities.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,27 @@ else.
2929
## Fitting functions
3030

3131
::: extra.utils.fit_gaussian
32+
33+
## Incremental variance
34+
35+
::: extra.utils.xcca._CumulativeVarianceBase
36+
37+
::: extra.utils.xcca.CumulativeVariance
38+
options:
39+
inherited_members: false
40+
41+
::: extra.utils.xcca.CumulativeVarianceMasked
42+
options:
43+
inherited_members: false
44+
45+
## Angular cross-correlation (XCCA)
46+
47+
::: extra.utils.xcca.AngularCorrelator
48+
49+
::: extra.utils.xcca.AveragedAngularCorrelation
50+
options:
51+
inherited_members: false
52+
53+
::: extra.utils.xcca.AveragedAngularCorrelationMasked
54+
options:
55+
inherited_members: false

src/extra/applications/base.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,22 +62,23 @@ def _asdict(self):
6262
Return serializable dict.
6363
"""
6464
pass
65-
66-
def _fromdict(self, all_data):
65+
66+
@classmethod
67+
def _fromdict(cls, all_data):
6768
"""
6869
Rebuild it from dict.
6970
"""
70-
pass
71+
return cls(**all_data)
7172

7273
@classmethod
7374
def from_file(cls, filename: str):
7475
"""
7576
Load setup saved with save previously.
7677
"""
77-
obj = cls()
78+
#obj = cls()
7879
with h5py.File(filename, "r") as fid:
7980
all_data = load_dict(fid)
80-
obj._fromdict(all_data)
81+
obj = cls._fromdict(all_data)
8182

8283
return obj
8384

0 commit comments

Comments
 (0)