[Kst] more healpix/matrix discussion

Brisset, Nicolas Nicolas.Brisset at eurocopter.com
Tue Jun 14 09:42:33 CEST 2005


> 1.  In KstDataSource, add a virtual function that reads a 
> field as a flat-packed matrix of doubles (Z-values).  
> Something like this:
> 
> virtual int readFieldMatrix(double *z, const QString& field, 
>                             double xmin, double ymin, 
>                             double xmax, double ymax, 
>                             int nx, int ny, int srow, int nrow,
>                             int scol, int ncol);
> 
> So given a matrix of size (nx X ny) and range (xmin/ymin ... 
> xmax/ymax), this function would return a flat-packed, row 
> major sub-matrix.  The submatrix would start at (srow, scol) 
> and have size (nrow X ncol).  
I surely missed something, but why would the datasource need to know
data ranges (xmin, xmax, ymin, ymax) ? Datasources currently access data
by their frame number, i.e. extending that to matrices we should just
specify the size of the submatrix to be read (nx x ny) and the initial
point (srow, scol). Optional "skip/subsampling factors" may also be
provided to read only 1 in x/y points in row/column direction.
If ranges are not given by the datasource, computing them can be very
time-consuming. And in the case the values are not monotonic, I don't
see how that would work. I suppose there may be special cases where data
can be accessed by range, but then it can probably be put in the
datasource custom configuration dialog... or else as the last optional
arguments to this method.

Nicolas



More information about the Kst mailing list