McIDAS Programmer's Manual
Version 2015

[Search Manual] [Table of Contents] [Go to Previous] [Go to Next]


MDXXnnnn

MD files, where nnnn is a user-defined number.

MD files contain data records addressed by row and column coordinates. All records in a row also share information called a row header. Similarly, all records in a column share a column header. A complete record thus consists of the row header, column header and data. The headers hold parameters common to the data records. Row headers are located in column 0; column headers are in row 0. Up to 1.6 million columns are allowed in MD files and are supported by the point data clients and servers. Fields in a record are identified by 4-character names called keys. Data values are stored as integers. Each record can be up to 400 words long; individual fields in a record are one word (4 bytes) long.

The MD file structure is self-contained. All information for accessing one of these binary files exists in the 4096-word header, which contains the schema specifying the default number of rows and columns in an MD file; the composition of the row headers, column headers and data records; and the names, scale factors, and units of the keys.

A copy of the schema resides in the MD file and in the McIDAS-X disk file named SCHEMA, which contains all schemas recognized by the system. The copy held in SCHEMA serves as a blueprint for all MD files of a particular kind of data. When an MD file is created, the schema is copied from SCHEMA to the MD file header block with all appropriate modifications.

MD file numbers can be between 1 and 999999. If an MD file number is five or six digits, the file name begins with only MDX or MD. For example, MD file number 12345 has the file name MDX12345, but MD file number 123456 has the file name MD123456.

MD files do not have to follow this standard naming convention. The file masking option of DSSERVE may be used to access a data file of any name through the ADDE.

For MD file Application Program Interfaces (APIs), refer to the API functions list at the end of this section.

Word allocation

Word Description

0

schema name

1

schema version number

2

schema registration date, yyyddd

3

default number of rows

4

default number of columns

5

total number of keys in the record

6

number of keys in the row header

7

number of keys in the column header

8

number of keys in the data portion

9

1-based position of the column header

10

1-based position of the data portion

11

number of repeat groups

12

size of the repeat group

13

starting position of the repeat group

14

missing data code

15

integer ID of the file

16 - 23

text ID of the file

24

creator's project number

25

creation date, yyyddd

26

creator's ID

27

zero-based offset to the row header

28

zero-based offset to the column header

29

zero-based offset to the data portion

30

first unused word in the file

31

start of the user record

32

start of the key names

33

start of the scale factors

34

start of the units

35 - 38

reserved

39

beginning Julian day of the data, ccyyddd

40

beginning time of the data, hhmmss

41

ending Julian day of the data, ccyyddd

42

ending time of the data, hhmmss

43 - 60

reserved

61 - 62

file name

63

MD file number

64 - 463

user record, MD coordinates (0,0); not described by the schema; use for storing arbitrary information

464 - 863

names of the file keys

864 - 1263

scale factors for the keys

1264 - 1663

units of the keys

1664 - 4095

reserved


The row header begins at word 4096. The row header's length in words is rows * number of keys in the row header.

Following the row header is the column header. The column header's length is columns * number of keys in the column header.

The MD data follows the column header. The data's length is rows * columns * number of keys in the data portion. Any remaining words are available for user purposes.

Words 39-42 are filled in only during the production of real-time files. When real-time file data is copied to other MD files, words 39-42 in the destination files are set to null.

API functions

Function Description

m0pthdr

opens a connection to read a point source data header

m0ptrdhdr

reads the point source data header

m0ptget

opens a connection to read point source data

m0ptrd

reads point source data

mdo

writes point source data

mdquit

deletes a point source file

m0psort

gets point source selection parameters from the command line


[Search Manual] [Table of Contents] [Go to Previous] [Go to Next]