-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Xrdml file format update #25
base: master
Are you sure you want to change the base?
Conversation
Our xrdml file format has ``` <counts unit="counts"> ``` instead of intensities, so I added an option to look for counts first to avoid this error. Will happily accept another solution!
This is an example file format with the new labeling for counts for Panalytical.
…__15-120_026step_30min_1.xrdml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest the following changes to avoid compiler warnings/errors because of a two times defined ycol
.
// check of the nodes, they differ for different versions
// valid are intensities or counts
if(data_points.count(node) == 0)
node = "counts";
string inten_str = data_points.get<string>(node);
ycol->add_values_from_str(inten_str);
if (ycol->get_point_count() < 2)
throw FormatError("intensities/counts do not look correct");
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested the example file (OK) and have a single change to avoid compiler warnings.
The issue here was also reported for rxylib
: R-Lum/rxylib#5
I've modified the code reading the xrdml files for Panalytical instruments, as currently I have to edit the information on your instruments files to read intensities string instead of the counts. This is seen in the example file as:
Happy to accept other solutions!