src.sim.output.output module

class Output(sim: GrowingSim, filename_csv: str, filename_json: str)[source]

Bases: object

Handles the generation and management of simulation output data.

This class is responsible for creating and writing simulation results to a CSV file, including detailed information about each cell.

sim

The simulation instance from which to gather output data.

Type:

GrowingSim

filename_csv

The name of the CSV file to which output data will be written.

Type:

str

filename_json

The name of the JSON file to which output data will be written.

Type:

str

Parameters:
  • sim (GrowingSim) – The simulation instance associated with this output.

  • filename_csv (str) – The filename for the output CSV file.

  • filename_json (str) – The filename for the output JSON file.

output_cells() None[source]

Writes the current state of all cells to the output files.

This method gathers data from each cell within the simulation, including concentrations, locations, and PIN distributions, and writes this information to the specified output files.

get_circ_contents(summary: dict[str, Any], cell: Cell) dict[str, Any][source]

Populates the summary dictionary with circulation content information for a given cell.

Parameters:
  • summary (dict[str, Any]) – The summary dictionary to be populated with cell circulation data.

  • cell (Cell) – The cell from which to retrieve circulation content information.

Returns:

The updated summary dictionary containing circulation content information for the cell.

Return type:

dict[str, Any]

get_division_number(cell: Cell) int[source]

Retrieves the number of divisions a cell has undergone.

This method is a placeholder and is not implemented.

Parameters:

cell (Cell) – The cell from which to retrieve the division count.

Returns:

The number of divisions the cell has undergone.

Return type:

int

Raises:

NotImplementedError – Indicates that the method is not yet implemented.