Mechanism Factories¶
- dendrotweaks.biophys.io.factories.create_channel(path_to_mod_file: str, path_to_python_file: str, path_to_python_template: str, verbose: bool = False) IonChannel [source]¶
Creates an ion channel from a .mod file.
- Parameters:
path_to_mod_file (str) – The full path to the .mod file containing the channel mechanism.
path_to_python_file (str) – The path to the output Python file to be generated.
path_to_python_template (str) – The path to the jinja2 template file for the Python file.
verbose (bool, optional) – Whether to print verbose output.
- Returns:
The instantiated ion channel.
- Return type:
- dendrotweaks.biophys.io.factories.standardize_channel(channel: IonChannel, path_to_mod_template: str = None, path_to_standard_mod_file: str = None) StandardIonChannel [source]¶
Standardize a channel and optionally generate a MOD file.
- Parameters:
channel (IonChannel) – The channel to standardize.
path_to_mod_template (str, optional) – The path to the jinja2 template file for the standard MOD file.
path_to_standard_mod_file (str, optional) – The path to save the standardized MOD file.
- Returns:
A standardized version of the input channel.
- Return type:
Note
Temperature-dependence is taken into account by performing a fit to the data at the temperature specified in the parameters of the original channel model (the temp parameter). If no temperature is specified, the default temperature of 23 degrees Celsius is used.
- dendrotweaks.biophys.io.factories.create_standard_channel(path_to_mod_file: str, path_to_python_file: str, path_to_python_template: str, path_to_mod_template: str, path_to_standard_mod_file: str, verbose: bool = False) StandardIonChannel [source]¶
Creates a standardized channel and fits it to the data of the unstandardized channel.
- Parameters:
path_to_mod_file (str) – The path to the original MOD file for an unstandardized channel.
path_to_python_file (str) – The path to the output Python file to be generated.
path_to_python_template (str) – The path to the jinja2 template file for the Python file.
path_to_mod_template (str) – The path to the jinja2 template file for the standard MOD file.
path_to_standard_mod_file (str) – The path to the output standardized MOD file.
verbose (bool, optional) – Whether to print verbose output.
- Returns:
The standardized ion channel.
- Return type: