FlowEdittingFilter#
- class pyCGM2.flow.flowFilters.FlowEdittingFilter(data_path, modelVersion, procedure=None, emgSettings=None)#
Filter writing the flow user settings file (
cgm#i-settings) of a session.The template of the settings file is located with
findFlowTemplate(), unless it is set withsetTemplate().- Parameters:
data_path (str) – Session folder.
modelVersion (str) – CGM version.
procedure (pyCGM2.flow.procedures.flowProcedures.AbstractFlowProcedure, optional) – Procedure collecting session details (e.g. from Eclipse). If None, an empty settings structure is written.
emgSettings (dict, optional) – EMG settings. Defaults to the pyCGM2
emg.settingsfile.
- __init__(data_path, modelVersion, procedure=None, emgSettings=None)#
Methods
__init__(data_path, modelVersion[, ...])run(filename[, displayFile])Render and write the settings file.
setTemplate(template_pathFilename)Set the template used to render the settings file.
- run(filename, displayFile=True)#
Render and write the settings file.
- Parameters:
filename (str) – Output filename.
displayFile (bool, optional) – Open the generated file. Defaults to True.
- Raises:
FileNotFoundError – If the template is not found.
- setTemplate(template_pathFilename)#
Set the template used to render the settings file.
- Parameters:
template_pathFilename (str) – Path of the template. If None, the template is located with
findFlowTemplate().