r-hyperspec / hySpc.read.txt

Import ASCII formatted data into hyperSpec
https://r-hyperspec.github.io/hySpc.read.txt/
MIT License
0 stars 1 forks source link

Feature/new ascii format #3

Closed eoduniyi closed 4 years ago

eoduniyi commented 4 years ago

read.txt.Witec.TrueMatch function works to import Witec ASCII/txt files exported by Witec TrueMatch. One of the key features of this function is the ability to keep extra data from the header information via the keys_2header argument:

hy_obj <- read_txt_Witec_TrueMatch(file, "none")
> hy_obj
hyperSpec object
   2 spectra
   2 data columns
   1024 data points / spectrum
wavelength: lambda/nm [numeric] 528.2085 528.3444 ... 664.3265 
data:  (2 rows x 2 columns)
   1. spc:  [matrix, array1024] 683 681 ... 726 
   2. filename: filename [character] /Users/erickoduniyi/Documents/Projects/open-source/hyperspec/hySpc.read.Witec/tests/testthat/Witec_TrueMatch.txt /Users/erickoduniyi/Documents/Projects/open-source/hyperspec/hySpc.read.Witec/tests/testthat/Witec_TrueMatch.txt

hy_obj <- read_txt_Witec_TrueMatch(file, keys_2header = c("Title", "RamanSignal", "FluorescenceSignal"))
> hy_obj
hyperSpec object
   2 spectra
   5 data columns
   1024 data points / spectrum
wavelength: lambda/nm [numeric] 528.2085 528.3444 ... 664.3265 
data:  (2 rows x 5 columns)
   1. spc:  [matrix, array1024] 683 681 ... 726 
   2. Title:  [character] Particle 916 Particle 916 
   3. RamanSignal:  [numeric] 0.4444895 0.4444895 
   4. FluorescenceSignal:  [numeric] 191.4181 191.4181 
   5. filename: filename [character] /Users/erickoduniyi/Documents/Projects/open-source/hyperspec/hySpc.read.Witec/tests/testthat/Witec_TrueMatch.txt /Users/erickoduniyi/Documents/Projects/open-source/hyperspec/hySpc.read.Witec/tests/testthat/Witec_TrueMatch.txt
eoduniyi commented 4 years ago

Hmm not sure why it's failing on R: oldrel...RStudio says I don't have any warnings: ...test all pass fine too

Screen Shot 2020-07-09 at 10 36 23 AM
bryanhanson commented 4 years ago

The fail on old release might be something on their end. Can you re-submit (maybe just that one if you can control) and see what happens?