stimpyp.stimpy_pygame.PyGameLinearStimlog#

class stimpyp.stimpy_pygame.PyGameLinearStimlog#

Bases: object

__init__(riglog, filepath=None, diode_offset=True, offset_method='scalar')#
Parameters:
  • riglog (RiglogData | None)

  • filepath (str | Path | bytes | BinaryIO | BufferedIOBase | BufferedReader | None)

  • diode_offset (bool)

  • offset_method (Literal['scalar', 'vector'])

Methods

__init__(riglog[, filepath, diode_offset, ...])

get_agent_dataframe()

get_landmarks([row, char])

Get landmark locations grouped by consecutive sequences.

get_log_dict_dataframe()

get_max_virtual_length()

Array[float, L]

get_photo_indicator_dataframe()

get_state_machine_dataframe()

get_virtual_length([count, length])

get actual virtual trial length based on riglog encoder value mapping

session_trials()

virtual_position_event([session])

Attributes

__init__(riglog, filepath=None, diode_offset=True, offset_method='scalar')#
Parameters:
  • riglog (RiglogData | None)

  • filepath (str | Path | bytes | BinaryIO | BufferedIOBase | BufferedReader | None)

  • diode_offset (bool)

  • offset_method (Literal['scalar', 'vector'])

property exp_start_time: float#
property passive_start_time: float#
property exp_end_time: float#
virtual_position_event(session=None)#
Parameters:

session (str | None)

Return type:

RigEvent

property virtual_lap_event: RigEvent#
property screen_event: RigEvent#
property offset_time: float | ndarray#
session_trials()#
Return type:

dict[str, SessionInfo]

get_agent_dataframe()#
Return type:

DataFrame

get_photo_indicator_dataframe()#
Return type:

DataFrame

get_log_dict_dataframe()#
Return type:

DataFrame

get_state_machine_dataframe()#
Return type:

DataFrame

get_max_virtual_length()#

Array[float, L]

Return type:

ndarray

get_virtual_length(count=1, length=150)#

get actual virtual trial length based on riglog encoder value mapping

Parameters:
  • count (int) – number of photosensing for each trial for rig encoder

  • length (float) – length in cm for each trial for rig encoder

Return type:

float

get_landmarks(row=0, char='v')#

Get landmark locations grouped by consecutive sequences.

Returns a list of arrays, where each array contains the positions of a consecutive sequence of the specified character.

Parameters:
  • row (int)

  • char (str)

Return type:

list[ndarray]