[Kst] extragear/graphics/kst/src/datasources/wmap

Andrew Walker arwalker at sumusltd.com
Sat Feb 17 02:17:26 CET 2007


SVN commit 634368 by arwalker:

add table number and row number to metadata to make it comprehensible

 M  +7 -1      wmap.cpp  


--- trunk/extragear/graphics/kst/src/datasources/wmap/wmap.cpp #634367:634368
@@ -149,20 +149,26 @@
   iResult = fits_get_hdrspace( ffits, &keysexist, &morekeys, &iStatus );
   if( iResult == 0 )
   {
+    QString strKey;
     QString strTable;
     KstObjectTag tableTag( strTable, tag( ) );
     char keyname[FLEN_KEYWORD];
     char value[FLEN_VALUE];
     char comment[FLEN_COMMENT];
     int keynum;
+    int hdu;
 
+    fits_get_hdu_num( ffits, &hdu );
+
     for( keynum=1; keynum<=keysexist; ++keynum )
     {
       iResult = fits_read_keyn( ffits, keynum, keyname, value, comment, &iStatus );
       if( iResult == 0 )
       {
+        strKey.sprintf("%02d_%03d %s", hdu, keynum, keyname);
+
         KstString *metaString;
-        KstObjectTag newTag( keyname, tag( ) );
+        KstObjectTag newTag( strKey, tag( ) );
 
         str.sprintf( "%s %s", value, comment );
         metaString = new KstString( newTag, this, str );


More information about the Kst mailing list