[Kst] kst HPIC datasource
Theodore Kisner
kisner at physics.ucsb.edu
Tue Jun 7 03:14:56 CEST 2005
Hello Everyone,
I'm starting to work on integrating support for displaying healpix pixelized
maps in kst. As my previous email suggests, this currently requires defining
"yet another kind of plot object" which is analogous to Curves or Images and
which Kst2DPlot will keep a list of. Of course, a future refactoring may
make this process more generalized...
Regardless of future work on the actual plotting, I can at least implement a
datasource for reading healpix-format files.
Background
-----------
Healpix is a method of pixelizing the sphere such that all the pixels have
equal area and lie on iso-latitude rings. It is often used in CMB research
to represent maps of the sky. These maps are stored in FITS files in a very
specific format.
HPIC
-----
HPIC is my GPL'd implementation of the healpix algorithm. It is a C library
that allows the user to read/write/test healpix FITS files, project the
spherical data onto a rectangular grid (for display purposes), and perform
other simple operations. The latest version (0.49) is available here:
http://cmb.phys.cwru.edu/hpic/
There are 2 scenarios I can think of where kst might be used with HPIC. The
first is to display static map data contained in a FITS file. The second is
to do real-time "binning" of map data as it is being acquired. I will only be
addressing the first case initially. I imagine the second case could be
handled by a plugin that reads vectors representing DATA / RA / DEC / polar
angle and outputs a map vector.
Patches
--------
Attached you will find a patch set that should apply (in order) to HEAD. Here
is a brief description of each patch:
1: Lays out the skeleton datasource directory. Adds configure checks for
hpic library.
2: Couple of overlooked lines in configure.in.in/Makefile.am. Datasource can
now detect supported files. readField doesn't return anything yet. Note
that the function "understands_hpic" currently returns a value of 100 for
supported files. This is necessary because the LFIIO datasource is greedy and
claims to support *all* valid FITS files with a weight of 99.
3: Datasource now reads the names / units from the file and uses them for the
field names. If the table columns have no names, it uses a default string.
4: The _metaData Qmap now contains map information (NSIDE, ordering, etc), as
well as any optional keywords found in the FITS file. Eventually, my hope is
to access this metadata from a "plotsource" that inherits from KstDataObject.
I think this is possible, since I can dereference (approximately):
KstDataObject->KstVectorMap->KstRVector->provider->metadata
readField now returns a full-sphere map vector. I think the HPIC datasource
is almost functionally complete! Now to move on to plotting ;-)
cheers,
-Ted
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch_kst_hpic.tar.gz
Type: application/x-tgz
Size: 7736 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kst/attachments/20050607/e78c6113/patch_kst_hpic.tar.bin
More information about the Kst
mailing list