Helper Functions

The following helper functions can be imported directly from antelop at the top level.

antelop.split_trials(data, mask)

Split trials based on mask

Inputs: mask: tuple of data, timestamps data: tuple of data, timestamps

Returns: list of tuples of data, timestamps

antelop.upload_rig_json(experimenter, rig_name, rigfile, masklist, username=None, password=None, conn=None)

Function validates the rig json, converts and uploads it along with corresponding features

Inputs:

experimenter (str): experimenter username rig_name (str): name of the rig rig_json (path): path to the rig json file masklist (list of dict): list of mask dictionaries, with keys ‘name’, ‘description’, ‘function’

antelop.recompute_masks(restriction, username=None, password=None)
antelop.insert_nwb(world, selfs, nwbpath, username=None, password=None)

Function reads an NWB file and the database features and inserts the data into the database

Parameters:
  • session (dict) – session primary key

  • animals (list of dict) – animal primary keys

  • nwbpath (Path) – path to the nwb file

Returns:

None