@@ -509,19 +509,24 @@ def reset_times(self):
509509 rs .t_start = None
510510 rs .sampling_frequency = self .sampling_frequency
511511
512- def shift_start_time (self , shift : int | float , segment_index : int | None = None ) -> None :
512+ def shift_times (self , shift : int | float , segment_index : int | None = None ) -> None :
513513 """
514- Shift the starting time of the times.
514+ Shift all times by a scalar value. The default behaviour is to
515+ shift all segments uniformly.
515516
517+ Parameters
518+ ----------
516519 shift : int | float
517- The shift to apply to the first time point. If positive,
518- the current start time will be increased by `shift`. If
519- negative, the start time will be decreased.
520+ The shift to apply. If positive, times will be increased by `shift`.
521+ e.g. shifting by 1 will be like the recording started 1 second later.
522+ If negative, the start time will be decreased i.e. as if the recording
523+ started earlier.
520524
521525 segment_index : int | None
522- The segment on which to shift the times.
526+ The segment on which to shift the times. if `None`, all
527+ segments will be shifted.
523528 """
524- self ._check_segment_index (segment_index )
529+ self ._check_segment_index (segment_index ) # Check the segment index is valid only
525530
526531 if segment_index is None :
527532 segments_to_shift = range (self .get_num_segments ())
0 commit comments