Repository navigation
COO-256 Multiple image planes in DetImage._data (data, std, count) - #20
Conversation
weatherhead99
left a comment
There was a problem hiding this comment.
couple of comments, nothing major. Nothing that really needs fixing immediately but some QoL stuff to go down the line. Merge already if you need this urgently for Welford combination stuff elsewhere (superflat etc).
| temp = xr.DataArray(data=arr, coords=self.data.coords, dims=self.data.dims) | ||
| temp = xr.DataArray(data=arr, coords=temp.coords, dims=temp.dims) | ||
| else: | ||
| logger.warning("Mask key '%s' not found in masks. Showing unmasked data.", mask_key) |
There was a problem hiding this comment.
maybe not for this PR but I think it's time to move more semantic mask functionality into DetImage (e.g. all combined masks and maybe a couple other things, like a .get_masked() function that takes a duck typed input which can be like a string in which case it masks by key or raises on KeyError, or like by default all masks combined or similar. This is something we want in quite a few places
There was a problem hiding this comment.
added equivalents of get_mask(), get_masked_data() methods and combined_mask property in Output, DetImage and FocalPlaneImage
…hods to mostly have the same behavior as before so the tasks are not affected.
…o Output, DetImage and FocalPlaneImage
…Output, minor bug fixes, added seaborn and h5netcdf to toml
a81f663 to
2d4b7c3
Compare
…dated combined mask helpers, ran thru PTC notebook and fixed any remaining bugs
Refactored DetImage _data attribute to hold a xarray.Dataset instead of array.DataArray.
Dataset stores the main array in 'data' variable, DetImage init and set_data() handle conversion from DataArray to Dataset. But if a Dataset is passed to be set it should contain 'data' variable.
all image_utils.py helpers were modified to work with both DataArray and Dataset
DetImage.data property behaves the same as before, returns 'data' variable from Dataset
DetImage.get_data() can be used to access full Dataset or a specific data_var
Output, FocalPlaneImage methods similarly refactored with extra convenience methods.
MasterCombine now returns DetImage with three image planes (data, std, count)