/// <summary>Create an HDU from the given Data.</summary> /// <param name="datum">The data to be described in this HDU.</param> public static BasicHDU MakeHDU(Data datum) { Header hdr = new Header(); datum.FillHeader(hdr); return(FitsFactory.HDUFactory(hdr, datum)); }
/// <summary>Read the next HDU on the default input stream.</summary> /// <returns>The HDU read, or null if an EOF was detected. /// Note that null is only returned when the EOF is detected immediately /// at the beginning of reading the HDU.</returns> public virtual BasicHDU ReadHDU() { if (dataStr == null || atEOF) { return(null); } Header hdr = Header.ReadHeader(dataStr); if (hdr == null) { atEOF = true; return(null); } Data datum = hdr.MakeData(); datum.Read(dataStr); BasicHDU nextHDU = FitsFactory.HDUFactory(hdr, datum); hduList.Add(nextHDU); return(nextHDU); }
/// <summary>Create an HDU from the given data kernel.</summary> /// <param name="o">The data to be described in this HDU.</param> public static BasicHDU MakeHDU(System.Object o) { return(FitsFactory.HDUFactory(o)); }
/// <summary>Create an HDU from the given header.</summary> /// <param name="h"> The header which describes the FITS extension</param> public static BasicHDU MakeHDU(Header h) { Data d = FitsFactory.DataFactory(h); return(FitsFactory.HDUFactory(h, d)); }