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
TranscribeManagermethods 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 attributesself.chosenmodel,self.filemd,self.respmdandself.epochmdare essential for this function.Returned Values: There are no values returned but one attribute
self.nwbfileis 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 chosenmodelinstantiated model simtimedatetime.datetime when simulation started recordings- dictionary with keys:
"time","response"and "stimulus"
- dictionary with keys:
- 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"
- dictionary with keys
- Eg: {“dt”: 0.01, “celsius”: 30, “tstop”: 100, “v_init”: 65}
stimparameters(optional)- dictionary with keys
"type","stimlist"and "tstop"
- dictionary with keys
- 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
- the first element is ALWAYS
- 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 CerebUnittestusername(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 modelself.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
TranscribeManagermethods are instance methods - for more on arguments:
vtest,username,labnameandinsitutenamesee .forfile in FileGenerator - for more on argument
stimparameterssee .forrecording in TimeseriesGenerator
-
save_nwbfile()¶ After evoking
compile_nwbfile(), calling this function writes the createdself.nwbfileinto an HDF5 file.Arguments: No argument is passed but it is imperative that
load_metadata()is called first followd bycompile_nwbfile(). The attributesself.chosenmodelandself.nwbfileare 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.
-