-
Notifications
You must be signed in to change notification settings - Fork 6
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
datatree accessor to multiscale spatial image #81
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.
@giovp awesome!!
I will work on fixing unrelated CI failures in another PR.
@@ -24,17 +27,16 @@ class MultiscaleSpatialImage(DataTree): | |||
scale2 | |||
""" | |||
|
|||
def __init__( | |||
def __init__(self, xarray_obj: DataTree): | |||
self._obj = xarray_obj |
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.
Perhaps something more specific than _obj
, _dt
, etc.
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.
changed to _dt
ci is green on |
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.
LGTM!
assert isinstance(multiscale.msi, MultiscaleSpatialImage) | ||
multiscale.msi.to_zarr(store, compute=True) |
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.
Nice!
This is a quick try to use the xarray accessors as suggested in #80 , changes are minimal.
As suggested a
MultiscaleSpatialImage
can be identified with:or
wdyt @thewtex ?
p.s. tests pass locally...