I am interested in determining whether there is a simpler method to directly access and print specific variable values from the results, without the need to manually open the OUT.DAT file. While I am aware of methods to display key output variables, such as:
print(f"Heat transport system: {single_run.models.costs.c226:.3e} M$")
print(f"Electrical plant equipment: {single_run.models.costs.c24:.3e} M$")
these require detailed knowledge of the entire data structure to accurately reference and print the desired variables. For instance, if I want to view only a few specific variables like rmajor, rminor, q0, beta_n, and Q-value, I would need to search through the data structure to identify the correct paths to print these values.
Currently, using the following approach:
runs_metadata = [
RunMetadata(data_dir / "large_tokamak_1_MFILE.DAT", "large tokamak 1"),
]
# Figure and dataframe returned for optional further modification
fig1, df1 = plot_mfile_solutions(
runs_metadata=runs_metadata,
plot_title="Large tokamak solution 1",
)
df1
results are typically presented as figures or tables, which does not provide direct access to individual variable values.
It would be highly beneficial to have a more straightforward method to access and print specific key result variables, such as runs_metadata.rmajor, runs_metadata.thwcndut, and others. This would significantly enhance the usability and efficiency of working with the data. I hope there would be a function that can convert OUT.DAT data into dictionary or class type structure.
I am interested in determining whether there is a simpler method to directly access and print specific variable values from the results, without the need to manually open the OUT.DAT file. While I am aware of methods to display key output variables, such as:
these require detailed knowledge of the entire data structure to accurately reference and print the desired variables. For instance, if I want to view only a few specific variables like rmajor, rminor, q0, beta_n, and Q-value, I would need to search through the data structure to identify the correct paths to print these values.
Currently, using the following approach:
results are typically presented as figures or tables, which does not provide direct access to individual variable values.
It would be highly beneficial to have a more straightforward method to access and print specific key result variables, such as runs_metadata.rmajor, runs_metadata.thwcndut, and others. This would significantly enhance the usability and efficiency of working with the data. I hope there would be a function that can convert OUT.DAT data into dictionary or class type structure.