stimpyp.stimpy_core.RiglogData#
- final class stimpyp.stimpy_core.RiglogData#
Bases:
AbstractLogclass for handle the riglog file for stimpy bitbucket/github version (mainly tested in the commits derived from master branch)
- __init__(*args, **kwargs)#
- Parameters:
root_path – log file path or log directory
log_suffix – log file suffix
diode_offset – whether do the diode offset
reset_mapping – Customized mapping
Methods
__init__(*args, **kwargs)get_encoder_factor([count, length])Get a factor for mapping encoder to actual length in cm
get preferences file
get protocol (TypeVar
P)get_pygame_stimlog(**kwargs)get_stimlog([csv_output])Initialize the stimlog instance
get stimulus type name based on protocol
unwarp_circular_position([neg_threshold])unwarp circular position to cumulative displacement
with_sessions(session)Truncate the instance dat with the given session(s)
Attributes
todo
camera event.
experimental end time (in sec)
experimental start time (in sec)
imaging rig event.
lap rig event.
lick rig event.
todo
position rig event.
preferences file path
protocol file path
reward rig event.
screen rig event.
experimental duration (in sec)
config dict for the log file
- __init__(*args, **kwargs)#
- Parameters:
root_path – log file path or log directory
log_suffix – log file suffix
diode_offset – whether do the diode offset
reset_mapping – Customized mapping
- with_sessions(session)#
Truncate the instance dat with the given session(s)
- Parameters:
session (str | tuple[str, ...]) – session name(s)
- Returns:
- Return type:
Self
- property stimlog_file: Path#
- property worldmap_file: Path#
- get_stimlog(csv_output=True)#
Initialize the stimlog instance
- Parameters:
csv_output (bool) – if stimlog is exported to separated csv file
- Return type:
- get_pygame_stimlog(**kwargs)#
- Return type:
- get_worldmap()#
- Return type:
WorldMapInfo
- get_protocol()#
get protocol (TypeVar
P)- Returns:
- Return type:
- class CameraEvent#
Bases:
objectcamera event
- __init__(rig)#
:param rig:
Baselog- Parameters:
rig (R)
- camera: dict[Literal['facecam', 'eyecam', '1P_cam'], int]#
- property camera_event: CameraEvent#
camera event. including {‘facecam’, ‘eyecam’, ‘1P_cam’} implemented by __getitem__()
- property exp_end_time: float#
experimental end time (in sec)
- property exp_start_time: float#
experimental start time (in sec)
- get_encoder_factor(count=1, length=150)#
Get a factor for mapping encoder to actual length in cm
- Parameters:
count (int) – number of photosensing for each trial
length (float) – length in cm for each trial
- Returns:
- Return type:
tuple[float, ndarray]
- get_preferences()#
get preferences file
- Return type:
- get_stimulus_type()#
get stimulus type name based on protocol
- Return type:
str
- property pref_file: Path#
preferences file path
- property prot_file: Path#
protocol file path
- property total_duration: float#
experimental duration (in sec)
- unwarp_circular_position(neg_threshold=200)#
unwarp circular position to cumulative displacement
- Parameters:
neg_threshold (float) – a negative jump larger in magnitude than this is considered a wrap-around
- Return type:
ndarray