Closed peterdesmet closed 7 years ago
These values encode the data values, so the quantity value equals offset+gain*(data value)
.
It's a requirement by the ODIM format to use such encoding, but I currently do not use it, i.e. I use offset=0 and gain=1 for all quantity fields. My suggestion would be to use the offset and gain attributes to decode the field value according to the formula above, and only store the decoded value in the database, not the offset and gain attributes themselves.
NB We recently found out that we cannot use NaN
values, so both nodata and undetect will be a numeric value.
Ok, so if I understand correctly:
dens
of 59.260143
you actually have to do offset + gain * 59.260143
. As there is no need to keep offset
and gain
separately, we can actually do this calculation when writing data to the database, no longer keeping offset
and gain
, but only the "new" value?0.0
and all gain is 1.0
, leaving the original value unchanged. But, it's better to use the calculation anyway, in case those values do get updated?dens
, you would change it for all radars and dens
measurements? Anyway, this answer doesn't really affect anything if we run all data through the calcuation anyway.Pending your answer, I assume gain
and offset
can be combined in value, but what regarding nodata
and nodetect
?
radar1 time1
has dens_nodata = a
and dens_nodetect = b
(i.e. for every variable)radar1 time1
has nodata = a
and nodetect = b
(i.e. for every file)offset
and gain
and decode it before storing in dbregarding nodata
and undetect
, yes both these values should be kept. But it doesn't matter which bit-values you decide to reserve for these two, as long as they are distinguishable. So if (in theory) different source files have different nodata
and undetect
codings, you can map them to the same respective bit-values that you reserved for these two cases in the db. So in the whole db only one nodata
and one undetect
value is needed that can be used for all fields, radars and times.
Great, so nodata
and undetect
applies to the whole database.
We decided not to develop a data model and database for bird profile data, since there was no strong use case to do so, but rather extend the bioRad package to download and load bird profiles directly from the data repository on S3. Closing this issue.
Hi @adokter, in your specification you mention:
Which is about these attributes:
Questions:
I'm asking to know if and how we should store these in the database.