ibllib.pipes.training_status

Functions

add_training_lines

check_up_to_date

Check which sessions on local file system are missing from the computed training table

compute_session_duration_delay_location

Get meta information about task.

compute_training_status

Compute the training status for compute date based on training from that session and two previous days

find_earliest_recompute_date

Find the earliest date that we need to compute the training status from.

get_latest_training_information

Extracts the latest training status

get_training_info_for_session

Extract the training information needed for plots for each session

get_trials_task

load_combined_trials

Load and concatenate trials for multiple sessions.

load_existing_dataframe

Load training dataframe from disk, if dataframe doesn't exist returns None

load_trials

Load trials data for session.

make_plots

pass_through_training_hierachy

Makes sure that the new training status is not less than the one from the previous day.

plot_fit_params

plot_heatmap_performance_over_days

plot_over_days

plot_performance_easy_median_reaction_time

plot_psychometric_curve

plot_trial_count_and_session_duration

save_dataframe

Save training dataframe to disk

save_path

get_trials_task(session_path, one)[source]
save_path(subj_path)[source]
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

plot_trial_count_and_session_duration(df, subject)[source]
plot_performance_easy_median_reaction_time(df, subject)[source]
plot_fit_params(df, subject)[source]
plot_psychometric_curve(df, subject, one)[source]
plot_over_days(df, subject, y1, y2=None, ax=None, legend=True, title=True, training_lines=True)[source]
add_training_lines(df, ax)[source]
plot_heatmap_performance_over_days(df, subject)[source]
make_plots(session_path, one, df=None, save=False, upload=False)[source]