Closed thinrope closed 10 years ago
I'm not sure I fully understand what the maximal integration window is. I was assuming it was intended to be a calculation from all pulses between the "log interval"s. So if the log interval was set to 10mins it would be based on 10mins of pulses, is this correct?
If that's correct then it wont work because the Geiger counter HV board (and CPU) is only "on" for 30seconds during that 10min period. But I may well have misunderstood.
Well, when the board sleeps, my patch doesn't run, so what happens is that it runs only in the last 30s and it logs 30s as interval (last column) and number of counts in that interval. Dividing those two numbers (*60) is almost always more than the calculated CPM from the original firmware (column 2). This is represented by the green between the points. I expect there is either something funny going on while the HVPS is "booting" or the "integration window" is doing some magic (I still cannot fully understand how it works).
If used in the normal mode (not shown on the graph) there is also over-reporting, so statistically those probably cancel out and problem is only in sleep mode log.
I am now testing in background level, then will put a more active source and see if it makes a difference (does the offset depend on CPM).
There are a couple of issues that could effect this I think. Firstly I think you're using the interval start time as logged by the controller in m_interval_start? That value in set in the Controller constructor which is called in main after initialising the Geiger counter, and after a 10000us delay. So the geiger total_count will actually be for >10000us more that m_interval_stored-current_time. That shouldn't be a huge issue though...
is_cpm30_valid() also requires valid windows covering 30.5s this shouldn't cause an issue but might be a bug related to that which is effecting things.
I have been testing (my) latest patches in devel and I am getting a bit of strange results in sleep mode. Basically the logged CPM from the original firmware and the CPM I calculate based on no integration window (or actually maximal integration window if that is easy to grasp)... There is a visible difference that I plotted in gnuplot:
Here is part of the data:
And the image showing always underreporting as opposed to taking all counts in an interval and dividing by the interval.
Any ideas?