JYU-IBA / potku

Potku is analysis and simulation software for ToF-ERD measurements
https://www.jyu.fi/science/en/physics/research/infrastructures/accelerator-laboratory/pelletron/potku/
GNU General Public License v2.0
7 stars 8 forks source link

Metadata in .cut files should be indicated with a special character #24

Open jussiks opened 4 years ago

jussiks commented 4 years ago

The contents of .cut files currently look like this:

Count: 13
Type: ERD
Weight Factor: 1.0
Energy: 0
Detector Angle: 0
Scatter Element: 
Element losses: False
Split count: 1

ToF, Energy, Event number
1060 644 644
1078 639 764
1065 634 3688
...

This should be changed so that the metadata (count, type etc.) is separated from the actual data with some special character (for example '#').

# Count: 13
# Type: ERD
# Weight Factor: 1.0
# Energy: 0
# Detector Angle: 0
# Scatter Element: 
# Element losses: False
# Split count: 1
#
# ToF, Energy, Event number
1060 644 644
1078 639 764
1065 634 3688
...

The line # ToF, Energy, Event number would not necessary have to start with a '#' as long as it follows standard csv header format (something like ToF Energy "Event number").

jussiks commented 4 years ago

The thing to consider here is backwards compatibility. While it would not be too difficult to make the new version of Potku support both file formats, old versions of Potku (at least the Python portion of the code) would not be able to parse the newer files.