File tree Expand file tree Collapse file tree 1 file changed +13
-9
lines changed
Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -247,20 +247,24 @@ def _set_mm_meta(self, mm_meta: dict) -> None:
247247 for ch in self ._mm_meta ["Summary" ].get ("ChNames" , []):
248248 self .channel_names .append (ch )
249249 z_step_size = float (self ._mm_meta ["Summary" ].get ("z-step_um" , 1.0 ))
250- if z_step_size == 0 :
251- if self .slices == 1 :
252- z_step_size = 1.0
253- else :
250+ if z_step_size == 0.0 :
251+ z_step_size = 1.0
252+ if self .slices != 1 :
254253 _logger .warning (
255- f "Z-step size is { z_step_size } um in the metadata, "
256- "Using 1.0 um instead."
254+ "Z-step size is set to 0.0 um in the metadata, "
255+ "using 1.0 um instead."
257256 )
258257 self ._z_step_size = z_step_size
259258 self .height = self ._mm_meta ["Summary" ]["Height" ]
260259 self .width = self ._mm_meta ["Summary" ]["Width" ]
261- self ._t_scale = (
262- float (self ._mm_meta ["Summary" ].get ("Interval_ms" , 1e3 )) / 1e3
263- )
260+ t_scale = float (self ._mm_meta ["Summary" ].get ("Interval_ms" , 1e3 )) / 1e3
261+ if t_scale == 0.0 :
262+ t_scale = 1.0
263+ _logger .warning (
264+ "Time scale is set to 0.0 in the metadata, "
265+ "using 1.0 instead."
266+ )
267+ self ._t_scale = t_scale
264268
265269 def _simplify_stage_position (self , stage_pos : dict ):
266270 """
You can’t perform that action at this time.
0 commit comments