https://www.euro-online.org/enog/inoc2007/Papers/mac-slots.html https://www.euro-online.org/enog/inoc2007/Papers/m https://www.euro-online.org/enog/inoc2007/Papers/mac-slots.html

IASIM 2018 Advertisement

Transfer NSAS files

Chiapo's picture
Forums: 

Dear all,

my name is Chiapello Nicolò, I'm a student who is working about spectrometry and NIR. I'm using the softwares Vision (developed by FOSS) and Matlab (developed by MathWorks). I found some troubles when I tried to transfer data from the first to the second. Someone knows the easier way to export data from Vision to Matlab?

During my attempts I saw that is possible to export data in two different formats: ASCII and NSAS. First one is universal, so easier to use, but its level of precision is not enough to keep all the decimal places of the collected data. The second one creates two files with different format: .da and .cn.

Matlab is not able to manage these formats, hence I ask to you: how could I transfer NSAS files form Vision to Matlab?
 

Thank you in advance,

Chiapello Nicolò

rogerjm's picture

Hello Chiapello,

are you sure that all your decimals are useful? A resolution of 1/10000 is generally enough for absorbance NIR spectra... so that the ascii export should work.

good luck

Jean-Michel

 

JM Roger
Irstea, Montpellier France

hlmark's picture

Instead of trying to transfer the data in one step, try using an intermediate file format, such as JCAMP-DX. I'm pretty sure Vision can export JCAMP-DX files, and if you can't find an existing JCAMP reader it wouldn't be too difficult to write a MATLAB script or program to read it in. In fact, I think there is code for some sample readers, including for MATLAB, on the official JCAMP-DX website.

Howard

\o/

/_\

 

Chiapo's picture

Hi,
thank you for the answer, but unfortunatelly Vision can only export files in ASCII, NSAS end MVACDF formats.
It can import files in JCAMP format, but not export these ones, I don't know why.

td's picture

Hi,Chiapello,

Welcome to the group.

My solution is Unscrambler. It will read NSAS files and export MATLAB. Do you have many files to transfer?

Best wishes,

 

Tony

 

 

khaled's picture

Hi Chiapello,

Do you have WINISI II software? it also from FOSS.

In WINISI software, you can export file to many format, including the JCAMP.

Best regards,

Khaled Sungkar

Sus's picture

Hello Chiapello:

Using Vision one can also extract data in excel form (Select the name of the product in the vision project and right click on the name. Click on "Spectra"; this will open a window from where you can export data to excel. Export data to excel giving it the name you want). Then you can create a function or just a run file where you call this excel file and using the command xlsread you can convert data to maltab. You will have to be careful with assigning the correct excel columns to the matlab matrix columns.

I hope this helps,

KR

Susana Cruz

Chiapo's picture

At first I want to thanks everybody for the replies, you're really kind and helpful.

Susana, thank you so much because your advices are exactly what I need. It's incredible because exporting data in this way there are more decimal numbers than in Vision.

 

Thank you all

hlmark's picture

Chiapello - don't rely on those extra digits. At the very least they are spurious. Using more digits than exist on the original data is equivalent to making up data out of thin air!

Howard

\o/

/_\

 

 

Sus's picture

I agree with Howard :)

It's my pleasure to help!!!

dwhopkins's picture

Hi Chiapello,

I agree with Howard and Sus, and just add that those extra digits are likely ...999999... due to a strange feature of Excel, akin to a rounding error.  Don't worry about it, your calculations will be fine.  I'd estimate you can use about 5 or 6 digits in your B-vectors, corresponding to how many significant digits you have in your original data from the 6500, and the noise level in your spectra.  The best procedure is to use all the available figures, and only round the final results, which will be good to only 3 or less significant figures, which you can determine from the repeatability of the NIR readings.

Best wishes,

Dave