Improving detector output format

Registered by Michael Lange

The current detector I/O routines are not capable of handling dynamic creation/deletion of detectors at run-time, a feature required for the future use of detectors in lagrangian biology simulations. This is due to the fact that each detector gets assigned a fixed set of columns in the output file header, such that each row represents one timestep.

The proposed solution changes the internal representation in the detector output files so that each row represents only one detector, associated with an internal ID and a timestep number. The stat_parser utility can then specifically detect '.detectors' files and re-organise the processed data block according to the standard format. Additionally, we also add a new type of tag to the xml header for mapping the detector IDs back to individual names.

The described changes are all internal and should not be visible to the outside user. However, since we are creating a special case for .detectors files in the stat_parser, we might also want to improve the current access convention when dealing with .detectors files. In particular, the detector name should always be the first key into the resulting dictionary hierarchy, rather than the material phase. This is more intuitive when dealing with detectors, but will impact all tests that use detectors.

Currently we access detector position and values as:
   stat_parser('test.detectors')['Material_Phase']['Field']['Detector']
   stat_parser('test.detectors')['position']['Detector']

The new format would be:
   stat_parser('test.detectors')['Detector']['Material_Phase']['Field']
   stat_parser('test.detectors')['Detector']['Position']
   stat_parser('test.detectors')['Detector']['ElapsedTime']

Blueprint information

Status:
Not started
Approver:
Dr Colin J Cotter
Priority:
Undefined
Drafter:
None
Direction:
Needs approval
Assignee:
Michael Lange
Definition:
Discussion
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Sprints

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.