I managed to get the data into grafana as intended. My solution is the following:
I am using a php server and the infinity data source.
grafana passes the dashboard parameters to the php page which calls the database instead of doing it directly in grafana.
The returned data (one set of parameters per line) is passed to gnuplot for parameter fitting. But any tool can be used here that is accessible from the php server.
The result is formatted as csv on the resulting webpage that is then loaded by grafana.
Depending on the amount of data, complexity of the calculations and CPU power of the server, it can be necessary to extend the timeout for the infinity data source.
This results in a curve lining up with the original colour data (see figure below for some sample data): In the upper plot, the brightness measurements (as pulses per time) are shown for a sensor without filter as well as red, green and blue colour filters.
These values are used to calculate the colour temperature in the lower plot. The uncertainty from the fit is shown as error band around the data points.
Translation for the German labels:
- “Helligkeit” → “brightness”
- “Farbübergang” → colour transition
- “Farb-Temperatur” → colour temperature
- “ohne Filter” → without filter
- “rot/grün/blau” → red/green/blue
