Exemplo n.º 1
0
        internal TableCellASCII(TableRow row, FieldInfoBase fi)
            : base(row, fi)
        {
            HDUTable table = row.Header.Table as HDUTable;

            _offset = table.BytesPerRow * row.Index + fi.Offset - 1;    // -1 as FITS TBCOLn starts from 1 not from zero
        }
Exemplo n.º 2
0
 internal TableCellBase(TableRow row, FieldInfoBase fi)
 {
     _fieldInfo = fi;
     _row       = row;
     _rawData   = (row.Header.Table as HDUTable).Data;
     _offset    = long.MaxValue; // I'd like something really bad to happen if offset is not initialized!
 }
Exemplo n.º 3
0
        internal TableCellBinary(TableRow row, FieldInfoBase fi)
            : base(row, fi)
        {
            HDUTable table = row.Header.Table as HDUTable;

            _offset = table.BytesPerRow * row.Index + fi.Offset;
        }
Exemplo n.º 4
0
        internal void InitFromCardImage(string key, string val)
        {
            int           fieldIndex = GetFieldIndex(key, 5);
            FieldInfoBase fi         = _fieldsInfo[fieldIndex];

            key = key.Substring(0, 5);
            switch (key)
            {
            case "TBCOL":
                fi.Offset = int.Parse(val);
                break;

            case "TFORM":
                fi.Format = val;
                break;

            case "TSCAL":
                fi.Scale = double.Parse(val);
                break;

            case "TZERO":
                fi.Zero = double.Parse(val);
                break;

            case "TNULL":
                fi.NULL = val;
                break;

            case "TTYPE":
                fi.Name = val;
                break;

            case "TUNIT":
                fi.Unit = val;
                break;

            case "TDISP":
                fi.DisplayFormat = val;
                break;

            default:
                Utils.CheckBool(false, new TableException("Invalid cardimage used to initialzed binary table header"));
                break;
            }
        }