ceil_to_raster#
- pypulseqpp.ceil_to_raster()[source]#
Round seconds up to the next raster multiple, within a 1e-10 relative tolerance.
raster_sis a raster period in seconds. A value already within the tolerance of a raster multiple is not pushed to the next one.- Parameters:
- Returns:
The smallest multiple of
raster_sthat is not belowvalue_s.- Return type:
Examples
>>> import pypulseqpp as pp >>> round(pp.ceil_to_raster(21e-6, 10e-6), 9) 3e-05 >>> pp.ceil_to_raster(20e-6, 10e-6) 2e-05