stimpyp.pyvstim.PyVlog#
- final class stimpyp.pyvstim.PyVlog#
Bases:
AbstractLogclass for handle the log file (rig event specific) for pyvstim version (vb lab legacy)
- __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 stimlog (TypeVar
S)get stimulus type name based on protocol
unwarp_circular_position([neg_threshold])unwarp circular position to cumulative displacement
Attributes
todo
camera event.
masking vstim code
masking vstim code
imaging rig event.
lap rig event.
lick rig event.
config dict for the log file
todo
position rig event.
preferences file path
protocol file path
reward rig event.
screen rig event.
experimental duration (in sec)
- log_config: dict[str, Any] = {}#
config dict for the log file
- log_info: dict[int, str] = {}#
- log_header: dict[int, list[str]] = {}#
- __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
- property exp_start_time: float#
masking vstim code
- property exp_end_time: float#
masking vstim code
- get_stimlog()#
get stimlog (TypeVar
S)- Returns:
AbstractStimlog- Return type:
- 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__()
- 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