/// <summary> Update the header to reflect information about a given column. /// This routine tries to ensure that the Header is organized by column.</summary> internal void PointToColumn(int col, Header hdr) { Cursor c = hdr.GetCursor(); if(col > 0) { hdr.PositionAfterIndex("TFORM", col); } FillForColumn(hdr, col, c); }
/// <summary> Update a FITS header to reflect the current state of the data.</summary> internal override void FillHeader(Header h) { try { h.Xtension = "BINTABLE"; h.Bitpix = 8; h.Naxes = 2; h.SetNaxis(1, rowLen); h.SetNaxis(2, nRow); h.AddValue("PCOUNT", heap.Size, null); h.AddValue("GCOUNT", 1, null); Cursor c = h.GetCursor(); c.Key = "GCOUNT"; c.MoveNext(); c.Add("TFIELDS", new HeaderCard("TFIELDS", modelRow.Length, null)); for(int i = 0; i < modelRow.Length; i += 1) { if(i > 0) { h.PositionAfterIndex("TFORM", i); } FillForColumn(h, i, c); } } catch(HeaderCardException) { Console.Error.WriteLine("Impossible exception"); } }