DATA_TYPE Values and Data File Storage Formats



Similar documents
Number Representation

Numbering Systems. InThisAppendix...

Levent EREN A-306 Office Phone: INTRODUCTION TO DIGITAL LOGIC

LSN 2 Number Systems. ECT 224 Digital Computer Fundamentals. Department of Engineering Technology

Solution for Homework 2

Data Storage 3.1. Foundations of Computer Science Cengage Learning

The string of digits in the binary number system represents the quantity

Pemrograman Dasar. Basic Elements Of Java

Binary Representation. Number Systems. Base 10, Base 2, Base 16. Positional Notation. Conversion of Any Base to Decimal.

If the database that is required is similar to a template then whole database can be generated by using a template that already exists.

The programming language C. sws1 1

CDA 3200 Digital Systems. Instructor: Dr. Janusz Zalewski Developed by: Dr. Dahai Guo Spring 2012

HOMEWORK # 2 SOLUTIO

Bachelors of Computer Application Programming Principle & Algorithm (BCA-S102T)

MS ACCESS DATABASE DATA TYPES

SQL Server An Overview

Advanced Tutorials. Numeric Data In SAS : Guidelines for Storage and Display Paul Gorrell, Social & Scientific Systems, Inc., Silver Spring, MD

Data Storage. Chapter 3. Objectives. 3-1 Data Types. Data Inside the Computer. After studying this chapter, students should be able to:

Binary Representation

Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program.

Oct: 50 8 = 6 (r = 2) 6 8 = 0 (r = 6) Writing the remainders in reverse order we get: (50) 10 = (62) 8

Floating point package user s guide By David Bishop (dbishop@vhdl.org)

The New IoT Standard: Any App for Any Device Using Any Data Format. Mike Weiner Product Manager, Omega DevCloud KORE Telematics

Systems I: Computer Organization and Architecture

Faculty of Engineering Student Number:

Field Properties Quick Reference

Goals. Unary Numbers. Decimal Numbers. 3,148 is s 100 s 10 s 1 s. Number Bases 1/12/2009. COMP370 Intro to Computer Architecture 1

Aras Corporation Aras Corporation. All rights reserved. Notice of Rights. Notice of Liability

Byte Ordering of Multibyte Data Items

2014 HSC Software Design and Development Marking Guidelines

This 3-digit ASCII string could also be calculated as n = (Data[2]-0x30) +10*((Data[1]-0x30)+10*(Data[0]-0x30));

2011, The McGraw-Hill Companies, Inc. Chapter 3

The Answer to the 14 Most Frequently Asked Modbus Questions

plc numbers Encoded values; BCD and ASCII Error detection; parity, gray code and checksums

A single register, called the accumulator, stores the. operand before the operation, and stores the result. Add y # add y from memory to the acc

NAND Flash Memories. Using Linux MTD compatible mode. on ELNEC Universal Device Programmers. (Quick Guide)

DNA Data and Program Representation. Alexandre David

Data Storage: Each time you create a variable in memory, a certain amount of memory is allocated for that variable based on its data type (or class).

Binary Number System. 16. Binary Numbers. Base 10 digits: Base 2 digits: 0 1

This section describes how LabVIEW stores data in memory for controls, indicators, wires, and other objects.

EE 261 Introduction to Logic Circuits. Module #2 Number Systems

Chapter 4: Computer Codes

Core Components Data Type Catalogue Version October 2011

Lecture 2. Binary and Hexadecimal Numbers

To convert an arbitrary power of 2 into its English equivalent, remember the rules of exponential arithmetic:

Databases with Microsoft Access. Using Access to create Databases Jan-Feb 2003

How To Write Portable Programs In C

Financial Data Access with SQL, Excel & VBA

1. Give the 16 bit signed (twos complement) representation of the following decimal numbers, and convert to hexadecimal:

JDK 1.5 Updates for Introduction to Java Programming with SUN ONE Studio 4

Classful Subnetting Explained

UNLEASHED. The Field Calculator. By Tom Neer, EDAW, Inc.

Storing Measurement Data

INTERNATIONAL TELECOMMUNICATION UNION

Divide: Paper & Pencil. Computer Architecture ALU Design : Division and Floating Point. Divide algorithm. DIVIDE HARDWARE Version 1

Chapter 5, The Instruction Set Architecture Level

CPEN Digital Logic Design Binary Systems

Management Challenge. Managing Hardware Assets. Central Processing Unit. What is a Computer System?

ECE 0142 Computer Organization. Lecture 3 Floating Point Representations

Agilent Technologies. Signal Generators. Creating and Downloading Waveform Files. E448C ESG RF E8267D PSG Microwave N5162A/82A MXG RF

Binary Division. Decimal Division. Hardware for Binary Division. Simple 16-bit Divider Circuit

Specification of the Broadcast Wave Format (BWF)

Appendix B RCS11 Remote Communications

Lecture 11: Number Systems

CSI 333 Lecture 1 Number Systems

Computer Science PLUS I Volume 1 : Concepts Government of Tamilnadu

P1 Companion Standard

U.S. Department of Education 1998 Electronic Access Conferences

Topics. Introduction. Java History CS 146. Introduction to Programming and Algorithms Module 1. Module Objectives

THREE YEAR DEGREE (HONS.) COURSE BACHELOR OF COMPUTER APPLICATION (BCA) First Year Paper I Computer Fundamentals

THE CERN/SL XDATAVIEWER: AN INTERACTIVE GRAPHICAL TOOL FOR DATA VISUALIZATION AND EDITING

Crystal Reports Integration Plugin for JIRA

Package PKI. July 28, 2015

Paper Merges and Joins Timothy J Harrington, Trilogy Consulting Corporation

MS Access Lab 2. Topic: Tables

Black Hat Briefings USA 2004 Cameron Hotchkies

1.Eastron SDM220Modbus Smart Meter Modbus Protocol Implementation V1.0

CHAPTER 1 Overview of SAS/ACCESS Interface to Relational Databases

Binary Numbers. Binary Octal Hexadecimal

Encoding Text with a Small Alphabet

Personalizing Your Signature Appearances

CPU Organization and Assembly Language

Utility Software II lab 1 Jacek Wiślicki, jacenty@kis.p.lodz.pl original material by Hubert Kołodziejski

Computer Science 281 Binary and Hexadecimal Review

Exceptions in MIPS. know the exception mechanism in MIPS be able to write a simple exception handler for a MIPS machine

How to Connect WinCC V6 to TOP Server OPC Servers

Using SQL Server Management Studio

Computer Gateway Specification and Technical Data

Micro Motion Modbus Interface Tool Slots and Slot Address Sequences

ENTTEC Pixie Driver API Specification

XML Validation Guide. Questions or comments about this document should be directed to: E mail CEPI@michigan.gov Phone

Physical Design. Meeting the needs of the users is the gold standard against which we measure our success in creating a database.

Instruction Set Architecture (ISA)

Oracle BI EE 11g - Security Auditing

Streaming Lossless Data Compression Algorithm (SLDC)

A White Paper about. MiniSEED for LISS and data compression using Steim1 and Steim2

Transcription:

Chapter 3. DATA_TYPE Values and Data File Storage Formats 3-1 Chapter 3. DATA_TYPE Values and Data File Storage Formats Each PDS archived product is described using label objects that provide information about the data types of stored values. The data elements DATA_TYPE, BIT_DATA_TYPE, and SAMPLE_TYPE appear together with related elements defining starting location and length for each field. In PDS data object definitions the byte, bit, and record positions are counted from left to right, or first to last encountered, and always begin with 1. Data files may be in ASCII or binary format. ASCII format is often more easily transferred between hardware systems or even application programs on the same computer. Notwithstanding, numeric data are often stored in binary files when the ASCII representation would require substantially more storage space. (For example, each 8-bit signed pixel value in a binary image file would require a four-byte field if stored as an ASCII table.) 3.1 Data Elements Table 3.1 identifies by object the data elements providing type, location, and length information. The elements and ITEM_BYTES are used to subdivide a single COLUMN, FIELD, BIT_COLUMN, or HISTOGRAM into a regular vector containing as many elements as specified for the value of. In these objects the DATA_TYPE must indicate the type of a single item in the vector. In the past, the data element ITEM_TYPE was used for this purpose, but DATA_TYPE is now the preferred parameter. 3.2 Data Types Table 3.2 identifies the valid values for the DATA_TYPE, BIT_DATA_TYPE, and SAMPLE_TYPE data elements used in PDS data object definitions. The values for these elements must be one of the standard values listed in the Planetary Science Data Dictionary (PSDD). Please note: In all cases, these standard values refer to the physical storage format of the data in the data file. In some cases, obsolete values from previous versions of the PDS Standards have been retained as aliases for more specific values (the type INTEGER, for example, is interpreted as MSB_INTEGER when it is encountered). In these cases the more specific value should always be used in new data sets the obsolete value is retained only for backward compatibility. Obsolete values are indicated in the table. Aliases have been supplied for some of the generic data types that indicate the kind of system on which the data originated. For example, MAC_REAL is an alias for IEEE_REAL, but VAX_REAL has no alias, as the VAX binary storage format is unique to VAX systems. In general, the more generic term is preferred, but the system-specific version may be used if needed.

3-2 Chapter 3. DATA_TYPE Values and Data File Storage Formats Table 3.1: Type Elements Used in Data Label Objects Data Object Data Elements Notes COLUMN (without ) DATA_TYPE START_BYTE BYTES COLUMN DATA_TYPE alias for ITEM_TYPE (with ) START_BYTE BYTES (optional) total bytes in COLUMN ITEM_BYTES bytes in each ITEM BIT_COLUMN (without ) BIT_DATA_TYPE START_BIT BITS BIT_COLUMN START_BIT (with ) BITS (optional) total bits in BIT_COLUMN ITEM_BITS bits in each ITEM FIELD DATA_TYPE if populated (no items) FIELD_NUMBER BYTES maximum FIELD bytes FIELD DATA_TYPE if populated (with items) FIELD_NUMBER BYTES maximum bytes in FIELD ITEM_BYTES maximum item bytes IMAGE SAMPLE_TYPE SAMPLE_BITS HISTOGRAM DATA_TYPE alias for ITEM_TYPE BYTES (optional) total bytes in HISTOGRAM number of bins in HISTOGRAM ITEM_BYTES bytes in each ITEM

Chapter 3. DATA_TYPE Values and Data File Storage Formats 3-3 Table 3.2: Standard PDS Data Types Data Element Usage Codes: D = DATA_TYPE B = BIT_DATA_TYPE S = SAMPLE_TYPE Usage Value Description D ASCII_REAL ASCII character string representing a real number; see Section 5.4 for formatting rules D ASCII_INTEGER ASCII character string representing an integer; see Section 5.4 for formatting rules D ASCII_COMPLEX ASCII character string representing a complex number; see Section 5.4 for formatting rules Obsolete BIT_STRING alias for MSB_BIT_STRING D, B BOOLEAN True/False Indicator: a 1-, 2- or 4-byte integer or 1-32 bit number. All 0 = False; anything else = True. D CHARACTER ASCII character string; see Section 5.4 for formatting rules Obsolete COMPLEX alias for IEEE_COMPLEX D DATE ASCII character string representing a date in PDS standard format; see Section 5.4 for formatting rules D EBCDIC_CHARACTER EBCDIC character string Obsolete FLOAT alias for IEEE_REAL D IBM_COMPLEX IBM 360/370 mainframe complex number (8- or 16- byte) D, S IBM_INTEGER IBM 360/370 mainframe 1-, 2-, and 4-byte signed integers D, S IBM_REAL IBM 360/370 mainframe real number (4- or 8-byte) D, B, S IBM_UNSIGNED_INTEGER IBM 360/370 mainframe 1-, 2-, and 4-byte unsigned integers D IEEE_COMPLEX 8-, 16-, and 20-byte complex numbers D, S IEEE_REAL 4-, 8- and 10-byte real numbers Obsolete INTEGER alias for MSB_INTEGER D LSB_BIT_STRING 1-, 2-, and 4-byte bit strings D, S LSB_INTEGER 1-, 2-, and 4-byte signed integers D, B, S LSB_UNSIGNED_INTEGER 1-, 2-, and 4-byte unsigned integers D MAC_COMPLEX alias for IEEE_COMPLEX D, S MAC_INTEGER alias for MSB_INTEGER D, S MAC_REAL alias for IEEE_REAL D, B, S MAC_UNSIGNED_INTEGER alias for MSB_UNSIGNED_INTEGER D MSB_BIT_STRING 1-, 2-, and 4-byte bit strings D, S MSB_INTEGER 1-, 2-, and 4-byte signed integers D, B, S MSB_UNSIGNED_INTEGER 1-, 2-, and 4-byte unsigned integers D, B N/A Used only for spare (or unused) fields included in the data file.

3-4 Chapter 3. DATA_TYPE Values and Data File Storage Formats D PC_COMPLEX 8-, 16-, and 20-byte complex numbers in IBM/PC format D, S PC_INTEGER alias for LSB_INTEGER D, S PC_REAL 4-, 8-, and 10-byte real numbers in IBM/PC format D, B, S PC_UNSIGNED_INTEGER alias for LSB_UNSIGNED_INTEGER Obsolete REAL alias for IEEE_REAL D SUN_COMPLEX alias for IEEE_COMPLEX D, S SUN_INTEGER alias for MSB_INTEGER D, S SUN_REAL alias for IEEE_REAL D, B, S SUN_UNSIGNED_INTEGER alias for MSB_UNSIGNED_INTEGER D TIME ASCII character string representing a date/time in PDS standard format; see Section 5.4 for formatting rules Obsolete UNSIGNED_INTEGER alias for MSB_UNSIGNED_INTEGER D VAX_BIT_STRING alias for LSB_BIT_STRING D VAX_COMPLEX Vax F-, D-, and H-type (8-, 16- and 32-byte, respectively) complex numbers D, S VAX_DOUBLE alias for VAX_REAL D, S VAX_INTEGER alias for LSB_INTEGER D, S VAX_REAL Vax F-, D-, and H-type (4-, 8- and 16-byte, respectively) real numbers D, B, S VAX_UNSIGNED_INTEGER alias for LSB_UNSIGNED_INTEGER D VAXG_COMPLEX Vax G-type (16-byte) complex numbers D, S VAXG_REAL Vax G-type (8-byte) real numbers 3.3 Binary Integers There are two widely used formats for integer representations in 16-bit and 32-bit binary fields: most significant byte first (MSB) and least significant byte first (LSB) architectures. The MSB architectures include IBM mainframes, many UNIX systems such as SUN, and Macintosh computers. The LSB architectures include VAX systems and IBM PCs. In the original PDS system the default format was MSB, thus the designation of INTEGER and UNSIGNED_INTEGER as aliases of MSB_INTEGER and MSB_UNSIGNED_IN- TEGER. New data sets should be prepared using the appropriate specific designation from Table 3.2, above. 3.4 Signed vs. Unsigned Integers The _INTEGER data types refer to signed, 2 s complement integers. Use the corresponding _UNSIGNED_INTEGER type for unsigned integer and bit string fields.

Chapter 3. DATA_TYPE Values and Data File Storage Formats 3-5 3.5 Floating Point Formats The PDS default representation for floating point numbers is the ANSI/IEEE standard. This representation is defined as the IEEE_REAL data type, with aliases identified in Table 3.2. Several additional specific floating-point representations supported by PDS are described in Appendix C. 3.6 Bit String Data The BIT_STRING data types are used in definitions of table columns holding individual bit field values. A BIT_COLUMN object defines each bit field. BIT_STRING data types can be 1-, 2-, or 4-byte fields, much like a binary integer. Extraction of specific bit fields within a 2- or 4-byte BIT_STRING is dependent on the host architecture (MSB or LSB). In interpreting bit fields (BIT_COLUMNS) within a BIT_STRING, any necessary conversions such as byte swapping from LSB to MSB are done first, then bit field values (START_BIT, BITS) are used to extract the appropriate bits. This procedure ensures that bit fields are not fragmented due to differences in hardware architectures. 3.7 Character Data Specification of character field format in ASCII and binary files pending. 3.8 Format Specifications Data format specifications provided in the FORMAT element serve two purposes: 1. In an ASCII TABLE data file or SPREADSHEET file, they provide a format which can be used in scanning the ASCII record for individual fields; and 2. In a binary data file, they provide a format that can be used to display the data values. A subset of the FORTRAN data format specifiers is used for the values of FORMAT elements. Valid specifiers include: Aw Iw Fw.d Ew.d[Ee] Character data value Integer value Floating point value, displayed in decimal format Floating point value, displayed in exponential format Where: w is the total number of positions in the output field (including sign, decimal point, and exponentiation character usually E if any); d is the number of positions to the right of the decimal point; e is the number of positions in exponent length field.

3-6 Chapter 3. DATA_TYPE Values and Data File Storage Formats 3.9 Internal Representations of Data Types Appendix C contains the detailed internal representations of the PDS standard data types listed in Table 3.2. The PDS has developed tools designed to use the specifications contained in Appendix C for interpreting data values for display and validation.