mehta-lab / waveorder

Wave optical models and inverse algorithms for label-agnostic imaging of density & orientation.
BSD 3-Clause "New" or "Revised" License
15 stars 4 forks source link

Interface of WaveorderWriter.writer is not "pythonic" #47

Closed ieivanov closed 2 years ago

ieivanov commented 2 years ago

The t, c, z input interface to WaveorderWriter.writer is not very pythonic. It makes sense for these parameters to be integers or iterables (e.g. c = range(4)) as opposed to list of start and end indices, i.e. c = [0, 4]. This should simplify WriterBase.write too

camFoltz commented 2 years ago

Good idea, I'll make these changes. You're right in that it will simplify the code

ieivanov commented 2 years ago

I did some looking to that after I first created the issue, we should use slice rather than range, take a look here: https://zarr.readthedocs.io/en/stable/api/core.html#zarr.core.Array.get_basic_selection. The difference is subtle, I think.

camFoltz commented 2 years ago

fixed in #60