emodelrunner.factsheets.output

Functionality to save factsheets output.

Functions

get_stim_params_from_config_for_physiology_factsheet(...)

Get step amplitude, delay and duration for phisiology factsheet.

write_emodel_json(emodel, morphology_prefix, ...)

Write the e-model factsheet json file.

write_etype_factsheet(data_path, ...)

Write the e-type factsheet json file.

write_metype_json(data_path, ...)

Write the me-type factsheet json file of SSCX packages.

write_metype_json_from_config(config, ...)

Write the me-type factsheet json file from config input.

emodelrunner.factsheets.output.get_stim_params_from_config_for_physiology_factsheet(prot_path, protocol_key)[source]

Get step amplitude, delay and duration for phisiology factsheet.

Parameters
  • prot_path (str or Path) – path to the json file containing the protocols

  • protocol_key (str) – name of the protocol used for physiology features extraction

Returns

a tuple containing

  • current_amplitude (int or float): the amplitude current of the step protocol (mA)

  • stim_start (int or float): the start of the stimulus (ms)

  • stim_duration (int or float): the duration of the stimulus (ms)

Raises

Exception – If a step protocol with multiple steps has been provided

emodelrunner.factsheets.output.write_emodel_json(emodel, morphology_prefix, features_dict, feature_units_dict, unoptimized_params_dict, optimized_params_dict, output_path)[source]

Write the e-model factsheet json file.

The output metype factsheet contains experimental features and channel mechanisms data.

Parameters
  • emodel (str) – name of the emodel

  • morphology_prefix (str) – prefix used in the fitness key to the experimental feature

  • features_dict (dict) – contains the experimental features

  • feature_units_dict (dict) – contains the units for the experimental features

  • unoptimized_params_dict (dict) – contains the unoptimized parameters, and also contains the decay and exponential equations

  • optimized_params_dict (dict) – contains the optimized parameters, as well as the original morphology path

  • output_path (str) – path to the e-model factsheet output

emodelrunner.factsheets.output.write_etype_factsheet(data_path, current_amplitude, stim_start, stim_duration, output_path)[source]

Write the e-type factsheet json file.

Parameters
  • data_path (str) – path to the trace data (usually output of emodelrunner run)

  • current_amplitude (float) – current amplitude of the stimulus (nA)

  • stim_start (float) – time at which the stimulus begins (ms)

  • stim_duration (float) – stimulus duration (ms)

  • output_path (str) – path to the etype factsheet output

emodelrunner.factsheets.output.write_metype_json(data_path, current_amplitude, stim_start, stim_duration, morphology_path, output_path)[source]

Write the me-type factsheet json file of SSCX packages.

The output metype factsheet contains anatomy, physiology and morphology data.

Parameters
  • data_path (str) – path to the trace data (usually output of emodelrunner run)

  • current_amplitude (float) – current amplitude of the stimulus (nA)

  • stim_start (float) – time at which the stimulus begins (ms)

  • stim_duration (float) – stimulus duration (ms)

  • morphology_path (str or Path) – Path to the morphology file.

  • output_path (str) – path to the metype factsheet output

emodelrunner.factsheets.output.write_metype_json_from_config(config, voltage_path, morphology_path, output_path, protocol_key)[source]

Write the me-type factsheet json file from config input.

Parameters
  • config (configparser.ConfigParser) – configuration

  • voltage_path (str) – path to the trace data (usually output of emodelrunner run)

  • morphology_path (str) – Path to the morphology file.

  • output_path (str) – path to the metype factsheet output

  • protocol_key (str) – name of the protocol used for physiology features extraction