core.py
get_valid_ephys_position_times_from_interval(interval_list_name, nwb_file_name)
¶
Finds the intersection of the valid times for the interval list, the valid times for the ephys data, and the valid times for the position data.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
interval_list_name |
str
|
|
required |
nwb_file_name |
str
|
|
required |
Returns:
Name | Type | Description |
---|---|---|
valid_ephys_position_times |
(ndarray, shape(n_valid_times, 2))
|
|
Source code in src/spyglass/decoding/v0/core.py
get_epoch_interval_names(nwb_file_name)
¶
Find the interval names that are epochs.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
nwb_file_name |
str
|
|
required |
Returns:
Name | Type | Description |
---|---|---|
epoch_names |
list[str]
|
List of interval names that are epochs. |
Source code in src/spyglass/decoding/v0/core.py
get_valid_ephys_position_times_by_epoch(nwb_file_name)
¶
Get the valid ephys position times for each epoch.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
nwb_file_name |
str
|
|
required |
Returns:
Name | Type | Description |
---|---|---|
valid_ephys_position_times_by_epoch |
dict[str, ndarray]
|
Dictionary of epoch names and valid ephys position times. |
Source code in src/spyglass/decoding/v0/core.py
convert_valid_times_to_slice(valid_times)
¶
Converts the valid times to a list of slices so that arrays can be indexed easily.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
valid_times |
(ndarray, shape(n_valid_times, 2))
|
Start and end times for each valid time. |
required |
Returns:
Name | Type | Description |
---|---|---|
valid_time_slices |
list[slice]
|
|
Source code in src/spyglass/decoding/v0/core.py
create_model_for_multiple_epochs(epoch_names, env_kwargs)
¶
Creates the observation model, environment, and continuous transition types for multiple epochs for decoding
Parameters:
Name | Type | Description | Default |
---|---|---|---|
epoch_names |
(list[str], length(n_epochs))
|
|
required |
env_kwargs |
dict
|
Environment keyword arguments. |
required |
Returns:
Name | Type | Description |
---|---|---|
observation_models |
tuple[list[ObservationModel]
|
Observation model for each epoch. |
environments |
list[Environment]
|
Environment for each epoch. |
continuous_transition_types |
list[list[object]]]
|
Continuous transition types for each epoch. |