[Kst] [Bug 123699] fails to create INDEX from .fits file binary extention

Nicolas Brisset nicolas.brisset at eurocopter.com
Mon Jun 19 15:32:29 CEST 2006


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=123699         




------- Additional Comments From nicolas.brisset eurocopter com  2006-06-19 15:32 -------
Paste the list discussion here because it is very important: first, Ted's answer:

On Friday 16 June 2006 14:22, netterfield astro utoronto ca wrote:
| The problem is significant: A fits file has no concept of frames.  But 
| kst wants to know how many frames a data source has so it knows what 
| it can ask for.  It must be that now the data source generates NF from 
| the size of the first data object in the file, so it would be expected 
| that it would also generate INDEX from the first data object in the 
| file.  Anything else, and we have bigger fish to fry (like over or under reading fields).

Isn't this is the *whole point* of specifying the desired field in the call to KstDataSource::frameCount(field)?  In general, fields within a datasource are not required to have the same frame count.  If a specific datasource wants to require that (e.g. dirfile), then fine, but it is not a general requirement.

| I suggest that for the short term, we generate INDEX and NF from the 
| first data object in the file.

why?  why can't the datasource return as many index samples as requested?  The datasource should query each "real" field to determine its length.  If we cannot support this scenario, then (in my opinion) our datasource model is fundamentally broken.  We should never use the length of the INDEX field to determine the number of samples/frames.  

The index field is just a dummy placeholder when we want to plot data vectors versus sample number.  At some level, the INDEX functionality should be built into the basecurve so we don't have to deal with it over and over again in the datasources.

| For the long term, I think we need to some how break a fits file into 
| sub-data sources each with equal sized fields as Piolib apparently does.

This is not the method I'm using in libfitstools and the fitsgeneral datasource.  I think it is better to have the fitsgeneral datasource present a fieldlist/matrixlist of all data in a given FITS file.

-Ted


More information about the Kst mailing list