Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pyranometer irradiance adjustment is flawed #60

Closed
csatt opened this issue May 18, 2019 · 0 comments
Closed

Pyranometer irradiance adjustment is flawed #60

csatt opened this issue May 18, 2019 · 0 comments
Assignees
Labels

Comments

@csatt
Copy link
Owner

csatt commented May 18, 2019

The current code has a hardcoded "adjustment" for an empirically observed error in the photodiode sensitivity where it reads slightly low at higher irradiances and slightly high at lower irradiances. This adjustment is flawed. The adjustment was much too large at very low irradiances.

A better way to deal with this phenomenon is to make the scaling polynomial rather than linear.

It also should not be hardcoded. The user should have the ability to tune the scaling including making it linear without any adjustment for this phenomenon.

@csatt csatt added the bug label May 18, 2019
@csatt csatt self-assigned this May 18, 2019
csatt added a commit that referenced this issue May 18, 2019
Replace the hardcoded irradiance adjustment with a configurable polynomial calibration.

Polynomial curve: y = Ax2 + Bx
  x: temperature-scaled photodiode millivolts
 A: PYRANO_CAL_A (W/m2/mV2)
 B: PYRANO_CAL (W/m2/mV)
 y: irradiance
If A is 0, scaling is linear. Intercept is always zero.

The default value for PYRANO_CAL_A is 0.0, so the scaling is linear. The GUI doesn't support setting PYRANO_CAL_A in the calibration dialog, so the only way to change its value is by manually editting the config file. The GUI calibration dialog is the same as before, but the code does take into account non-zero values of PYRANO_CAL_A such that when the user enters the measured irradiance, that will be the irradiance after the calibration.

This change also adds the photodiode temperature coefficent to the config file, so the user can change it. This is also not supported by the pyranometer calibration dialog, so it needs to be done by manually editting the config file. The default value for this coefficient was changed from 0.124 to 0.16.
@csatt csatt closed this as completed May 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant