-
Notifications
You must be signed in to change notification settings - Fork 7
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
Making coordinateTransformations
flexible for axes & comply with spec (include channels transformation)
#420
Comments
An issue that will appear in some tasks while we have this problem:
A very manual workaround is to use |
Actually, I added a workaround that avoids running into crashes in our tasks to the This is no part of #403. All tests still pass. With this workaround, we can process 3D MD data. And our normal examples (e.g. example 01) also still run. |
There was a second place where we currently have the assumption that coordinateTransformations always consist of z, y, x in the |
I made this slightly more general with 63e04d2, let me know if it makes sense to you. |
@tcompa This indeed looks like a more general solution. I'll try to test it this afternoon. I think it should work, but there are some edge cases where we e.g. were relying on the fact that the scale arrays have 3 digits, which is not always the case. But if this works, it would already be a good step towards dropping this assumption. |
Shall we take this opportunity to make everything a bit more consistent? The most relevant modules dealing with scale transformations are:
I cannot easily find other relevant modules to look at, but I can try to set up a couple more tests to spot possible issues:
|
I have no idea, TBH.
See a0ab7e7 |
Yes, that's great! I was a bit hesitant about opening too broad a topic here. But this sounds like we can tackle it in a contained manner, generalize our processing to always create the CZYX coordinate transformations and then test that this does not interfere with our existing workflows. If this more general way works well for the existing examples we have, I'd be in favor of merging it into the 0.10.0 release candidates. |
Even if we don't go too far in flexibility (and for sure we are not going to address #150 now), at least we should be aware of how things are now. I've added a unit test for
The CI of #403 is passing (locally), but it's always best to double check things when running an actual workflow. And I have started to update things in fractal-analytics-platform/fractal-demos#54, so that testing examples (at least the 01 one) should be relatively smooth. I'll also make frequent fractal-tasks-core prereleases, so that we can speed up testing.
I still need to review the tasks part of #403, but for the moment I have nothing to add about the transformations part. I'd push for having it in 0.10.0, for sure. |
Note that the zarr examples on zenodo also have the wrong number of items in the scale transformation. This is currently addressed in tests via 8657a6f, but at some point we should update those files. |
@tcompa An updated Zenodo dataset is now available here: https://zenodo.org/record/8091756 That should replace the old test dataset and we can get rid of the workarounds in the tests again :) Do you also need the 2x2 datasets in the tests somewhere? I'm updating this atm, will upload in a bit |
1. Update DOI and zenodo link; 2. Revert workaround introduced in 8657a6f.
Update zenodo dataset for tests (ref #420)
Thanks!
Great, done with #454.
No. The ones we use are:
Then this is all good. |
Is there anything left to do on this issue, or should it all be deferred to #150? |
The rest is deferred to #150 , it seems to work decently now :) |
This is about whether we're putting the right number of elements into the
coordinateTransformations
in the OME-Zarr and reading them out flexibly.I have been working more with the OME-Zarr files from the MD converter and ran into an issue with our MIP conversion, where the
convert_ROI_table_to_indices
function inlib_regions_of_interest
assumes all coordinateTransformations will always be z, y, x.There are always 3 entries in our OME-Zarr files, see this example:
This example does have 4 axes though. Thus, according to the spec (both latest and v0.4), we should have a transformation for all 4 axes, i.e. in this case one for c, z, y, x.
@tcompa Any idea why we have only 3 entries in our coordinate transformations? In some early issues, I found examples where we were looking at 4 entries (e.g. here #25). But shortly thereafter, we already had examples with 3: #23
As part of handling axes more flexibly:
extract_zyx_pixel_sizes
in thelib_zattrs_utils
, maybe inconvert_ROI_table_to_indices
and other places.The text was updated successfully, but these errors were encountered: