@@ -530,42 +530,42 @@ def _demultiplex_digital_data(self, raw_digital_data, channel_ids, i_start, i_st
530530 output [:, channel_index ] = demultiplex_data [i_start :i_stop ].flatten ()
531531
532532 return output
533-
533+
534534 def get_intan_timestamps (self , i_start = None , i_stop = None ):
535535 """
536536 Retrieves the sample indices from the Intan raw data within a specified range.
537-
538- Note that sample indices are called timestamps in the Intan format but they are
539- in fact just sample indices. This function extracts the sample index timestamps
537+
538+ Note that sample indices are called timestamps in the Intan format but they are
539+ in fact just sample indices. This function extracts the sample index timestamps
540540 from Intan files, which represent relative time points in sample units (not absolute time).
541541 These indices can be particularly useful when working with recordings that have discontinuities.
542-
542+
543543 Parameters
544544 ----------
545545 i_start : int, optional
546546 The starting index from which to retrieve sample indices. If None, starts from 0.
547547 i_stop : int, optional
548- The stopping index up to which to retrieve sample indices (exclusive).
548+ The stopping index up to which to retrieve sample indices (exclusive).
549549 If None, retrieves all available indices from i_start onward.
550-
550+
551551 Returns
552552 -------
553553 timestamps : ndarray
554554 The flattened array of sample indices within the specified range.
555-
555+
556556 Notes
557557 -----
558558 - Sample indices can be converted to seconds by dividing by the sampling rate of the amplifier stream.
559559 - The function automatically handles different file formats:
560560 * header-attached: Timestamps are extracted directly from the timestamp field
561561 * one-file-per-signal: Timestamps are read from the timestamp stream
562562 * one-file-per-channel: Timestamps are read from the first channel in the timestamp stream
563- - When recordings have discontinuities (indicated by the `discontinuous_timestamps`
563+ - When recordings have discontinuities (indicated by the `discontinuous_timestamps`
564564 attribute being True), these indices allow for proper temporal alignment of the data.
565565 """
566566 if i_start is None :
567567 i_start = 0
568-
568+
569569 # Get the timestamps based on file format
570570 if self .file_format == "header-attached" :
571571 timestamps = self ._raw_data ["timestamp" ]
@@ -576,7 +576,7 @@ def get_intan_timestamps(self, i_start=None, i_stop=None):
576576
577577 # TODO if possible ensure that timestamps memmaps are always of correct shape to avoid memory copy here.
578578 timestamps = timestamps .flatten () if timestamps .ndim > 1 else timestamps
579-
579+
580580 if i_stop is None :
581581 return timestamps [i_start :]
582582 else :
0 commit comments