Commit e519b94
committed
Fix Python PointFilter HDF5 deserialization and next-event estimator type
PointFilter lacked from_hdf5() and get_pandas_dataframe() overrides.
The base Filter.from_hdf5() passed a flat numpy array to PointFilter.__init__
which expects Sequence[tuple], causing TypeError. The base
get_pandas_dataframe() used np.repeat on the nested tuple structure,
causing ValueError.
Also add 'next-event' to ESTIMATOR_TYPES so the Tally.estimator setter
accepts the value read from statepoint files.
Fixes:
- Add PointFilter.from_hdf5() that reconstructs (pos, r0) tuples from
flat HDF5 bins array.
- Add PointFilter.get_pandas_dataframe() that formats detector positions
as readable string labels.
- Add 'next-event' to ESTIMATOR_TYPES set in tallies.py.1 parent 6c9e2f5 commit e519b94
2 files changed
Lines changed: 23 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
834 | 834 | | |
835 | 835 | | |
836 | 836 | | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
837 | 859 | | |
838 | 860 | | |
839 | 861 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
0 commit comments