From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a library of spectra

Hi,

 

I need to create a library of multiple spectra together and perform spectral analysis and processing in a loop. What can be an efficient way in which the library can be generated. The spectra are available in text fromat initially with 2 columns of  Wavenumbers and Counts. There needs to be a provision for adding and removing any spectra if required.

 

Is Database connectivity only the possible solution or I can implement something easier than that..?

 

Thanks in advance...! Smiley Happy 

0 Kudos
Message 1 of 5
(2,441 Views)

Hi 555,

 

when the data is available in "text file" you can use the ReadSpreadsheetFile function to load them.

 

Depending on your requirements you don't need to use a database, it might be sufficient to put all those spectra files in one folder and scan that folder at program start…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(2,419 Views)

Hi GerdW,

 

What do you exactly mean by 'Scanning' the folder at the start..? Will that save all the spectra in LabVIEW's memmory..?

 

Can you please attach an example .vi which can scan a folder containing multiple (2) text files...?

 

Thanks a lot..!

0 Kudos
Message 3 of 5
(2,407 Views)

Hi 555,

 

to "scan" a folder means to list it's contents (ListFolder file function) and to load all files of interest into memory…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 5
(2,393 Views)

Thanks a lot, that worked fine for me...!

0 Kudos
Message 5 of 5
(2,370 Views)