[Kst] any advice on datasource access to current plot range?

Ted Kisner tskisner.public at gmail.com
Mon Nov 7 03:05:10 CET 2005


For the healpix datasource, I've been thinking it would be nice to have the 
ability to easily "update matrix using current plot range".  In an ideal 
world, the matrix would be reprojected on every zoom.  This is a bit slow, 
but a good compromise is to have a button on the datasource config widget 
that says "set to current plot range".  This would require the datasource to 
query the current min/max values of its associated Kst2DPlot.

I'm fuzzy on the details of how to do this properly...  Do I need to get the 
global list of KstObjects and search through it until I find a Kst2DPlot 
object that contains the proper KstImage and data file?  Is there a better 
way?  What if multiple plots with different ranges are displaying the same 
matrix?

The reason that this kind of action is clunky (and perhaps impossible to 
implement) goes back to our limited types of basecurves.  We are "forcing" a 
healpix map (which is naturally expressed as a *vector* of pixel values) into 
an intermediate data product (KstMatrix).  

Eventually, in the future, I still think it might make more sense to have a 
separate basecurve that does a readField from the datasource to obtain a 
full-sphere vector of pixel values, and then projects this information 
directly onto the buffer upon each paint.  This type of direct projection 
from pixel vector --> buffer actually *is* fast enough to do on each zoom, 
and feels/looks *much* better for the user.

In the mean time, any suggestions for temporarily hacking in this kind of 
support are welcome...

cheers,

-Ted



More information about the Kst mailing list