Morelia.Stream.PodHandler package

Submodules

Morelia.Stream.PodHandler.Handle8206HR module

class Morelia.Stream.PodHandler.Handle8206HR.Drain8206HR

Bases: DrainDeviceHandler

Class to help handle 8206-HR POD devices for the Drain classes.

DropToDf(timestamps: list[float], data: list[Morelia.Packets.Packet.Packet | None]) DataFrame

Converts the timestamps and data into a Pandas DataFrame. The columns should match GetDeviceColNames().

Parameters:
  • timestamps (list[float]) – List of timestamps in seconds for each data packet.

  • data (list[Packet | None]) – List of streaming binary data packets.

Returns:

DataFrame containing the timestamps and packet data.

Return type:

pd.DataFrame

DropToListOfArrays(data: list[Morelia.Packets.Packet.Packet | float]) list[numpy.array]

Unpacks the data Packets into a list of np.arrays formatted to write to an EDF file.

Parameters:

data (list[Packet | float]) – List of streaming binary data packets.

Returns:

List of np.arrays for each Packet part.

Return type:

list[np.array]

GetDeviceColNames() str

Gets a string of the column names formatter for a text file.

Returns:

String of the filenames separated by commas and ending in a newline.

Return type:

str

GetDeviceColNamesList(includeTime: bool = True) list[str]

Gets a list of all collumn titles.

Parameters:

includeTime (bool, optional) – Flag to include ‘Time’ in the columns list. Defaults to True.

Returns:

List of columns.

Return type:

list[str]

Morelia.Stream.PodHandler.Handle8274D module

class Morelia.Stream.PodHandler.Handle8274D.Drain8274D

Bases: DrainDeviceHandler

Class to help handle 8274D POD devices for the Drain classes.

DropToDf(timestamps: list[float], data: list[Morelia.Packets.Packet.Packet | None]) DataFrame

Converts the timestamps and data into a Pandas DataFrame. The columns should match GetDeviceColNames().

Parameters:
  • timestamps (list[float]) – List of timestamps in seconds for each data packet.

  • data (list[Packet | None]) – List of streaming binary data packets.

Returns:

DataFrame containing the timestamps and packet data.

Return type:

pd.DataFrame

DropToListOfArrays(data: list[Morelia.Packets.Packet.Packet | float]) list[numpy.array]

Unpacks the data Packets into a list of np.arrays formatted to write to an EDF file.

Parameters:

data (list[Packet | float]) – List of streaming binary data packets.

Returns:

List of np.arrays for each Packet part.

Return type:

list[np.array]

GetDeviceColNames() str

Gets a string of the column names formatter for a text file.

Returns:

String of the filenames separated by commas and ending in a newline.

Return type:

str

GetDeviceColNamesList(includeTime: bool = True) list[str]

Gets a list of all collumn titles.

Parameters:

includeTime (bool, optional) – Flag to include ‘Time’ in the columns list. Defaults to True.

Returns:

List of columns.

Return type:

list[str]

Morelia.Stream.PodHandler.Handle8401HR module

class Morelia.Stream.PodHandler.Handle8401HR.Drain8401HR(preampDevice: str | None = None)

Bases: DrainDeviceHandler

Class to help handle 8206-HR POD devices for the Drain classes.

preampDevice

Optional preamplifier for the 8401-HR.

Type:

str|None

DropToDf(timestamps: list[float], data: list[Morelia.Packets.Packet.Packet | None]) DataFrame

Converts the timestamps and data into a Pandas DataFrame. The columns should match GetDeviceColNames().

Parameters:
  • timestamps (list[float]) – List of timestamps in seconds for each data packet.

  • data (list[Packet | None]) – List of streaming binary data packets.

Returns:

DataFrame containing the timestamps and packet data.

Return type:

pd.DataFrame

DropToListOfArrays(data: list[Morelia.Packets.Packet.Packet | float]) list[numpy.array]

Unpacks the data Packets into a list of np.arrays formatted to write to an EDF file.

Parameters:

data (list[Packet | float]) – List of streaming binary data packets.

Returns:

List of np.arrays for each Packet part.

Return type:

list[np.array]

GetDeviceColNames() str

Gets a string of the column names formatter for a text file.

Returns:

String of the filenames separated by commas and ending in a newline.

Return type:

str

GetDeviceColNamesList(includeTime: bool = True) list[str]

Gets a list of all collumn titles.

Parameters:

includeTime (bool, optional) – Flag to include ‘Time’ in the columns list. Defaults to True.

Returns:

List of columns.

Return type:

list[str]

Morelia.Stream.PodHandler.HandlerInterface module

class Morelia.Stream.PodHandler.HandlerInterface.DrainDeviceHandler

Bases: object

Interface class for the POD device handlers used by the Drain classes.

DropToDf(timestamps: list[float], data: list[Morelia.Packets.Packet.Packet | None]) DataFrame

Converts the timestamps and data into a Pandas DataFrame. The columns should match GetDeviceColNames().

Parameters:
  • timestamps (list[float]) – List of timestamps in seconds for each data packet.

  • data (list[Packet | None]) – List of streaming binary data packets.

Returns:

DataFrame containing the timestamps and packet data.

Return type:

pd.DataFrame

DropToListOfArrays(data: list[Morelia.Packets.Packet.Packet | float]) list[numpy.array]

Unpacks the data Packets into a list of np.arrays formatted to write to an EDF file.

Parameters:

data (list[Packet | float]) – List of streaming binary data packets.

Returns:

List of np.arrays for each Packet part.

Return type:

list[np.array]

GetDeviceColNamesList(includeTime: bool = True) list[str]

Gets a list of all collumn titles.

Parameters:

includeTime (bool, optional) – Flag to include ‘Time’ in the columns list. Defaults to True.

Returns:

List of columns.

Return type:

list[str]

static GetPodFromBucket(bkt: Bucket) Pod8206HR | Pod8401HR | Pod8274D

Gets the POD device contained in the Bucket.

Parameters:

bkt (Bucket) – Bucket to collect streaming data from a POD device.

Returns:

POD device connected to the Bucket.

Return type:

Pod8206HR | Pod8401HR

static _uV(voltage: float | int) float

Converts volts to microVolts, rounded to 6 decimal places.

Parameters:

voltage (float | int) – number of volts.

Returns:

voltage in of uV.

Return type:

float

Module contents