03-14-2023 10:54 AM
I have a spectrum data wavelength vs intensity ranging from 600-800 nm, now i have to convert wavelength (x-axis) to wavenumber - i should get a wave number vs intensity output. I did the following code, But I see only first value is converted to wavenumber. Can anyone give me some suggestions to improve code.
Solved! Go to Solution.
03-14-2023 01:07 PM - edited 03-14-2023 01:09 PM
Hi KK,
@KK54321 wrote:
Can anyone give me some suggestions to improve code.
Use the AutoCleanup button to improve your code in the first step.
Then start to think about the algorithm you want to implement - and explain that algorithm to us so we can provide suggestions!
Right now I see:
@KK54321 wrote:
I have a spectrum data wavelength vs intensity ranging from 600-800 nm, now i have to convert wavelength (x-axis) to wavenumber - i should get a wave number vs intensity output.
Please explain the term "wavenumber"!
How do you want to convert wavelength to "wavenumber"? Which algorithm is used for that conversion?
03-14-2023 04:36 PM
Hi,
Thank you for your reply,
I created a below VI, which is now doing the following,
1. load the data from txt file (wavelength vs intensity data) and plot it in graph
2. converting the x-axis to wavenumber using Raman shift equation in formula loop
3. plotting wave number vs intensity in a graph and saving the data to a txt file. I feel this is working according to my plan. Bu I have a question - I used for loop for formula loop but i did not use any iteration and give any command to n, but it still working.
So now I need to take the FFT of a wavenumber data which i got now and multiply it with Hann window and take IFFT - to get a clean spectrum.
Any suggestions will be highly appreciated. Attached the images for the above code.
03-15-2023 01:56 AM - edited 03-15-2023 01:57 AM
Hi KK,
@KK54321 wrote:
Any suggestions will be highly appreciated. Attached the images for the above code.
As you only attach images of code I will do the same:
No FOR loop needed!
Do yourself (and us) a favor and post real code next time! We cannot edit/debug/run images with LabVIEW…
03-15-2023 12:59 PM
Hi,
Thank you for you help, I have implemented your suggestion. Now I am using this generated wave number vs intensity spectra to do the following steps,
wave number vs intensity spectrum
I
FFT
I
multiply with Hann window
I
IFFT
I
final spectrum in waveform graph
Below I attached the VI, I could not see any output spectra after IFFT. maybe I made some mistake in the code, if possible could you help me with this.; I have attacked data file (wavelength vs Intensity) also.
Thank you
KK
03-15-2023 01:06 PM
Hi KK,
please downconvert your VI to LV2021 or (even better) LV2019. (File->Save for previous)
Many long-time users of LabVIEW didn't upgrade to LV2022/LV2023 yet due to subscription license issues…
(Did you notice my signature line?)
03-15-2023 01:14 PM
Hi GerdW,
Please see the attached down converted VI. please let me know if this is working or any modifications are needed.
Thank you
KK
03-15-2023 01:40 PM
Hi KK,
@KK54321 wrote:
Please see the attached down converted VI. please let me know if this is working or any modifications are needed.
Now I'm missing your datafile…
Why do you need that sequence structure?
Why do you use those PtByPt-FFT functions? Do you know what PtByPt-functions are good for?
03-15-2023 01:49 PM
Hi GerdW,
Please find the attached data file.first column is wavelength and second column is intensity.
Why do you need that sequence structure?
Why do you use those PtByPt-FFT functions? Do you know what PtByPt-functions are good for?
sorry about that, I am new to Labview, so using google and following previous Labview projects I made this code. Your suggestions are really help full.
Thank you
KK
03-16-2023 01:59 AM - edited 03-16-2023 01:59 AM