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

Shimadzu .spc file load in R #25

Open
chloefouilloux opened this issue Aug 8, 2022 · 5 comments
Open

Shimadzu .spc file load in R #25

chloefouilloux opened this issue Aug 8, 2022 · 5 comments

Comments

@chloefouilloux
Copy link

chloefouilloux commented Aug 8, 2022

Hello,

If you have any time to spare I would be very grateful to receive some guidance with respect to how to load Shimadzu-type .spc files into R. I am new to this community (both coding and spectrophotometry) and any help would be very appreciated!

After reading some of the documentation on GitHub, I have added the "hyperSpec" package to include both :

repos <- c("https://r-hyperspec.github.io/pkg-repo/", getOption("repos"))
install.packages("hySpc.read.txt", repos = repos)
install.packages("hySpc.read.spc", repos = repos)

After loading these new libraries, I've tried to read in a .spc file

hySpc.read.spc::read_spc("EXAMPLE.spc")
Error in .spc_file_hdr(f) : Support for Shimadzu SPC file format (OLE CF) is not yet implemented

I have also tried the txt version

hySpc.read.txt::read_txt_Shimadzu("EXAMPLE.spc")
Error in pos4Li[[i]] <- pos4[tmp] : attempt to select less than one element in integerOneIndex

I have attached an example of the .spc file that I hope to read into R. The overall functionality of hyperSpec seems really cool, so I hope that these files are compatible!

@GegznaV
Copy link
Member

GegznaV commented Aug 8, 2022

@chloefouilloux, as far as I know, Shimadzu file formats are not supported by hyperSpec (if I recall correctly, either their format decoding is kept in secret or we do not know it yet). @cbeleites, @ximeg do you have any suggestions on how to import Shimadzu files?

I have attached an example of the .spc file

@chloefouilloux, could you please reattach the file? GitHub may require to zip the file before attaching.

@GegznaV
Copy link
Member

GegznaV commented Aug 8, 2022

There is a discussion on the old repo:

@chloefouilloux
Copy link
Author

Hi again,

Thank you for your quick reply! GitHub doesn't seem to appreciate .spc files, even in zipped format. But here is another shot, I've zipped a folder with a couple of .spc file examples.

Again thank you very much for your help, it is tremendously appreciated!

GITHUB_SPEC.zip

@GegznaV
Copy link
Member

GegznaV commented Aug 9, 2022

@chloefouilloux, what is the model of your spectrometer?

@chloefouilloux
Copy link
Author

Hello, it is a Shimadzu (UV-1800)

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

No branches or pull requests

2 participants