Exemplo n.º 1
0
        /// .99.1 changes
        /// <summary>
        /// This is called after we delete columns.  The HDU
        /// doesn't know how to update the TBCOL entries.
        /// </summary>
        public virtual void UpdateAfterDelete(int oldNCol, Header hdr)
        {
            int offset = 0;
            for (int i=0; i<nFields; i += 1)
            {
                offsets[i] = offset;

                // .99.2 changes:
                // Fixed offsets in columns after column was deleted.
                // hdr.AddValue("TBCOL"+(i+1), offset, " Column offset ")
                hdr.AddValue("TBCOL"+(i+1), offset+1, " Column offset ");

                offset += lengths[i] + 1;
            }
            for (int i=nFields; i<oldNCol; i += 1)
            {
                hdr.DeleteKey("TBCOL"+(i+1));
            }

            hdr.AddValue("NAXIS1", rowLen, "Size of row in bytes");
        }