simply_nwb.transferring package

Subpackages

Submodules

simply_nwb.transferring.nwb_transfer module

class simply_nwb.transferring.nwb_transfer.NWBTransfer(nwb_file_location: str, raw_data_folder_location: str, lab_name: str, project_name: str, session_name: str, transfer_location_root: str)

Bases: object

Class to aid in transferring data around in a structured way

TIMESTAMP_SUFFIX = '{day}_{month}_{year}-{hour}_{minute}_{second}'
__init__(nwb_file_location: str, raw_data_folder_location: str, lab_name: str, project_name: str, session_name: str, transfer_location_root: str)

Create a transfer helper object to copy the NWB and raw data over to the storage location

Parameters:
  • nwb_file_location – String path location to the .nwb file

  • raw_data_folder_location – Folder containing all the raw data relevant to the session, will be zipped

  • lab_name – Name of the Lab, for example: ‘FelsenLab’, ‘DenmanLab’, ‘PolegPolskyLab’ in CamelCase. See https://en.wikipedia.org/wiki/Camel_case

  • project_name – Project name, should be in snake_case, see https://simple.wikipedia.org/wiki/Snake_case

  • session_name – Name for the session, will automatically add ‘day_month_year_time’ suffix. Should also be in snake_case

  • transfer_location_root – Location of the storage system, if mounted locally can use Drive:or network if network attached use domainfolder

static make_nwb_filename(session_name: str) str
static make_raw_zip_filename(session_name: str) str
static make_timestamp_filename_suffix() str
upload(zip_location_override: str | None = None, do_print: bool = True) None

Upload the NWB and raw data to the storage location, with an optional zip override. Can set do_print to False to silence this method

Parameters:
  • zip_location_override – Optional override for the location of a zipfile, will skip zipping the raw data folder

  • do_print – if False, method will not print anything

Returns:

None

Module contents