ibllib.pipes.training_status
Functions
Check which sessions on local file system are missing from the computed training table |
|
Get meta information about task. |
|
Compute the training status for compute date based on training from that session and two previous days |
|
Find the earliest date that we need to compute the training status from. |
|
Extracts the latest training status |
|
Extract the training information needed for plots for each session |
|
Load and concatenate trials for multiple sessions. |
|
Load training dataframe from disk, if dataframe doesn't exist returns None |
|
Load trials data for session. |
|
Makes sure that the new training status is not less than the one from the previous day. |
|
Save training dataframe to disk |
|
- save_dataframe(df, subj_path)[source]
Save training dataframe to disk
- Parameters
df – dataframe to save
subj_path – path to subject folder
- Returns
- load_existing_dataframe(subj_path)[source]
Load training dataframe from disk, if dataframe doesn’t exist returns None
- Parameters
subj_path – path to subject folder
- Returns
- load_trials(sess_path, one)[source]
Load trials data for session. First attempts to load from local session path, if this fails will attempt to download via ONE, if this also fails, will then attempt to re-extraxt locally
- Parameters
sess_path – session path
one – ONE instance
- Returns
- load_combined_trials(sess_paths, one)[source]
Load and concatenate trials for multiple sessions. Used when we want to concatenate trials for two sessions on the same day
- Parameters
sess_paths – list of paths to sessions
one – ONE instance
- Returns
- get_latest_training_information(sess_path, one)[source]
Extracts the latest training status
- Parameters
sess_path –
one –
- Returns
- find_earliest_recompute_date(df)[source]
Find the earliest date that we need to compute the training status from. Training status depends on previous sessions so if a session was missing and now has been added we need to recompute everything from that date onwards
- Parameters
df –
- Returns
- compute_training_status(df, compute_date, one)[source]
Compute the training status for compute date based on training from that session and two previous days
- Parameters
df – training dataframe
compute_date – date to compute training on
one – ONE instance
- Returns
- pass_through_training_hierachy(status_new, status_old)[source]
Makes sure that the new training status is not less than the one from the previous day. e.g Subject cannot regress in performance
- Parameters
status_new – latest training status
status_old – previous training status
- Returns
- compute_session_duration_delay_location(sess_path)[source]
Get meta information about task. Extracts session duration, delay before session start and location of session
- Parameters
sess_path – session path
- Returns
- get_training_info_for_session(session_paths, one)[source]
Extract the training information needed for plots for each session
- Parameters
session_paths – list of session paths on same date
one – ONE instance
- Returns
- check_up_to_date(subj_path, df)[source]
Check which sessions on local file system are missing from the computed training table
- Parameters
subj_path –
- Returns