Open cchwala opened 1 month ago
But... maybe the lower-level code, e.g. using calc_sparse_intersect_weights_for_several_cmls
, is short enough so that we do not save much. We could have the basic merging class allow to have point and line data as input and then calculate according to what was passed in during init.
The current calc_sparse_intersect_weights_for_several_cmls requires line data, but one workaround is to represent points using lines shorter than the grid size. This only works reliable when point_a is at the midpoint of the grid, and not at the edges, as then direction could play a role.
We introduced
GridAtLines
andGridAtPoints
inpoligrain
to have one common interface for merging CMLs and gauges. We should use this inmergeplg
.Since the contribution of @eoydvin in #3 only uses CMLs for merging, this topic might just not have come up yet, but we should keep that in mind. This also applies to my implementation in #6, but since I still used DataFrames for representing sensor (gauge and CML) data there, that would require a lot of rewritting...
The general idea is to have the calculation of the differences between radar and the "adjustment sensors" (gauge and CML) interchangeably so that the other adjustment code that follows these initial calculations does not have to be written separately for each sensor.