Skip to content
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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

lapressle
Copy link

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:

<counts unit="counts">

Happy to accept other solutions!

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.
Copy link
Contributor

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");

Copy link
Contributor

@RLumSK RLumSK left a 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants