el1xr_opt.Modules.oM_InputCSVSource#

el1xr_opt CSV backend — reads a directory of oM_Dict_* / oM_Data_* files.

This preserves the model’s historical reading behaviour exactly: each data table is read with pd.read_csv and its leading unnamed columns are set as a nameless index.

class el1xr_opt.Modules.oM_InputCSVSource.CSVSource(case_dir)[source]#

Bases: InputSource

property dir_name: str#
list_data_stems()[source]#

Stems of the data tables present (no oM_Data_ prefix, no _<case>.csv suffix).

Return type:

set

list_dict_stems()[source]#
Return type:

set

read_dict(stem)[source]#

Return the dimension dict for stem as a plain DataFrame (no index).

Returns an empty DataFrame if the dict is absent.

Return type:

DataFrame

Parameters:

stem (str)

read_data(stem)[source]#

Return a data table with its leading unnamed columns set as a nameless index.

This is the exact shape oM_InputData expects: the same DataFrame the old pd.read_csv + set_index(unnamed columns) code produced. Raises FileNotFoundError if the stem is absent.

Return type:

DataFrame

Parameters:

stem (str)