wincowgerDEV / OpenSpecy-shiny

This is a companion repo that holds the code for www.openspecy.org website and shiny application. The Open Specy package repo https://github.com/wincowgerDEV/OpenSpecy-package
Creative Commons Attribution 4.0 International
3 stars 3 forks source link

[Bug]: Error in opus file reading #22

Open wincowgerDEV opened 2 years ago

wincowgerDEV commented 2 years ago

Guidelines

Project Version

No response

Platform and OS Version

No response

Existing Issues

No response

What happened?

One of the OPUS files I was using stopped working altogether. I found a better solution to what we are using from the read_0 here: https://github.com/pierreroudier/opusreader, it even grabs the metadata.

Steps to reproduce

See attached data file the file should have a nice spectrum and has been tested in Opus but read_0 provides no error and the spectra is incorrect.

data <- read_0("Plastics in reflection_PET_nogold_27_A4.0")

ggplot() + aes(x = data$wavenumber, y = data$intensity)

Recommend converting to opus_read("Plastics in reflection_PET_nogold_27_A4.0") and then harvesting the spectrum out of the list information.

data <- opus_read("Plastics in reflection_PET_nogold_27_A4.0")

ggplot() + geom_line(aes(x = s$wavenumbers, y = s$spec))

We may want to grab the raw code out of the github repo and add it to our own function because the github repo seems unstable.

Expected behavior

Spectrum is an FTIR spectrum.

Attachments

[Uploading Plastics in reflection_PET_nogold_27_A4.zip…]()

Screenshots or Videos

Example spectrum with read_0 image

Example with opus_read

image

Additional Information

No response

zsteinmetz commented 2 years ago

Sounds great! But https://github.com/pierreroudier/opusreader is not on CRAN (yet), I'm afraid.

@pierreroudier, do you have any plans to submit to CRAN in the near future? Let me know if you'd like help with that.

wincowgerDEV commented 2 years ago

Maybe there is some way we can collab @pierreroudier? We are making a big push on the OpenSpecy package and could get your schema formatted as a function into the OpenSpecy package?