Repository navigation
fix: use shape of grouping and not shape of grouping + shape of signal - #262
Conversation
|
Here's the The only issue I see there is: |
|
Okay I think I got the gist of the problem now.
@SimonHeybrock do you have an opinion about the best approach here? |
The coord can be there, if it is a scalar, i.e., the length-1 dimension is squeezed out. But isn't the issue arising even before the data array assembly is attempted? |
It does, because the How about this?
|
|
Just to clarify, the result of loading a |
No. It is a |
| # EventField uses dims of detector_number (the grouping) plus dims of event | ||
| # data. The former may be defined by the group dims. | ||
| if group_dims is not None: | ||
| self._signal._grouping.sizes = dict( | ||
| zip(group_dims, self._signal.shape, strict=False) | ||
| zip(group_dims, self._signal._grouping.shape, strict=False) |
There was a problem hiding this comment.
Is this change still needed, given the latest changes below?
There was a problem hiding this comment.
Yes otherwise we still get the out of memory error. Do you think it might be incorrect to change this?
There was a problem hiding this comment.
Not 100% sure, but I think it is covered by existing tests. But can you preserve the comment, at least?
84445d3 to
a273d6b
Compare
Fixes #259
This change solves the issue and passes the tests, and it does seem reasonable that we don't care about the shape of the signal when assigning the size of the grouping.
However the removed comment seems to indicate that we do care.
When loading the offending file with this change the
instrument/detector_0entry gets the somewhat cryptic sizes:sizes={'x_pixel_offset': 1280, 'y_pixel_offset': 1280, 'face': 6, 'vertex': 8, 'winding_order': 24, 'time': 0, 'event_time_zero': 1}So there's still something wrong here.