How does API calculate the dose rates?

68 views
Skip to first unread message

Jan Helebrant

unread,
Nov 10, 2017, 5:14:46 PM11/10/17
to Safecast Device Discussions and Support
Hi,
I noticed the changes in the API some time ago including the color scale etc. Does the dose rate calculation still use this method using the CPM parameter in the LOG file:

CPM is converted to µSv/h on a per-device basis.
  • For bGeigies, the conversion is CPM/350.0

We had this measurement:

ader_microsvh time_local device device_id date_time cpm pulses5s pulses_total
0,0828571441 16:05:05 $BNRDD 2847 2017-09-26T14:05:05Z 29 2 266
0,0771428583 16:05:10 $BNRDD 2847 2017-09-26T14:05:10Z 27 1 267
0,0685714296 16:05:14 $BNRDD 2847 2017-09-26T14:05:14Z 24 0 267
0,0685714296 16:05:19 $BNRDD 2847 2017-09-26T14:05:19Z 24 2 269
0,342857148 16:05:24 $BNRDD 2847 2017-09-26T14:05:24Z 120 98 367
0,3457142909 16:05:30 $BNRDD 2847 2017-09-26T14:05:30Z 121 5 372
0,342857148 16:05:35 $BNRDD 2847 2017-09-26T14:05:35Z 120 1 373
0,3485714338 16:05:40 $BNRDD 2847 2017-09-26T14:05:40Z 122 3 376
0,342857148 16:05:45 $BNRDD 2847 2017-09-26T14:05:45Z 120 2 378
0,3457142909 16:05:50 $BNRDD 2847 2017-09-26T14:05:50Z 121 3 381
0,3457142909 16:05:55 $BNRDD 2847 2017-09-26T14:05:55Z 121 2 383
0,3485714338 16:06:00 $BNRDD 2847 2017-09-26T14:06:00Z 122 3 386
0,3600000054 16:06:05 $BNRDD 2847 2017-09-26T14:06:05Z 126 6 392
0,3657142912 16:06:10 $BNRDD 2847 2017-09-26T14:06:10Z 128 3 395
0,3771428628 16:06:15 $BNRDD 2847 2017-09-26T14:06:15Z 132 4 399
0,3771428628 16:06:20 $BNRDD 2847 2017-09-26T14:06:20Z 132 2 401
0,1085714302 16:06:25 $BNRDD 2847 2017-09-26T14:06:25Z 38 4 405
0,1000000015 16:06:30 $BNRDD 2847 2017-09-26T14:06:30Z 35 2 407
0,1000000015 16:06:35 $BNRDD 2847 2017-09-26T14:06:35Z 35 1 408


We use the same formula to calculate the dose rate to be make the QGIS plugin as much consistent with the API as possible. 

I also uploaded this sample in a LOG format here:

If you compare the API and our table it is clearly visible that the API only has higher dose rate for the only one point (marked red in our table) and the maximal dose rate is much higher than ours (API says 3.53 microSv/h, we have 0.342 microSv/h). So am I right that you now calculate the "API CPM" from 5s pulses data? 

eg. CP5s * 12 = CPM, and then again dose rate = CPM/350

(for our maximum it would be 98 * 12 = 1176, 1176/350 = 3.36 so still differs from the API)

or is there more sophisticated approach? It would be useful to know this so we could implement this in next generation of the QGIS plugin too.

thanks

Jan

Kalin KOZHUHAROV (Safecast)

unread,
Nov 10, 2017, 5:46:48 PM11/10/17
to Jan Helebrant, Safecast Device Discussions and Support
On Fri, Nov 10, 2017 at 11:14 PM, Jan Helebrant <jan.he...@gmail.com> wrote:
>
> I noticed the changes in the API some time ago including the color scale etc. Does the dose rate calculation still use this method using the CPM parameter in the LOG file:
>
>> CPM is converted to µSv/h on a per-device basis.
>>
>> For bGeigies, the conversion is CPM/350.0
>
AFAIR, it is not 350, but 334, e.g. see
https://github.com/Safecast/safecastapi/blob/7cbf30add95b9616f0a3d13087e9f9404f78279e/script/ios_query.sql#L14

> I also uploaded this sample in a LOG format here:
> https://api.safecast.org/en-US/bgeigie_imports/32497
>
> If you compare the API and our table it is clearly visible that the API only has higher dose rate for the only one point (marked red in our table) and the maximal dose rate is much higher than ours (API says 3.53 microSv/h, we have 0.342 microSv/h). So am I right that you now calculate the "API CPM" from 5s pulses data?
>
> eg. CP5s * 12 = CPM, and then again dose rate = CPM/350
>
> (for our maximum it would be 98 * 12 = 1176, 1176/350 = 3.36 so still differs from the API)
>
And the exact code I guess is this
https://github.com/Safecast/Tilemap/blob/ca21153293c6647dc515c6798e87877d08d4b43a/bgeigie_viewer.js#L2672


> or is there more sophisticated approach? It would be useful to know this so we could implement this in next generation of the QGIS plugin too.
>
There are always more sophisticated approaches!
But probably not needed. May be think of a more elegant approach?

Cheers,
Kalin.

Richard Wood

unread,
Nov 11, 2017, 12:10:09 AM11/11/17
to Safecast Device Discussions and Support
The below is copied from my bGeiges safecast.txt file, if I understand correctly these are the display setup and other parameters.  Seems my Cs137 to Sv number from KitHub was set at 334.  I avoid relative dose measurements focusing on counts, we just don't know what isotope the meter is measuring.

nm=Safecast
did=3023
gt=0
gm=0
cpmf=334
cpmn=Cs137
bqmf=37
bqmn=Cs137
al=150
tz=-8
cn=US
st=0
ss=0
sh=100
sm=0
cw=60

Jan Helebrant

unread,
Nov 11, 2017, 8:41:08 AM11/11/17
to Kalin KOZHUHAROV (Safecast), Safecast Device Discussions and Support
dear Kalin,
thanks for your reply.

> AFAIR, it is not 350, but 334

In fact we use 334 as I found in our documentation later. However if you
look in this table:

https://docs.google.com/spreadsheets/d/1BDWza6TrPZszwqCfnZtBj9tOEhFmyGAWhoU0bYM_BJ8/edit?usp=sharing

I made for this example you see that if you use CPM from the LOG file to
calculate the dose rate you have some "fade out" effect (the higher dose
rates continue some points althought the CP5s values are low) although
there is only one elevated point. The API now does not have this effect
so it looks like CP5s is used to calculate the CPM and then the dose
rate and LOG CPM is used only if the CP5s is zero. The conversion
coefficient seems to be still the same - 0.0029940119760479.

Jan


Dne 10.11.2017 v 23:46 Kalin KOZHUHAROV (Safecast) napsal(a):

Jan Helebrant

unread,
Nov 13, 2017, 6:49:19 PM11/13/17
to Safecast Device Discussions and Support
OK,
I did some tests with randomly selected data points in two LOG files and it looks like the dose rate for the API is now using CPM calculated from the CP5s values.

Fukushima data examples
uploaded2015-03-25
All taken from API:
LOG dataAPI calculated
calculation check
calculation from LOG CPM
CP5sCPMCPM
dose rate microSv/h
CPM from CP5sdose rate microSv/h
dose rate microSv/h
566046732,01672,002,01201,8084
93157211183,351116,003,34134,7066
10841200,36120,000,35930,2515
112271320,40132,000,39520,6796
765840,2584,000,25150,1946
617807332,19732,002,19162,3353
7135527869626,048556,0025,616816,5479
7875992961528,799444,0028,275417,9401
5947098722521,637128,0021,341321,2515
1711362040,61204,000,61083,4012
7753455946628,349300,0027,844310,3443
127445381574147,1315288,0045,772513,5868
CPM from CP5s = CP5s * 12
dose rate = CPM * 0,0029940119760479
Damětice data examples
uploaded2017-10-22
All taken from API:
LOG dataAPI calculated
calculation check
calculation from LOG CPM
CP5sCPMCPM
dose rate microSv/h
CPM from CP5sdose rate microSv/h
dose rate microSv/h
3294360,1136,000,10780,8802
112631320,40132,000,39520,7874
324443841,15384,001,14971,3293
606047212,16720,002,15571,8084
827579862,95984,002,94612,2665
677948052,41804,002,40722,3772
355164201,26420,001,25751,5449
405154801,44480,001,43711,5419
12971440,43144,000,43110,2904
895960,2996,000,28740,2844
795840,2584,000,25150,2844
9931080,32108,000,32340,2784
CPM from CP5s = CP5s * 12
dose rate = CPM * 0,0029940119760479

whole spreadsheet:

in my other LOG file:

there are also points with CP5s = 0 and in that case "LOG CPM" is used for dose rate calculation. I has to be also somewhere in the API code but I am not programmer. I hope next generation of QGIS plugin will use this approach too.

Jan
Reply all
Reply to author
Forward
0 new messages