achim1 / muonic

A python gui for QNet DAQ card experiments
http://achim1.github.io/muonic/
1 stars 9 forks source link

daq time does not start with "start run" when starting for the first time #53

Closed aschulzdesy closed 9 years ago

aschulzdesy commented 9 years ago

In version 2.0.11 we have an issue which was not there in version 2.0.2 (I think)

If Muonic is started for the first time and "start run" is clicked it happens often that the time shown is 100s or more, not 5 s as expected. I think it is the time where the daq card was started and not the run.

When stopping the run and restarting it is fine again.

hpbretz commented 9 years ago

The time you mean is daq time, right?

aschulzdesy commented 9 years ago

yes, I mean the daq time.

hpbretz commented 9 years ago

It is currently the time between the initiation of the rate widget and the point when you click on Start, which makes no sense. I'll fix it so that it counts from the time when you start the meausurement.

hpbretz commented 9 years ago

I have to correct myself here: Muonic starts counting muons from the moment it is started. If I force the first time bin to be about 5s (i.e. to start measuring time only from the moment you click on start), the first bin will be wrong and show a higher rate. I would have to change the way muonic communicates with the daq to correct that.

The values shown in the rate plot are maybe not exactly what you would expect (measurement from the start of muonic, not the click on the start button), but they are consistent and correct.

Should this still be changed?

aschulzdesy commented 9 years ago

What I mean is (I think) related to the "max rate" issue. It was fine before, should be not more than 10 commits (confirmed by Achim).
Whether the first bin actually has 5 s or not does not matter much I think. But the problem is that a high value of e.g. 10000 in rate changes the mean drastically which is not wanted.

aschulzdesy commented 9 years ago

an example is here: bildschirmfoto vom 2015-07-21 10_32_16

hpbretz commented 9 years ago

Are there any steps to reproduce this? I was testing this issue, and found the opposite. Muonic is initiated with a total count of zero muons, while the daq keeps counting them. So the first Bin has sometimes too many muons and a high rate.

aschulzdesy commented 9 years ago

i just started another run and there it is the case with too many: bildschirmfoto vom 2015-07-21 10_48_21

aschulzdesy commented 9 years ago

I tested it with starting and stopping runs and restarting and it looks fine now

hpbretz commented 9 years ago

Then fixed in https://github.com/achim1/muonic/commit/f55fae0365b7774fd09ddfe281a927785f195cdc