API Reference

Application Layer

class root_locus_analysis.systemResponseTool.app.SystemResponseApp(in_dir: 'Path', out_dir: 'Path', show_plots: 'bool' = True)[source]
Parameters:
  • in_dir (Path)

  • out_dir (Path)

  • show_plots (bool)

engine: ResponseEngine
export: Exporter
in_dir: Path
out_dir: Path
parse_systems(sys_args)[source]
Parameters:

sys_args (Iterable[str])

Return type:

List[SysSpec]

parser: Parser
run_arb(specs, T, *, kind, amp, freq, duty, expr, file_path, show_input, title='', out_prefix=None)[source]
Parameters:
  • specs (List[SysSpec])

  • T (ndarray)

  • kind (str)

  • amp (float)

  • freq (float)

  • duty (float)

  • expr (str)

  • file_path (str)

  • show_input (bool)

  • title (str)

  • out_prefix (str | None)

Return type:

Figure

run_ic(specs, T, *, which, compare, title='', out_prefix=None)[source]
Parameters:
  • specs (List[SysSpec])

  • T (ndarray)

  • which (ICMode)

  • compare (bool)

  • title (str)

  • out_prefix (str | None)

Return type:

Figure

run_impulse(specs, T, title='', out_prefix=None)[source]
Parameters:
  • specs (List[SysSpec])

  • T (ndarray)

  • title (str)

  • out_prefix (str | None)

Return type:

Figure

run_ramp(specs, T, *, title='', out_prefix=None, show_input=False)[source]
Parameters:
  • specs (List[SysSpec])

  • T (ndarray)

  • title (str)

  • out_prefix (str | None)

  • show_input (bool)

Return type:

Figure

run_step(specs, T, title='', out_prefix=None)[source]
Parameters:
  • specs (List[SysSpec])

  • T (ndarray)

  • title (str)

  • out_prefix (str | None)

Return type:

Figure

show_plots: bool
signals: SignalGenerator
tf_builder: TransferFunctionBuilder

API Schemas and Services

class root_locus_analysis.systemResponseTool.apis.RunRequest(sys_args: 'List[str]', responses: 'List[str]', tfinal: 'float' = 5.0, dt: 'float' = 0.005, title: 'str' = '', out_prefix: 'Optional[str]' = None, arb_kind: 'str' = 'ramp', arb_amp: 'float' = 1.0, arb_freq: 'float' = 0.5, arb_duty: 'float' = 0.5, arb_expr: 'str' = 'sin(2*pi*0.5*t)+0.3*sin(2*pi*2*t)', arb_file: 'str' = '', show_input: 'bool' = False, ic_compare: 'bool' = True)[source]
Parameters:
  • sys_args (List[str])

  • responses (List[str])

  • tfinal (float)

  • dt (float)

  • title (str)

  • out_prefix (str | None)

  • arb_kind (str)

  • arb_amp (float)

  • arb_freq (float)

  • arb_duty (float)

  • arb_expr (str)

  • arb_file (str)

  • show_input (bool)

  • ic_compare (bool)

arb_amp: float
arb_duty: float
arb_expr: str
arb_file: str
arb_freq: float
arb_kind: str
dt: float
ic_compare: bool
out_prefix: str | None
responses: List[str]
show_input: bool
sys_args: List[str]
tfinal: float
title: str
class root_locus_analysis.systemResponseTool.apis.SystemResponseService(in_dir: 'Path', out_dir: 'Path', show_plots: 'bool' = True)[source]
Parameters:
  • in_dir (Path)

  • out_dir (Path)

  • show_plots (bool)

app: SystemResponseApp
in_dir: Path
out_dir: Path
run(req)[source]

Execute all requested responses using the application layer.

Parameters:

req (RunRequest)

Return type:

None

show_plots: bool

Core Utilities

root_locus_analysis.systemResponseTool.utils.add_trace(fig, T, y, name, color, dash, width)[source]
Parameters:

fig (Figure)

root_locus_analysis.systemResponseTool.utils.default_palette()[source]
root_locus_analysis.systemResponseTool.utils.make_figure(title, ylab)[source]
Parameters:
  • title (str)

  • ylab (str)

Return type:

Figure

root_locus_analysis.systemResponseTool.utils.make_logger(name='systemResponseTool', level='INFO')[source]
Parameters:
  • name (str)

  • level (str)

Return type:

Logger

root_locus_analysis.systemResponseTool.utils.parse_matrix(s)[source]
Parameters:

s (str)

Return type:

ndarray

root_locus_analysis.systemResponseTool.utils.parse_poly(s)[source]
Parameters:

s (str)

Return type:

ndarray

root_locus_analysis.systemResponseTool.utils.parse_vector(s)[source]
Parameters:

s (str)

Return type:

ndarray

root_locus_analysis.systemResponseTool.utils.poly_from_factor_expr(expr)[source]
Parameters:

expr (str)

Return type:

ndarray

root_locus_analysis.systemResponseTool.utils.split_top_level(s, sep=';')[source]
Parameters:
  • s (str)

  • sep (str)

Return type:

List[str]

root_locus_analysis.systemResponseTool.utils.time_grid(tfinal, dt)[source]
Parameters:
  • tfinal (float)

  • dt (float)

Return type:

ndarray