Exemple #1
0
        ///////////////////////////////////////////////////////////////////////////////////////////////////////////////
        #region privates and internals
        ///////////////////////////////////////////////////////////////////////////////////////////////////////////////
        internal void HandleCardimage(CardImage ci)
        {
            string key   = ci.Key;
            string value = ci.Value;

            int i, j;

            if (ci.IsOneIndexForm("WCSAXIS"))
            {
                _numWCSAxes = int.Parse(value);
            }
            else if (ci.IsOneIndexForm("WCSNAME"))
            {
                _name = value;
            }
            else if (ci.IsOneIndexForm("CRVAL"))
            {
                AddElementToVectorElementList(ci, ref _worldRefElements);
            }
            else if (ci.IsOneIndexForm("CRPIX"))
            {
                AddElementToVectorElementList(ci, ref _pixelRefElements);
            }
            else if (ci.IsOneIndexForm("CDELT"))
            {
                AddElementToVectorElementList(ci, ref _pix2physElements);
            }
            else if (ci.IsOneIndexForm("CRDER"))
            {
                AddElementToVectorElementList(ci, ref _randErrElements);
            }
            else if (ci.IsOneIndexForm("CSYER"))
            {
                AddElementToVectorElementList(ci, ref _sysErrElements);
            }
            else if (ci.IsOneIndexForm("CTYPE"))
            {
                i = ParseIndex(key);
                WCSAxis a = GetOrCreateAxis(i);
                a.Type = value;
            }
            else if (ci.IsOneIndexForm("CUNIT"))
            {
                i = ParseIndex(key);
                WCSAxis a = GetOrCreateAxis(i);
                a.Unit = value;
            }
            else if (ci.IsTwoIndexForm("CROTA"))
            {
                AddElementToVectorElementList(ci, ref _oldRotationElements);
            }
            else if (ci.IsTwoIndexForm("PC"))
            {
                AddElementToMatrixRowList(ci, ref _PCij);
            }
            else if (ci.IsTwoIndexForm("CD"))
            {
                AddElementToMatrixRowList(ci, ref _PCij);
            }
            else if (ci.IsTwoIndexForm("PV"))
            {
                ParseTwoIndices(key, out i, out j);
                WCSAxis a = GetOrCreateAxis(i);
                a.AddNumericParam(j, double.Parse(value));
            }
            else if (ci.IsTwoIndexForm("PS"))
            {
                ParseTwoIndices(key, out i, out j);
                WCSAxis a = GetOrCreateAxis(i);
                a.AddTextParam(j, value);
            }
        }