|
Peano
|
Probe the data within a Peano patch file at one point over time. More...


Public Member Functions | |
| __init__ (self, file_name, point, output_file, start, end, verbose=False) | |
| process_snapshot (self, snapshot, i) | |
| Return (timestamp, dict from unknown name onto (number of unknowns, description, values or None)). | |
| display (self, max_workers=1) | |
| This is the one routine the visualisers typically do overwrite. | |
| display_single_file (self) | |
| If we are here we've supplied a single file which is itself a snapshot. | |
| Public Member Functions inherited from tarch.plotter.api.output.Visualiser.Visualiser | |
| __init__ (self, file_name, start, end, verbose=False) | |
| Abstract superclass of a visualiser. | |
| read_metadata (self) | |
| Read the patch file metadata. | |
| append_filter (self, filter) | |
| remove_filters (self) | |
| parse_and_render_snapshot (self, snapshot) | |
| We pass in a snapshot object here, which should contain time stamp and filenames for everything we want to render here. | |
| parse_snapshot (self, snapshot) | |
| We rewrite "reload" from previous version of this file. | |
Static Public Attributes | |
| int | Tolerance = 1e-8 |
Protected Member Functions | |
| _probe_patch_data (self, patch_file_data, point) | |
| Return list of unknowns at point or None if point is not covered. | |
| _assert_default_cell_mapping (self, patch_file_data) | |
| Cell data with a user-defined (distorted) mapping is not supported. | |
| _run (self, max_workers) | |
| _column_names (self, columns, descriptions) | |
| One column name per unknown of each data set. | |
| _write_csv (self, results) | |
Protected Attributes | |
| _point = tuple(float(x) for x in point) | |
| _output_file = output_file | |
| Protected Attributes inherited from tarch.plotter.api.output.Visualiser.Visualiser | |
| _file_name = file_name | |
| _start = start | |
| _end = end | |
| list | _filter = [] |
| int | _dimensions = 0 |
| str | _description = "" # |
| bool | _is_data_associated_to_cell = False |
Additional Inherited Members | |
| Data Fields inherited from tarch.plotter.api.output.Visualiser.Visualiser | |
| tuple | identifier |
| verbose = verbose | |
| bool | show_progress = True |
| patch_filter = None | |
| list | snapshots = [] |
| bool | meta_data_has_been_read = False |
Probe the data within a Peano patch file at one point over time.
This is not a visualiser but a postprocessing tool, but it reuses the whole meta file and snapshot logic of the Visualiser. Per snapshot, we parse only those patches which contain the probe point (
The result is a csv file with one row per snapshot. The first column is the snapshot's time stamp, followed by all unknowns of all data sets found in the file. If the point is not covered by any patch in a snapshot, we write NaNs.
If the point sits exactly on the face between two patches of the same size, we take the patch to the right/top/front, i.e. we use half-open intervals [offset,offset+size). Only if no such patch exists (domain boundary), we fall back to the patch to the left.
Definition at line 37 of file PointProbe.py.
| tarch.plotter.api.output.PointProbe.PointProbe.__init__ | ( | self, | |
| file_name, | |||
| point, | |||
| output_file, | |||
| start, | |||
| end, | |||
| verbose = False ) |
Definition at line 61 of file PointProbe.py.
References __init__().
Referenced by __init__().


|
protected |
Cell data with a user-defined (distorted) mapping is not supported.
Definition at line 130 of file PointProbe.py.
Referenced by _probe_patch_data().

|
protected |
One column name per unknown of each data set.
If a data set names its unknowns (
Definition at line 195 of file PointProbe.py.
Referenced by _write_csv().

|
protected |
Return list of unknowns at point or None if point is not covered.
Definition at line 66 of file PointProbe.py.
References _assert_default_cell_mapping(), and Tolerance.

|
protected |
Definition at line 172 of file PointProbe.py.
Referenced by display().

|
protected |
Definition at line 224 of file PointProbe.py.
References _column_names(), and _output_file.

| tarch.plotter.api.output.PointProbe.PointProbe.display | ( | self, | |
| max_workers = 1 ) |
This is the one routine the visualisers typically do overwrite.
Reimplemented from tarch.plotter.api.output.Visualiser.Visualiser.
Definition at line 253 of file PointProbe.py.
References _run(), and display().
Referenced by display().


| tarch.plotter.api.output.PointProbe.PointProbe.display_single_file | ( | self | ) |
If we are here we've supplied a single file which is itself a snapshot.
Turn it into an instance of the snapshot helper class, set the timestamp to 0 and pass it back. We can just call parse_and_render_snapshot() on the result
Reimplemented from tarch.plotter.api.output.Visualiser.Visualiser.
Definition at line 257 of file PointProbe.py.
| tarch.plotter.api.output.PointProbe.PointProbe.process_snapshot | ( | self, | |
| snapshot, | |||
| i ) |
Return (timestamp, dict from unknown name onto (number of unknowns, description, values or None)).
Definition at line 155 of file PointProbe.py.
|
protected |
Definition at line 64 of file PointProbe.py.
Referenced by _write_csv().
|
protected |
Definition at line 63 of file PointProbe.py.
|
static |
Definition at line 59 of file PointProbe.py.
Referenced by _probe_patch_data().