tools.tdt API

class nsds_lab_to_nwb.tools.tdt.tdt_reader.TDTReader(path, channels=None)[source]

Bases: object

TDT interface

Parameters
  • path (str) – Path to TDT folder

  • channels (list, optional) – List of channel ids to import. Defaults to None.

check_stream(stream)[source]

Checks to see if user specified stream (or alternative name) exists in data.

Parameters

stream (str) – Stream name.

Returns

stream – Stream name updated to the standard name if an alternative was used.

Return type

str

get_data(*, stream=None, dev_conf=None)[source]

Get specified data

Parameters
  • stream (str) – Stream name

  • dev_conf ((dict) metadata for the device.) – nwb_builder.metadata[‘device’][device_name]. Not used for TDT.

Returns

  • data (ndarray) – Data array

  • meta (dict) – Meta data for the data array.

get_events()[source]

Get event onset markers

Returns

list of samples where an event occured

Return type

events (list)

get_metadata(stream)[source]

Get specified stream metadata

Parameters

stream (string) – stream name

Returns

dictionary containing stream recording parameters (if no stream returns None)

Return type

meta (dict)

get_streams()[source]

Get TDT all stream names

Returns

stream names

Return type

streams (list)