Results

This submodule contains the Results class definition.

class chromaquant.results.results.Results

Results objects can contain references to created DataSets, create formulas and update extant ones following changes to relevant DataSets, and report results to Excel.

add_breakdown(breakdown: Breakdown)

Adds an reference to an instance of Breakdown to self.

Parameters

breakdownBreakdown

A Breakdown instance to add to Results.

Returns

None

add_formula(formula: Formula)

Adds Formula to Results and its formula strings to DataSets of self.

This method takes a Formula object, inserts references into its formula strings using the Results’ DataSet references, then adds the resulting processed formulas to the DataSet pointed to in Formula. This method also adds a entry to the Results’ formula cache, allowing for dynamic formula updating.

Parameters

formulaFormula

A Formula instance to add to Results. It is expected that this instance contains a pointer to a DataSet for outputting resulting formulas.

Returns

None

add_table(table: Table)

Adds an reference to an instance of Table to self.

Parameters

tableTable

A Table instance to add to Results.

Returns

None

add_value(value: Value)

Adds an reference to an instance of Value to self.

Parameters

valueValue

A Value instance to add to Results.

Returns

None

report_results(path: str = 'report.xlsx')

Reports Results to an Excel file.

Parameters

pathstr, optional

Path to report, by default ‘report.xlsx’

Returns

None

update_datasets()

Update all datasets, used if one DataSet is changed.

Returns

None

update_references()

Update Value and Table references, used before formula creation.

Returns

None