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 single field issue in _compute_z_spacing #141

Merged
merged 2 commits into from
Jun 14, 2024

Conversation

jluethi
Copy link
Contributor

@jluethi jluethi commented Jun 14, 2024

Currently, when processing an ImageXpress dataset with a single field per well, the StackAcquisition._compute_z_spacing returns an error like:

faim_ipa/hcs/imagexpress/StackAcquisition.py", line 92, in _compute_z_spacing
    precision = -Decimal(str(plane_positions[0])).as_tuple().exponent

The reason being that the _compute_z_spacing filters for unique fields, but that filtering fails when fields aren't set (=> are None in the fields table).

A minor change to first check if there are any field of views before filtering the files list solves the problem and makes single field examples I have convertable. I don't have any tiny datasets to show the full workflow, but the newly added tests fail in the current faim-ipa version and pass with this minor adaptation.

Copy link
Contributor

@tibuch tibuch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@tibuch tibuch merged commit fa082de into fmi-faim:main Jun 14, 2024
13 checks passed
@jluethi jluethi deleted the single_field branch June 14, 2024 15:19
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.

2 participants