TranscribeManager

class managers.transcribe.TranscribeManager

Available methods:

Method name Method type
load_metadata() instance method
compile_nwbfile() instance method
save_nwbfile() instance method

NOTE: Unlike most managers TranscribeManager methods are instance method.

compile_nwbfile()

After evoking load_metadata(), calling this function results in the creation of the NWBFile. This is done by directing the Fabricator.

Arguments: No argument is passed but it is imperative that load_metadata() is called first. The four attributes self.chosenmodel, self.filemd, self.respmd and self.epochmd are essential for this function.

Returned Values: There are no values returned but one attribute self.nwbfile is assigned. Its value is the created NWBFile.

load_metadata(chosenmodel=None, simtime=None, recordings=None, runtimeparameters=None, stimparameters=None, vtest=None, username=None, labname=None, institutename=None)

Directs FileGenerator (.forfile) to create a meta-data for the file followed by TimeseriesGenerator (.forrecording) for generating the meta-data for the recordings. Finally, the EpochGenerator (.forepoch) generates the meta-data for the epoch/s.

**Keyword Arguments:*

Key Value type
chosenmodel instantiated model
simtime datetime.datetime when simulation started
recordings
  • dictionary with keys: "time", "response" and

    "stimulus"

  • Eg: {“time”: array, “response”: {cellregion_a: array,

    cellregion_b: array},

    “stimulus”: str(“Model is not stimulated”) or array}

runtimeparameters
  • dictionary with keys "dt", "celsius", "tstop"
    and "v_init"
  • Eg: {“dt”: 0.01, “celsius”: 30, “tstop”: 100, “v_init”: 65}
stimparameters (optional)
  • dictionary with keys "type", "stimlist" and
    "tstop"
  • value for "type" is a two element list of strings of
the form <stimulus category> <specific type of that category>
  • the first element is ALWAYS <stimulus category>
  • Eg: current inject on a cell ["current", "IClamp"]
  • value for "stimlist" is list with elements as dictionary
of the form [ {}, {}, … ]
  • Eg1: [ {“amp”: 0.5, “dur”: 100.0, “delay”: 10.0},

    {“amp”: 1.0, “dur”: 50.0, “delay”: 10.0+100.0} ]

  • Eg2: [ {“amp_initial”: 0.0, “amp_final”: 0.5, “dur”: 5.0,

    “delay”: 5.0},

    {“amp_initial”: 0.5, “amp_final”: 1.0, “dur”: 5.0,

    “delay”: 10.0},

    {“amp_initial”: 1.0, “amp_final”: 0.5, “dur”: 5.0,

    “delay”: 15.0},

    {“amp_initial”: 0.5, “amp_final”: 0.0, “dur”: 5.0,

    “delay”: 20.0}]

  • value for "tstop" is a number, time for generating the

last epoch. Therefore, "tstop": parameters["tstop"].

vtest (optional) instantiated validation CerebUnit test
username (optional) string
labname (optional) string
institutename (optional) string

Returned Values: There are no values returned per se but four attributes are assigned

  • self.chosenmodel, whose value is the instantiated model
  • self.filemd, whose value is the meta-data created by FileGenerator (.forfile)
  • self.respmd, whose value is the meta-data created by TimeseriesGenerator (.forrecording)
  • self.epochmd, whose value is the meta-data created by EpochGenerator (.forepoch)

NOTE:

  • the above assignment of attributes is the major reason why TranscribeManager methods are instance methods
  • for more on arguments: vtest, username, labname and insitutename see .forfile in FileGenerator
  • for more on argument stimparameters see .forrecording in TimeseriesGenerator
save_nwbfile()

After evoking compile_nwbfile(), calling this function writes the created self.nwbfile into an HDF5 file.

Arguments: No argument is passed but it is imperative that load_metadata() is called first followd by compile_nwbfile(). The attributes self.chosenmodel and self.nwbfile are essential for this function.

Returned Values: The fullname (string; filepath with filename) is returned.

NOTE: The returned fullname is useful for loading this particular file.