Custom time intervals in multi_d_acquisition_events
ckolluru opened this issue · 2 comments
Thanks for creating this package. I wanted to know if there is a way to create customized time intervals in a time-lapse acquisition. The multi_d_acquisition_events currently seems to support a single floating point value for time_interval_s.
Looks like there should be a modification around line 206 in acq_util.py?
Previous code
if time_interval_s != 0:
new_event["min_start_time"] = time_index * time_interval_s
Modification
if isinstance(time_interval_s, list):
new_event["min_start_time"] = time_interval_s[time_index]
else:
if time_interval_s != 0:
new_event["min_start_time"] = time_index * time_interval_s
The function definition would change for the time_interval_s argument: time_interval_s: Union[float, List[float]] = 0
An additional check to make sure that len(time_interval_s) == num_time_points
would be useful. Look forward to your thoughts.
Thanks,
Chaitanya
Yeah that would be a nice addition. One confusing thing I see though is that the way you have it there, the list of "time intervals" is actually a list of absolute start times, whereas the current scalar argument is an actual time interval. Might be more consistent to actually pass in intervals, and integrate with np.cumsum to get the start time.
Would you like to implement this? Are you familiar with the fork/pull request workflow?
Sounds good. I will give it a try and submit a PR shortly.