Beispiel #1
0
        private FitsFile OpenFits(string path)
        {
            var f = new FitsFile(
                new Uri(String.Format("../../../test/files/{0}", path), UriKind.Relative),
                FitsFileMode.Read,
                Graywulf.Schema.Endianness.BigEndian
                );

            return f;
        }
Beispiel #2
0
 public FitsFile(FitsFile old)
 {
     CopyMembers(old);
 }
Beispiel #3
0
        private void CopyMembers(FitsFile old)
        {
            this.baseStream = null;
            this.ownsBaseStream = false;
            this.forwardStream = null;

            this.fileMode = old.fileMode;
            this.path = old.path;

            this.endianness = old.endianness;
            this.bitConverter = old.bitConverter;

            // Deep copy HDUs
            this.hdus = new List<HduBase>();
            foreach (var hdu in old.hdus)
            {
                this.hdus.Add((HduBase)hdu.Clone());
            }
            this.hduCounter = old.hduCounter;
        }
Beispiel #4
0
 internal ImageHdu(FitsFile fits)
     : base(fits)
 {
     InitializeMembers();
 }
Beispiel #5
0
 internal BinaryTableHdu(FitsFile fits)
     : base(fits)
 {
     InitializeMembers();
 }
Beispiel #6
0
        private FitsFile OpenFits(string filename)
        {
            var f = new FitsFile(
                String.Format(@"..\..\..\test\data\{0}", filename),
                FitsFileMode.Read,
                Endianness.BigEndian);

            return f;
        }
Beispiel #7
0
        internal HduBase(FitsFile file)
        {
            InitializeMembers(new StreamingContext());

            this.file = file;
        }
Beispiel #8
0
        private void InitializeMembers(StreamingContext context)
        {
            this.file = null;

            this.headerRead = false;
            this.headerPosition = -1;
            this.dataPosition = -1;

            this.cards = new CardCollection();
            //this.columns =

            this.strideBuffer = null;
            this.totalStrides = 0;
            this.strideCounter = 0;
        }
Beispiel #9
0
        private void CopyMembers(HduBase old)
        {
            this.file = old.file;

            this.headerRead = old.headerRead;
            this.headerPosition = old.headerPosition;
            this.dataPosition = old.dataPosition;

            this.cards = new CardCollection(old.cards);
            //this.columns =

            this.strideBuffer = null;
            this.totalStrides = 0;
            this.strideCounter = 0;
        }