Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use shape of grouping and not shape of grouping + shape of signal #262

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jokasimr
Copy link
Contributor

@jokasimr jokasimr commented Jan 31, 2025

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_0 entry 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.

@jokasimr jokasimr marked this pull request as draft January 31, 2025 10:13
@jokasimr
Copy link
Contributor Author

Here's the instrument/detector_panel_0:

DataGroup(sizes={'x_pixel_offset': 1280, 'y_pixel_offset': 1280, 'face': 6, 'vertex': 8, 'winding_order': 24, 'time': 0, 'event_time_zero': 1}, keys=[
    data: DataArray({'x_pixel_offset': 1280, 'y_pixel_offset': 1280}),
    depends_on: TransformationChain(parent='/entry/instrument/detector_panel_1', value='/entry/instrument/detector_panel_1/transformations/orientation', transformations=DataGroup(sizes={'time': 0}, keys=[
    /entry/instrument/detector_panel_1/transformations/orientation: Transform({}),
    /entry/instrument/detector_panel_1/transformations/axis6: Transform({'time': 0}),
    /entry/instrument/detector_panel_1/transformations/axis5: Transform({'time': 0}),
    /entry/instrument/detector_panel_1/transformations/axis4: Transform({'time': 0}),
    /entry/instrument/detector_panel_1/transformations/axis3: Transform({'time': 0}),
    /entry/instrument/detector_panel_1/transformations/axis2: Transform({'time': 0}),
    /entry/instrument/detector_panel_1/transformations/axis1: Transform({'time': 0}),
    /entry/instrument/detector_panel_1/transformations/stageZ: Transform({'time': 0}),
])),
    detector_number: Variable({'x_pixel_offset': 1280, 'y_pixel_offset': 1280}),
    efu_publication: DataGroup(4, {}),
    geometry: DataGroup(3, {'face': 6, 'vertex': 8, 'winding_order': 24}),
    transformations: DataGroup(8, {'time': 0}),
    x_pixel_offset: Variable({'x_pixel_offset': 1280}),
    y_pixel_offset: Variable({'y_pixel_offset': 1280}),
    z_pixel_offset: Variable({'event_time_zero': 1}),

The only issue I see there is: z_pixel_offset: Variable({'event_time_zero': 1}),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bad_alloc error when loading NMX nexus file
1 participant