04-04-2014 01:18 PM
Hello,
I have written a program which measures the arrival times of photons from a photodiode.
For this purpose, a producer-consumer structure has been created, but now I have a problem in the evaluation.
I would like to create a histogram, which at certain time intervals measure the photons and represents the number of photons in a beam then the appropriate size in a continuous chart.
From the producer loop, the data are in this form:
0 0.00200564
1 0.00600105
2 0.00894052
3 0.00937381
4 0.0118768
5 0.0125672
6 0.0188067
7 0.0195961
8 0.0270676
9 0.0297043
10 0.0305529
The photon number with the corresponding detection time. How can I create a continuously moving histogram that to me is the number of photons within an interval x?
In the attachment is the photon.vi
04-04-2014 01:43 PM
I do not understand what you want. For the data in your VI or for the data in your post, what do you expect the histogram to be?
The histogram VI looks at the amplitude of the elements in the input array. You seem to be accumulating a number, but it is not an integer so it cannot be the photon count. Is it the photocurrent? If you want intervals and a histogram, it seems you would not be accumulating the sum.
Lynn
04-04-2014 05:20 PM
In the Producer-Loop the DAQ-Assistant passes on the data of the diode, which consists of time intervals between two photons. These data go into an integral where they are summed, so that a "measurement time" is created with the information on when each photon has arrived.
E.g.:
The Data from the DAQ-Assistant:
0 0.00547058 1 0.0173921 2 0.00982199 3 0.0153614 4 0.000336637 5 0.00874105 6 0.00462859
After the Integration:
0 0.00547058 1 0.02286218 2 0.03268417 3 0.04804557 4 0.0483822 5 0.05712325 6 0.06175184 ....
This data represents the measuring time by the number of detected photons and the time of detection.
In the consumer loop, a histogram is created so far over a fixed number of bins.
Now I want one more histogram, which runs along continuously with time, and in which each bin is supposed to represent a period of time.
E.g.:
0 0.00200564 1 0.00600105 2 0.00894052 3 0.00937381 4 0.0118768 5 0.0125672 6 0.0188067 7 0.0195961 8 0.0270676 9 0.0297043 10 0.0305529
represent the first 10 photons. And in die continously histogram should be for example every bin represent 10ms.
Thus the first bin counts 4, the second also 4, but the third only two counts high.
0 0.00200564 1 0.00600105 2 0.00894052 3 0.00937381
4 0.0118768 5 0.0125672 6 0.0188067 7 0.0195961
8 0.0270676 9 0.0297043
10 0.0305529
04-06-2014 02:25 PM
Here is a method to calculate what I think you want.
The algorithim is shown on the block diagram. Basically it compares the accumulated time with the upper edge of the next time bin and counts or resets according to the result.
Lynn
04-07-2014 03:00 AM - edited 04-07-2014 03:01 AM
Hello Johnsold,
thank you for your effort! That is what I wanted.
I had hoped to be able to continue working with this approach, but it does not work really.
I wanted to use this feature twice in the program.
Once as it is currently used and once as a preprocessing for the autocorrelation.
I want to make each full second a autocorrelation over 10,000 bins, then a next autocorrelation over the next second measurement without using the first second and then at the end a averange of all autocorrelations.
04-11-2014 08:35 AM
In recent days, I have continued to work on my problem. But unfortunately I still have problems with it.
Here is a screenshot of the block diagram:
At point 1 I want to create a histogram with 10,000 bins per second.
At point 2 then every second to be recorded in an array with 10,000 elements.
At point 3 each array with data of one second measurement should now autocorrelated.
Between 3 + 5 I still have a problem. Here the values of the autocorrelation of each second measuring data should be added,
so they get at point 5 divide by the number of seconds. Thus, at the end an averaged autocorrelation is created.
Can someone help me again?