-
Notifications
You must be signed in to change notification settings - Fork 8
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
set-scale
utility
#228
set-scale
utility
#228
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll suggest:
- reviving the
-i
option - trialing a full CLI and/or config interface instead of the current interactive
- documenting and testing
Please add a description of the feature you are implementing and the problem it solves. |
After discussion, here's a list of TODOs before we're ready for wider review:
|
update-scale-metadata
utility
It's great that the |
@ieivanov I've added tests for |
I've run out of time debugging, but I managed to fix an issue with updating the scale transform when the transform did not exist in the first place (datasets are created with identity transform by default). I'm still seeing an issue that in the .zattrs file only |
iohub/ngff/nodes.py
Outdated
# Append old scale to metadata | ||
if "iohub" not in self.zattrs: | ||
iohub_dict = {} | ||
else: | ||
iohub_dict = self.zattrs["iohub"] | ||
iohub_dict.update({f"old_{axis_name}": self.scale[axis_index]}) | ||
self.zattrs["iohub"] = iohub_dict |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's merge!
2024-09-17 update from @talonchandler.
Problem: Scale metadata in existing .zarr stores is frequently incorrect.
Solution: A small CLI utility
set-scale
that can fix incorrect metadata in a single CLI call.Previous work: the
shrimPy
repository included an earlier version of this utility..Interface:
will result in
Other notes:
iohub
. These utilities are widely used across compmicro's pipelines, so I think they deserve a place here.-i input.zarr
will expand a plate into a list of positions, then update the scale metadata of each position.-i input.zarr/*/*/*
is equivalent.-t
,-z
,-y
, and-x
flags