mirror of
https://github.com/vale981/hopsflow
synced 2025-03-05 08:51:37 -05:00
implement ensemble value mean for multiple snapshots
This commit is contained in:
parent
3890771074
commit
e27e38b656
1 changed files with 7 additions and 4 deletions
|
@ -96,12 +96,15 @@ class EnsembleValue:
|
|||
|
||||
@property
|
||||
def mean(self):
|
||||
N, val, σ = self.final_aggregate
|
||||
values = []
|
||||
|
||||
return EnsembleValue(
|
||||
[(N, val.mean().copy(), np.sqrt((σ.copy() ** 2).sum() / val.size**2))]
|
||||
for N, val, σ in self.aggregate_iterator:
|
||||
values.append(
|
||||
(N, val.mean().copy(), np.sqrt((σ.copy() ** 2).sum() / val.size**2))
|
||||
)
|
||||
|
||||
return EnsembleValue(values)
|
||||
|
||||
@property
|
||||
def max(self):
|
||||
N, val, σ = self.final_aggregate
|
||||
|
|
Loading…
Add table
Reference in a new issue