Report quantities and values to a file.
Parameters: |
|
---|
All other keywords are set as attributes on the fileformat processor. To determine the supported options for a processor call get_options_for_format()
Important options fot text and comma separated files are:
Parameters: |
|
---|
Writes data per row to a file. Ideal for storing intermediate values of one Particle or one Gridpoint during a run.
Example usage:
report = ReportTable(
"hrdiagram.txt", "txt",
attribute_types=(units.Myr, units.K, units.LSun),
attribute_names=('age', 'temperature_at_time', 'luminosity_at_time')
)
report.add_row(particle.age, particle.temperature_at_time, particle.luminosity_at_time)
Add a row to the report, columns can be added by name or by position in list. If columns are given by name the order does not matter and will alway follow to order given in the ‘attribute_names’ option specified when creating the ReportTable.
Example usage:
report.add_row(
particle.age,
particle.temperature_at_time,
particle.luminosity_at_time
)
report.add_row(
temperature_at_time = particle.temperature_at_time,
age = particle.age,
luminosity_at_time = particle.luminosity_at_time
)