bioio-devs / bioio-base

Typing, base classes, and more for BioIO projects.
https://bioio-devs.github.io/bioio-base/
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

feature/time_interval #20

Open BrianWhitneyAI opened 1 month ago

BrianWhitneyAI commented 1 month ago

Description

The purpose of this PR is to resolve https://github.com/bioio-devs/bioio/issues/35 and add a way to access time interval. The methodology I took was creating a new type TimeInterval and accessing similarly to PhysicalPixelSize. There is some consideration to add TimeInterval into the PhysicalPixelSize type.

evamaxfield commented 1 month ago

I would argue that we should expand the physical pixel sizes object as such:

class PhysicalPixelSizes:
   # same as before

class DimensionSizes:
    t: float
    physical_pixel_sizes: PhysicalPixelSizes

that we don't break the existing API but we keep everything together in a single object.

I also am curious: are we sure that time intervals are constant? Can there not be time intervals that are say exponential? [t=0, t=1, t=2, t=4, t=8] etc.?

BrianWhitneyAI commented 1 month ago

I would argue that we should expand the physical pixel sizes object as such:

class PhysicalPixelSizes:
   # same as before

class DimensionSizes:
    t: float
    physical_pixel_sizes: PhysicalPixelSizes

that we don't break the existing API but we keep everything together in a single object.

I also am curious: are we sure that time intervals are constant? Can there not be time intervals that are say exponential? [t=0, t=1, t=2, t=4, t=8] etc.?

I can confirm that time intervals will not always be constant as I have stitched together images with different time intervals. I think in general though to have intervals like this you would need a unit and right now these are just ambiguous "time units" which are not necessarily the same length of time.