manoharan-lab / holopy

Hologram processing and light scattering in python
GNU General Public License v3.0
131 stars 50 forks source link

Update code to work with recent versions of xarray, ensure tests pass #423

Closed vnmanoharan closed 7 months ago

vnmanoharan commented 7 months ago

As of xarray v2022.06.0, arrays with a MultiIndex no longer have associated "virtual" coordinates but instead have real coordinates (https://docs.xarray.dev/en/stable/whats-new.html#v2022-06-0rc0-9-june-2022) . Some of our code had assumed that the x, y, z dimensions associated with a flattened detector schema would remain virtual, but that code broke when they became non-virtual, and the x, y, z dimensions started getting duplicated in our metadata update operations. This PR fixes this problem, allowing holopy to be used with more recent versions of xarray.

Fixes

409

411

415

Other changes:

test_2_colour_noise_sd (test_io.TestAccumulator) is failing, but other tests are passing. This test was failing before any changes were made.

pep8speaks commented 7 months ago

Hello @vnmanoharan! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers:

Comment last updated at 2024-01-03 16:50:30 UTC
vnmanoharan commented 7 months ago

This PR now includes changes from #431 to ensure all tests pass.