11-05-2020 02:26 AM
Hello!
A bit of background:
There are two spectrometers (visible and infrared) and two lasers. I made the following logic of their work - the laser turns on, irradiates the sample (phosphor), the laser is turned off, and the spectrometer is turned on immediately to collect the luminescence "tail" (without the laser peak in the spectrum). With this operation, the signal from the phosphor is weak. The signal to noise ratio is not very good.
To reduce noise, you need to average the data. In theory, this should help. In this case, it is necessary to carry out many measurements (10, 20, 50, 100, etc.), sum them up and divide by the number of measurements.
Problems:
1) My idea of averaging doesn't work;
2) The time of one measurement is about 10 ms - will the labview be able to record, summarize and divide the data?
I would be grateful for any help. Thank you very much.
11-05-2020 04:20 AM - edited 11-05-2020 04:20 AM
There is too little of the program in the snippet to see what the problem is. If You can, please attach the complete VI.
@Fizikaman wrote:
Problems:
1) My idea of averaging doesn't work;
2) The time of one measurement is about 10 ms - will the labview be able to record, summarize and divide the data?
11-05-2020 05:23 AM
I think I can give you all the vi. There is no secrecy here. But I removed this piece of code so that it doesn't interfere with the work.
The whole program is big enough - do you really want to understand all this?
11-05-2020 05:54 AM
Perhaps you can give advice about this:
11-05-2020 07:01 AM
I cannot open Your VI, but maybe someone else can take a look at it. Have You tried my suggestion above?
11-05-2020 07:05 AM - edited 11-05-2020 07:06 AM
This vi is from version 18. What version do you have?
No, I haven't tried it yet.
11-09-2020 04:21 AM
Hey.
I seem to have managed to do it - everything is connected and everything is summed up and divided by the number of cycles.
I decided to check and turned off the Y division (according to the idea, the signal should just be the sum of 10 cycles) I noticed that Y is the last array multiplied by 10, and not the sum of 10 cycles (you can see it on probe # 37 and 38).
It should be like this - the sum of the arrays from all the cycles is divided by the number of cycles. And it turns out like this - the array from the last cycle is multiplied by the number of cycles and divided by it.
I can't understand why this is happening.
11-09-2020 05:00 AM
Hello!
I have LabVIEW 16, but I do not know if I will have the time to troubleshoot Your code. Maybe this code can give You some hints?
Also, give this article a short try: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019M3dSAE&l=de-AT
From the GUI screenshot, it seems that You want to continuously take a rolling average. If this is true, then You need to tap into the shift register where You accumulate the spectra. I did a quick forum and internet search for these terms. Try "Rolling average over 2d Array". I do not know Your specification, but there should be a lot of material to help You.
Also from the screenshot, it seems that there is a lot of problematic code. I seems that You are not only taking the average over the intensity values, but also over the wavenumbers. This is probably not at all what You want. I would recommend starting over: Read a few spectra from the spectrometer and save them into an array constant, as I did in the example above. Evaluate these data by hand, for example in a spreadsheet program. Then try to replicate that in LabVIEW and see if the result matches. This may seem like a tedious way to do it, but when it works You will be certain that it is correct.
Best regards,
11-23-2020 06:47 AM
I made the averaging mode - take 10 measurements (for example), add all the arrays and divide them by the number of measurements (see the attached picture). Everything seems to work, but I'm not entirely sure.
To test this, I need to collect all 10 arrays and save them. And then fold and divide them myrself.
The problem is that I cannot save all the arrays, only the last one is written. Maybe someone did something similar?
11-23-2020 07:13 AM
Get rid of the inner loops and anchor the shift registers on the outer loop. Learn about dataflow.
If you want more specific help, attach your VI. We cannot debug pictures.