dhhagan / py-opc

Python wrapper for the Alphasense OPC-N2 built around py-spidev
MIT License
30 stars 26 forks source link

Histogram bin boundaries are ADC units #5

Closed dhhagan closed 8 years ago

dhhagan commented 9 years ago

The histogram bin boundaries are given in ADC units instead of size (micrometers). This should be converted! What is the relationship?

dhhagan commented 8 years ago

Alphasense has been contacted and has not yet provided an answer.

vanjamie3 commented 8 years ago

Have they provided an answer yet, or does anyone know the relationship?

I cannot figure out how to use the _calculate_bin_boundary() function at all, what exactly is the input argument? It would make most sense to me if the argument is simply the number of the bin (i.e. 0-15) but this cannot be the case. I can only get non-zero output if the argument is in the order of 1000's.

I am using the OPC-N2 for a university project to measure volcanic ash levels :) Any help much appreciated, cheers

dhhagan commented 8 years ago

HI @vanjamie3 unfortunately they have been very resistant to providing an answer on this. The current calculate_bin_boundary function is simply a placeholder; I will add a warning to it so that it is a bit more obvious until fixed. As for now, we are left with just their default boundaries which are provided in their software. I can provide those to you if you aren't able to use their software yourself. Just let me know what Firmware version you are using!

DancingQuanta commented 8 years ago

I appeared to find a lookup table between ADC values and diameter in my alphasense-supplied software. But no information on bin boundaries. I think you were looking for this lookup table?

dhhagan commented 8 years ago

Hey @vanjamie3 and @DancingQuanta : I just got back from India and will push these changes within the next 48 hours. There is now a lookup table on the new opc's (as mentioned by @DancingQuanta ) which will be incorporated.

dhhagan commented 8 years ago

Patched as part of v0.1.1