def test_numpy_image_container_time_step_seconds_getter( numpy_image_container: NumpyImageContainer, ): """ Test that the correct time step is returned from a NumpyImageContainer """ # NIFTI header has seconds in xytz_units assert numpy_image_container.time_step_seconds == 2000.0 numpy_image_container.time_units = UNITS_MILLISECONDS assert numpy_image_container.time_step_seconds == 2e6 numpy_image_container.time_units = UNITS_MICROSECONDS assert numpy_image_container.time_step_seconds == 2e9
def test_numpy_image_container_time_step_seconds_setter( numpy_image_container: NumpyImageContainer, ): """ Test that the correct time step is get on a NumpyImageContainer """ numpy_image_container.time_step_seconds = 10.0 numpy_image_container.time_units = UNITS_MILLISECONDS np.testing.assert_almost_equal(numpy_image_container.time_step_seconds, 10000.0)