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

read_xyData possibly not working for xrdml? #5

Closed
ZabvDa opened this issue Sep 20, 2023 · 3 comments
Closed

read_xyData possibly not working for xrdml? #5

ZabvDa opened this issue Sep 20, 2023 · 3 comments

Comments

@ZabvDa
Copy link

ZabvDa commented Sep 20, 2023

Hi Developers

Thanks for an nice package that I enjoy using.

I have previously used the package for xrdml files from (Malvern)Panalytical instruments and the read_xyData function has always worked.
I have now updated R (R version 4.3.1) and the package (0.2.11) and now the function read_xyData does not seem to work for xrdml files.

Example from Reference manual. This works perfectly

file <- system.file("extdata/ExampleSpectrum.CNF", package = "rxylib")
file
results <- read_xyData(file)
results

Test with different file that was included in the package. This also works perfectly

file_2 <- system.file("extdata/TLSpectrum.xsyg", package = "rxylib")
file_2
results_2 <- read_xyData(file_2)
results_2

I added my own .xrdml file to the package directory and called it Xrdml_test.xrdml.

This is so that the test should be a close to the example as possible

file_1 <- system.file("extdata/Xrdml_test.xrdml", package = "rxylib")
file_1

The file seems to be readily detected and stored in the file_1 object

results_1 <- read_xyData(file_1)

When using the read_xyData function on .xrdml files, R throws an error:

#[read_xyData()] File of type PANalytical XRDML detected ...
#Error : [read_xyData()] Data import failed. Return NULL!

So it seems to detect the file correctly but will not import the data.

results_1

Could it be that the resent update resulted in the read_xyData function not working with xrdml files?

Thank you for your work.

Best regards

@RLumSK
Copy link
Member

RLumSK commented Sep 20, 2023

@ZabvDa Would you mind sending me your xrdml file? You can either upload it here or send it to me via e-mail (see https://cran.r-project.org/package=rxylib) for the maintainer address).

@RLumSK RLumSK self-assigned this Sep 20, 2023
@RLumSK
Copy link
Member

RLumSK commented Sep 20, 2023

Linked to wojdyr/xylib#25

RLumSK added a commit that referenced this issue Sep 20, 2023
+ up xrdml.cpp
+ up tests
+ ad NEWS
@RLumSK
Copy link
Member

RLumSK commented Sep 20, 2023

@ZabvDa The xrdml version you have used has a node called <counts/> instead of <intensities/>. Therefore it did not work anymore because the underlying xylib needed an adjustment first. It should work now, please install the development version for "rxylib" from GitHub (branch: master)

@RLumSK RLumSK closed this as completed Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants