Copyright: ® FranÞois Beauducel, 1999.


Contents
µDAS Grapher : Help Contents

Introduction Overview of µDAS Grapher Syntax and Option Index General Options Import / Export File Options	Data Calibration Calculation Options Graphics Options Main Menu Functions Limitations

µDAS Grapher Help File, © F. Beauducel, 1995-1999.


Introduction

Presentation

µDAS Grapher has been developed for data processing for the µDAS, but it can be used with almost all types of ASCII data file(s) for basic processing and displays of data as time referenced graphics. The graphic mode is interactive and intuitive. You can select channels to view, zoom, adjust scales, apply basic formula or export data in an other format very simply with keyboard or mouse.

µDAS Grapher is a small DOS program mgr.exe running with standard EGA, VGA or SVGA display and processor 80286 or higher (a version 8086 without math coprocessor is also available). It does not need memory whichever file size it reads, and can handle up to 30 channels and 200 files together. All options can be specified on a single line at the DOS prompt or into alias script files (see the complete Options Index for an overview).

µDAS Grapher can be basically used in three different ways:

1.  Process data, change date, time and data formats of almost any ASCII data file(s), with a set of options on the DOS line command;

2.  Visualise these data file(s) as full time referenced graphics in interactive mode, with keyboard or mouse functions ;

3.  View graphics in real-time from the µDAS data-logger (/com option).


Overview of µDAS Grapher

Import Data from File(s)

File Format

Files created by mdas.exe program do not need any file format option. There is two special “DAS” format options: /l for µDAS files transferred with lterm.exe program, and /das for PC-DAS original files.

A set of options allows to specify the file format for "not DAS" files: rows signification (/i:), excluding text (/xt) or unknown header (/x:), and convert special separator (/im, /ic). By default, multiple files will be imported as separated channels; use /a to append them in time.

Time Processing

The data and time can be modified: centre on half period (/r), add a time lag (/s:), extract an interval (/b: and /e:), remove back time data (/nt) or sort the data in chronological order (/sort). There is two types of data files :

1. "Time" referenced with or without constant acquisition period. A complete date and time is needed for each data, i.e., in order of importance: year, month, day, hour, minute and second. If the files do not contain complete time reference, it must be fixed by a constant implicitly defined (/y:) or taken from the filename (/yn:). If it is not the case, and your data contain unreal time recoveries, use option the automatic time restore at import (/tr).

2.  "No Time" referenced (each raw is a data channel) are managed using the data index as X-axis. It is also possible to fix a time reference (/y:) and to force an "acquisition period" (/it:).

Data Processing

While importing a file, data can be decimated (/d:, /ed:), calibrated by a 3rd order polynomial fraction (/c:), filtered by test on values (/vn, /vm) or differences (/fx). A simple formula can also be computed to create a new channel (/f:). All these processes will affect imported data. Then following calculations can be applied temporarily (returning to imported data will be possible after graphics): correction from offset (/do) or linear regression (/dl), filter by moving average (/df:), differences (/dd:) or cumulative sum (/dc).

Only for DAS data files, specific computations are applied automatically (over-scale corrections, see /m) and several parameters will be used in calibration.

Visualise Graphics

First graphic display will have default configuration which is each channel on a different axis versus time. This can be defined by several options: axis and line type (/g:, /lw), full scale (/fs), full screen (/pe), grid (/gd), screen colours (/sc:) and VGA mode (/vga:). Title, channel names and units for labelling can be defined in the calibration file (/c:, /cn:) and will be copied in file header at export. Channel colours, axis tick position and labels positions are automatic. After the first graphic displayed, a large set of functions are available with keyboard and mouse (see Menu Functions).

Export Data

Export Data as a New File

While visualise graphics, displayed data can be exported at any time in a new file with any time format. A special option /t allows to export the imported data and eventually results of calculations in a given format without display graphics. Filename will be automatic or defined (/o:). You can also specify the separator character for output files (/os:).

Export Graphic as a GIF File

While visualise graphics, displayed data can be exported at any time in a GIF file (Shift-F1). Option /gif in command line allows to create an image and exit the program.

Note: Because all options (file format, time and data processing) can be defined in the command line, this is a solution to compute your data and/or change file format or create a graph very simply at DOS prompt, or include long file processing in "batch" files. To use a long list of options, see the Alias script files section.


Syntax and Options Index

Syntax

mgr <filename1> [<filename2> ...] [options] [@<alias1> [@<alias2> ...]]

Options Index

/a  Append Time /b: Begin Time /bk: Book File /c: Calibration /cf: Calib. Frequency /cg: Calib. Geophys. /cv: Calib. Volts /com µDAS Connect /d: Decimate Data /das PC-DAS Format /dc Data CumSum /dd: Data Difference /df: Data Filter /dl Data Linear /do Data Offset /e: End Time /ed: Extract Data /f: Formula	/fs Full Scale /fxN: Filtering /g: Graphics /gd Grid /gif GIF Export /i: Import Format        /ic Coma Format /im Minus Format /iso ISO Standard /it: Imposed Time /l LTERM Format /lw Line Width /m: Over-scales /nan: Not-A-Number /nh No Header /nt No Negative Time /o: Output Filename /os: Output Separator	/pe Plain Screen /r Time Centering  /reunion Binary Format /s: Time Shift /sc: Screen Mode /shot Shots Export /sort Sort Time /t Export Data /test: Test Modes /tmp: Temp. Drive /tr Time Restore /vga: VGA Mode /vmN: Max Value /vnN: Min Value /x: Exclude Lines /xt Exclude Text /xi Exclude Info /y: Time Ref. /yn: Time Ref. File


Syntax and General Options
General Options

Syntax:	mgr <filename1> [<filename2> ...] [options] [@<alias1> [@<alias2> ...]]

Options are all begin with a slash / and can be in any order of appearance. See the complete Options Index for an overview. All other argument will be considered as data filename. Options and data file names can be included into script files by using the @ character (see alias).

<filename> = list of files to import with a single format. Generic names are allowed (* and ?) and will be imported in alphabetic order.

no import format option = import µDAS shot data files (from mdas.exe program) or original data of any file type containing the µDAS Grapher header. To import other files, see option /i:.

/test or /test:<mode> = gives information about file format you want to import. This function supposes that the import format is OK, so use /i:* if you do not know it. Two modes available:

0 (default) : number of columns and acquisition period (reads only file header);

1 : also statistics on the data, like in the Data Information Window (reads the whole file).

/a = if multiple files, append them in time (default is append channels).

/com1 or /com2 = to connect with a µDAS (with EEPROM v.4 or previous) on serial port, and display data in real time (after 2 data received). No calibration or calculation option allowed.

/tmp = use local drive and directory for temporary file (default is "C:\"). Use /tmp:<drive> to specify another disk drive (see Limitations).


Alias Script Files

Because of the MS-DOS command line limitations, script files can be used to specify an unlimited number of options. A script file is a simple text file that contains a list of file names and/or valid options for µDAS Grapher, separated by a space or a carriage return character. They are called on the command line using the @ character before the file name. Recursive calls are forbidden (ignored).

Example:	mgr sta*.dat /a @stafmt.mgr @stadsp.mgr /gif

will append all the files sta*.dat, using the specific format options described in the script file stafmt.mgr, display the data using the graphic options in the script file stadsp.mgr, then export the result in a GIF file (mgr.gif in this case).

Note: the file extension .mgr will be exclusively reserved for µDAS Grapher script files in future versions. So, use it from now!


File Types
File Types in µDAS Grapher

Time referenced data: “DAS” files

The “DAS” files are data files from the µDAS or PC-DAS acquisition systems. They usually contain 5-digit counter shots with a constant acquisition period, result of a continuous integration of FM signals. Indeed, sensors used with µDAS are frequency modulated outputs: the counters measure the integration of the original signal that translates the exact average of the frequency over the time period. This brings two specific processes on “DAS” data :

1.  Data values depend on the acquisition period: to retrieve relative values in frequency, data have to be divided by the acquisition period. This is achieved when calibrating these data.

More important: to respect this relation, the decimation of the data will compute the sum of values and not the average (see /d: option).

2.  The 5-digit counters create over-scales, that have to be corrected by unwrapping to retrieve the real signal variations. This is done automatically by default but can be changed with the /m: option. As a consequence, to retrieve absolute values, the approximate frequency has to be specified for each channel (see the FREQ column in the calibration file).

The “DAS” files are automatically detected by µDAS Grapher: from the file header (#SHOT:) if it exists, or when no /i: option is specified on the command line. A flag “DAS” is displayed in the graphic window header.

Time referenced data: “not DAS” files

If any /i: option is specified, or the file header not dot contains the #SHOT: keyword, then data are considered as “not DAS”: data calculations (decimation and calibration) will be processed normally and, of course, there will not be over-scales corrections. Moreover, if these two conditions are respected as well, there is a third way to impose the “not DAS” mode: use the /m option (without argument). In particular (and this is not a misunderstanding), all calibrated µDAS files are considered as “not DAS”, because the specific DAS processes are already achieved.

Some of files do not contain a complete time reference (year is missing, date is missing...). In this case, it is possible to complete the date and time with /y: or /yn: options (see also the automatic date and time restore).

Raw data files without time reference

A simple table of data can be also imported if no date and/or time characters are specified in the /i: option (only channel letters, * or x). Then a flag “no Time” replaces the acquisition period in the graphic window header, and the X-axis of graphics will be the data index instead of time. The data index can be handle at import and export by the i character in format_string.

Note that data index is internally coded with the same variable as the time, i.e., UNIX time (see µDAS Grapher time coding), so, you can export a file with an artificial date and time from a “no Time” file, as you can export the data index (original UNIX time) of a time referenced file.

You can create a time referenced data file from a “no Time” file, using the /it: and /y: options.


Import / Export Options
Import/Export File Options

Imported files have to be numeric in a raw ASCII format, with any kind of separator, signs or letters, excepted . (point), - (minus) and e (power of 10). If the file uses minus as separator, or coma as decimal point, see options /im and /ic. If the file contains text header or comments, see options /x: and /xt.

The four main options for import and export data in various formats are:

/i:<format_string> = specify import file format. Use /i:* to import all columns as data, without any time reference (see the different file types).

/t:<format_string> = export file without viewing graphics (to be used with batch files for instance); /t by itself uses import format as export format. See also F1 key in Menu Functions

/o:<output_file> = filename to export data. Default is /o:* for automatic name constructed from the input filename with extension .$nn (nn = 00 to 99).

/gif:<filename> = Export graphic as a GIF image in <filename> (same as Shift-F1 key). /gif, by itself, saves the graphic in the current directory as mgr.gif. The export takes view seconds while the mouse disappears from the screen. To produce a pretty graph, use the plain screen display (Alt-F9 or /pe).

Import Format Options

Pre-set import formats

Specific import formats

Import date and time formats

Export format options

Pre-set export formats

Specific export formats


About the format_string

The format_string allows to define each column meaning (time and data) for import and export data. One character stands for one column:

Y = 4-digit year, YYYY y = 2-digit year (after 1970), YY m = month (01 to 12) d = day in month (01 to 31) h = hour n = minute s = second j = ordinal day (001 to 366) b = month name (3 letters)	t = YYMMDDHHNNSS (no separator) l = HHNNSS k = HHNN[.SS] q = HH.NN[SS] x = unused column (NaN for export) 1 to 9 then A to U = channel number * = all channels (in order) i = data index (as x-axis) . = fractions
Examples for import or export in a specific file format:

/i:ymdhns* is the µDAS Grapher default import format.

/t:Ymds134 exports a file with 4-digit year, month, day, seconds in the day and channels 1, 3 and 4.

Fractions in date and time

Fractions are not allowed at import for year (y) and month (m), since they dont constituted regularly spaced bases (leap year, 30 and 31 days for months). In these cases, the fractions will be ignored and only the integer part will be considered.

However, for the time characters d, h, n, s and j, fractionate parts will be converted in hour, minutes or second correctly. To produce fractions at export; add a point after the character. Ex: /t:yj. For the year and ordinal day with fractions of day.

Date and time complements for import and export

For import, each letter of the format_string is interpreted independently, and the date and time is reconstructed as the sum of each (see also the µDAS Grapher time coding). Then, order of appearance has no importance and numerical values are able to exceed their normal limits, i.e., 12 for month, 31 for days, 24 for hours, 60 for minutes and seconds. This allows a lot of possibilities in format and a very simple coding: for example, a column that codes the number of second in a day (from 0 to 86399) will be simply coded as s. In that sense, Y and y are equivalent (year); and d and j are also equivalent (day).

For export, the principle is to never lost information on date and time, even if uncompleted formats are specified. Some examples to understand:

Ys = Year and number of seconds in the year

dn = “absolute” number of days (in fact, since 1970-01-01) and number of minutes in the day

yd = yj = year and number of day in the year (ordinal date).

Thus, d and j are also equivalent at export, if only year is specified (and not the month). Indeed, the j character has been kept in order to fix 3-digit number with leading zeros, especially when using the ISO standard at export (see /iso option).

Automatic date and time restore (import)

When the time reference is uncompleted in the data file, µDAS Grapher can produce a continuous time, increasing automatically when negative time jumps are encountered. Some examples: a file without the year and the date returns from December to January, then one year should be added; if the complete date is missing, and hours come from 23 to 00, a day should be added; etc. To perform that, specify a "Time Restore" import mode (/tr).

Return to Import/Export Options


Preset Import Formats
Pre-set Import Formats

There is presently 3 types of formats that can be read without any /i: option:

1.  The µDAS data files from mdas.exe program (format ymdhns*);

2.  The µDAS binary 24-bit data files (EEPROM v.7). Turns off the use of /i: and /x: options. A title is added with information on the station.

3.  Any files that contain the µDAS Grapher text header (format is imported from the # CHAN: keyword).

Three other pre-set formats need the use of specific option:

/l = import terminal capture files of µDAS from lterm.exe program (format t*).

/das = import in format of PC-DAS files (reads the date DD/MM/YY in the first line of file then data at format hn*).

/reunion = import in format of Reunion Tiltmeter binary files (equivalent to format s*). Since the date does not appear in this format, use /y: or /yn: to complete the time reference.

Return to Import/Export Options


Specific Import Formats

/xt = exclude all lines that contain some text or letters (like comments or remarks).

/x:<n> = exclude the first n line(s) of the file.

/ic = convert all comas to points (use coma as decimal point).

/im = minus (-) is used as a separator (positive values only). Note that a minus character used in compact form (no blank) does not need this option. For example, a date coded as 1995-06-18 is read correctly because the left character before the - is a number.

Return to Import/Export Options


Import Date and Time Options

/y:<time_string> = specify the time reference if uncompleted.

/yn:<date_string> = search for time reference in the filename. The time will be completed for each file. The <date_string> uses the same codes defined for <format_string>., but it describes in this case the meaning of each character of the file name. Example: sta0225.d97 is one of the daily files you acquired (for this one, on February 25, 1997); the files contain columns with hours, minutes and data channels. To import all the similar files and complete the time reference, use the following options:

mgr sta*.* /i:hn* /a /yn:xxxmmdd.xyy.

/b: or /e:<time_string> = begin and/or end at a specific time. If begin time is less than end time, only data between the two times will be imported; on the contrary, data will be excluded.

/r = centre time reference (minus acquisition period / 2).

/tr = time restore mode. Allows automatic continuous time restore when the imported file has an uncompleted time reference.

/s:<hour> = shifted time correction to apply (in hours). See also # LAG: in Calibration file.

/it:<n> = impose an interval of time of n seconds. Use this options with /y: to create complete time referenced files from raw data files.

/nt = exclude data with recovered time reference.

/sort = sort the data in chronological order and remove redundant data (like /nt). This function works only with a single data file or multiple files in append mode (/a). It is faster when a stable acquisition period is detected. The algorithm is optimised for files with sparse blocks of regular data, appearing in random order, but not for complete random data.

See also options for decimation, extraction of data or filtering in Data Calculations

Return to Import/Export Options


About the time_string

The time_string is a format used by µDAS Grapher to define date and time. It is used in options /y:, /b:, /e:, /bk:, file header and calibration file.

The complete time_string format is "YYMMDDHHNNSSsss" (year, month, day, hour, minute, second and millisecond) or the data index if the data are “no Time” referenced. The string can be truncated anywhere from the right.

Return to Import/Export Options


Preset Export Formats
Pre-set Export Formats

These options will affect the exported files with /t: option or F1 key.

/iso = use ISO 8601 standard for date and time, if the format_string export format allows it, i.e., for the following formats:

ymdhns = YYYY-MM-DD HH:NN:SS;

yjhns = YYYY-DDD HH:NN:SS;

These complete format can be truncated at the condition that the order for date and time are respected: Year-Month-Day and Hours:Minutes:Seconds, i.e., the biggest first. Since 2-digit years are forbidden, any 'y' will be replaced automatically by 'Y'.

/shot = data will be exported as integer 5-digit shots (00000 to 99999); use this option to simulate original DAS data files, for example after a decimation.

Return to Import/Export Options


Export Format Options

These options will affect the exported files with /t: option or F1 key.

/os:<ASCII code> = code for separator character between columns (default is a space). Here are some values of ASCII codes (see a table in your MS-DOS User Guide for others):

9 = tabulation 32 = space (default) 44 = coma	45 = minus 58 = colon 59 = semicolon

/nh = no header in exported file. By default, a µDAS header is added to the file when exported.

/xi = exclude the µDAS header information lines in exported file.

Return to Import/Export Options


About Text Header
About µDAS File Header

The file header of µDAS Grapher is managed internally by the program or created by µDAS download utilities. It allows to handle basic information on file formats and processing through the following keywords (order has no importance):

# DATE: = date an time of creation;

# PROG: = complete path and line command when calling mgr.exe;

# INFO: = copy of a maximum of ten information lines from original file header (use option /xi to exclude it from exported files);

# TITL: = copy of title from calibration file, original file header or defined by Alt-F6 key;

# SHOT: = data are original DAS shots (must correct over-scale);

# SAMP: = time sampling (in seconds);

# CHAN: = time and data format, including channel names and units into parenthesis preceded by an underscore. Example: Battery_(V) Temperature1_(°C)

Note: A file with this text header can be loaded by µDAS Grapher without the import option /i:. For that, it is advised to keep this header in all exported files, but if you do not want it, use /nh option or answer “no” at the appropriate question when using the F1 key.

Return to Import/Export Options


Data Calibration

To give names and units to the channels, a graph title and to calibrate the data, µDAS Grapher uses a calibration file with a specific format. This file must contain all information about the data you want to process. Especially, for DAS data for what specific calculations apply.

Note: To create a new calibration file and edit it, enter a new filename and appropriate import options, or use the example.clb file.

/c:<calib_file> = name of the file which contains all calibration parameters and other data information as keywords followed by arguments:

# TITLE: <text> = text line used for graphics;

# VALID: <begin_time> [<end_time>] = define the validity time domain of the following calibration parameters (in time_string format);

# LAG: <hour> = same as /s: option;

# BOOK: <begin_time> <end_time> [<level>] = see /bk: option.

These informations must be followed by a table of description and calibration parameters for each channels, separated by space (see an example in the example.clb file):

SENSOR_NAME  UNIT  DIV  FREQ  FACT  CST  A0   A1   A2   A3   B0   B1   B2   B3

Chan_1       unkwn 1    0     1     0    0    1    0    0    1    0    0    0

Chan_2 ...

· NAME : sensor name (16 char. max.);	} use underscore (_)

· UNIT : physical unit name (7 char. max.);	} for space

· DIV (frequency divisor): 2, 16 or 128 (set in µDAS box);

· FREQ (initial frequency, in Hz): to produce absolute values if necessary (see DAS data);

· FACT and CST: general factor and constant of calibration applied after the polynomial, (physical unit per Volt for DAS data);

· A0 to A3 and B0 to B3 : 3rd order polynomials factors (in Volt per Hz for DAS data);

The complete calibration formula is given by the relation:

where d is the calibrated data, and x is original data (frequency in Hz for DAS data).

Old calibration files are still accepted, µDAS Grapher detects the header line to read them:

versions up to 1.8a: DIV  FREQ  FACT  CST  X  X^2  X^3  UNIT  NAME

versions up to 1.6a: DIV  FREQ  CST  X  X^2  X^3  UNIT  NAME

Attention: the variable CST in these old files correspond to A0 in the new version and not CST which is now applied after the multiplication by FACT.

For DAS data, initial frequency FREQ will fix the number of over-scales at the beginning of the file; 0 value also means no change from previous data and -1 value means the sensor is a real counter (not FM signal), thus, time sampling will not be applied and decimation will compute the sum (and not the average) of the data.

/cn:<calib_file> = retrieve only names, units and book for graphics.

/cf:<calib_file> = calibrates DAS data in Hertz (uses frequency divisor, initial frequency and sensor names).

/cv:<calib_file> = calibrates DAS data in Volt (uses frequency divisor, initial frequency, 3rd order polynomials and sensor names).

/cg:<calib_file> = calibrates data in "geophysical units" (uses only the general factor, constant and sensor name and unit).


Data Calculation Options

/m:<d> = set the DAS data mode, adjusting the correction of over-scales with a maximum absolute difference <d> (0 < d < 50000) between two consecutive data. Default is d = 40000 if DAS data mode is detected. Use /m:0 to not correct over-scales (keep original data, see also option /shot for exports), and /m to avoid all DAS specific computations.

/nan or /nan:<x> = invalid data will be replaced by Not A Number value <x> which will be ignored in graphics and calculations, and used to export "x" columns (see format_string). The default is 1e-37. If this option is not specified, any invalid data will exclude the entire line (all channel).

/vm<N>:<max> and /vn<N>:<min> = invalid data of channel <N> outside <max> and/or <min> values before calibration if any. More than 1 channel can be specified in <N>. To apply on all channels, use /vm:<max> and /vn:<min>. Examples:

/vn1:1000 = exclude channel 1 data lower than 1000;

/vn26:450 = exclude channel 3 and 6 data lower than 450;

/vm:30 = exclude all channel data more than 30.

/fx<N>:<noise> = invalid data if difference between 2 data on channel <N> is more than <noise> value. Ex: /fxB:50.

/d:<n> = decimation (extract a mean value computed on n data). For DAS shot data, it computes the sum and not the average.

/ed:<n> = extract one data every n data (under sampling!).

/do = correct all channels from an offset.

/dl = correct all channels from a XY linear regression.

/dd or /dd:<n> = compute the approximate derivative of data, or the difference between two data spaced by n (all channels, same as Alt-D key).

/dc = compute the cumulative sum for all channels (same as Alt-C key).

/df:<n> = apply a low-pass filter with a moving average on n data (same as Alt-T key).

/f:<formula_string> = create a new channel which is an arithmetic formula of data (same as F8 key).


Graphics Options

/g:<graphic_string> = select channel to draw and line style to use. This option allows you to determine the first graphic pattern which will be displayed, e.g. for very large files (default is all channels).

/fs = full scale mode (same as F4 key). For single channel axis, indicates maximum and minimum on the legend; for multiple channel axis, draws each channel on its own scale and indicates ticks as percent (unknown scale).

/pe = plain screen mode, without the upper window header (same as Ctrl-F9 key).

/lw = lines and points will be 3 pixels width (same as Alt-F9 key).

/gd = no grid on graphs (see Shift-F6 key).

/sc:<mode> = Screen colour modes (same as F9 key). Values of <mode> can be:

0 = 16 colours on black background (default) 1 = 2 colours (greys) on black background	2 = 2 colours (greys) on white background 3 = 16 colours on white background

/vga:<mode> = specify the 16 colours VGA graphic resolution mode (same as Shift-F9 key). Values of <mode> can be, depending on your video card memory:

0 =  320 x  200 1 =  640 x  200 (CGA) 2 =  640 x  350 (EGA) 3 =  640 x  480 (VGA, default)	4 =  800 x  600 (SVGA) 5 = 1024 x  768 (SVGA) 6 = 1280 x 1024 (SVGA)
Note: with SVGA modes, your graphic card has to support it! Moreover, a very basic mouse cursor will appear because most of the mouse drivers are not compatible.

/bk:<book_file> = name of a file containing a list of specific time events related with data; each line is (in time_string format): "<begin_time> <end_time> [<level> [<text_info>]]"

  Those events will appear as dashed areas in background of graphics, depending on <level> value:

0 = /// light (default) 1 = /// bold 2 = \\\ bold	3 = \\\ light 4 = ### 5 = XXX	6 = XXX bold 7 = spaced dots 8 = dots


About the graphic_string

The graphic_string format allows to specify a graphic parameters in a single word. It is used both on the command line (/g:) and on keyboard while visualise data (see Main Menu Functions). Characters used are:

1 to 9 then A to U (uppercase) for channels;

* for all channels on the same axis;

- to select intervals;

# or , (coma) to separate axis between channels and specify the axis relative size (for example, two comas = previous axe will be double). Note that coma is not allowed in DOS command lines; use # instead for /g: option, or use script files;

v (versus) to make XY graphs.

/ = line (default)

. = dot markers

x = cross markers

o = circle markers

o/ = line & circle markers

| = bars.

Note: Line style is by default a continuous line between data, interrupted when the time interval exceeds 1.5 times the acquisition period. If no regular acquisition period is detected, the line is continuous. For line types, see also the F6 key in Main Menu Functions.

Examples:

23,,1,4 = draws channels 2 and 3 on first double size axis, channel 1 on a second axis and channel 4 on a third one;

1-4v5 = draws channels 1 to 4 versus channel 5;

,1-5B = draws channels 1 to 5 and B (11), all on separated axis.

The following example is produced from 2 files, both containing µDAS header with title, channel names and units: one with 4 channels and regular acquisition period (10 minutes), and an other with 3 channels and irregular data. The graphic_string is /1,,.3,,|6, plain screen mode (/pe). The mouse cursor is positioned out of the graphs, so that a legend with channel names and units appears at the bottom of the screen, instead of cursor tracking co-ordinates. A part of the data has been selected with zoom, then the Y-scale has been adjusted using F5 key.

Return to Graphics Options


Main Menu Functions

After the first graphic has been displayed, a set of functions are available for drawing, computation or exporting of the data. Some of the function keys have an equivalent with the mouse. Usually, these options can be set-up on the command line.

Keys	Mouse	Options	Function
__________________	________	_________	________________________________________________________
1 to U, -, v and ,	yes	/g:	Select channels to draw (see graphic_string)
,	no	/g:	Redraws displayed channels on separated axis
*	yes	/g:	Draw all channels as a function of time or data index, on a same axis.
+ and -	yes		Zoom in or out (in time) by a factor of 2.
Arrows	yes		Shift the view in all directions by half screen
Home and End	yes		Go to the begin or end of view
Esc	yes		Returns to a plain view (no zoom).
PgUp and PgDn	no		Scrolling of channel names in the file information window.
F1	no	/t:	Export data in a file
Shift-F1	no	/gif:	Export graphic in a GIF file
Alt-X or F10	no		Exit program
Alt-O	no	/do	Offset correction mode
Alt-L	no	/dl	Linear drift correction mode
Alt-D	no	/dd	Approximate derivative mode
Alt-C	no	/dc	Cumulative sum mode
Alt-T	no	/df:	Filter mode (moving average)
F3	no		Undo Offset, Linear, Derivative or Cumulative Sum displays (return to original data)
F8	no		Formula
F2	yes		Display the Data Information Window
F4	no	/fs	Full Scale mode
F5	yes		Magnify (Y-scale adjustment including all data)
Shift-F5	no		Equal Scale (each graph has same Y-interval)
F6	yes	/g:	Mark (line, dot, x, o, line & circle or bar)
Shift-F6	no	/gd	Grid (switch viewing)
Alt-F6	no		Define or change the graph title (see file header and calibration file)
F7	no		Average, Trend and Period Counting
Shift-F7	no		Show Over-Scales (for DAS data, trace an horizontal grid every 100000 shots)
F9	no	/sc:	Switch screen colour mode
Shift-F9	no	/vga:	VGA modes
Ctrl-F9	no	/pe	Switch plain screen mode (hide the file information)
Alt-F9	no	/lw	Switch line width
Alt-H	no	no arg.	Display some quick help screens


Mouse functions

Position in graphic area:

   · moving = show time and data value in "real-time" in the up-left inset window

   · left/right-button click = time zoom in/out by 2 (same as ±)

   · left-button double click = magnify (same as F5)

   · right-button double click = return to plain view (same as Esc)

   · left-button drag = open a time interval (zoom in)

   · right-button drag = open a rectangular area (zoom in)

Position in upper time-lift (right or left part):

   · left-button click = shift in time (same as left and right arrows)

   · left-button double click = begin or end (same as Home and End)

Position anywhere else:

   · moving = show µDAS Grapher logo and real clock (date and time)

   · left-button switch the Data Information window (same as F2)

Return to Main Menu Functions


File Information Window

By default, graphics are displayed with a window header that contains some informations on the imported files. This window can be hidden by using the /pe option or Ctrl-F9 key.

The informations are as follows:

· number of file(s) and total size;

· format string, pre-set formats and header origin;

· type of file (DAS or not DAS), over-scale parameter if any;

· number of channel(s);

· acquisition period or “no Time”, decimation or filtering;

· calibration file name;

On the right part, appear the names and units of the channels (see calibration file), the channel number and the line type. If more than 4 channels are imported, use PgUp and PgDn keys to scroll the names.


Information Window
Data Information Window

To access to this window, press F2 or click outside the graphic area with the mouse.

This window gives general information about data, for each imported channel:

· graph number, line type, channel name, unit and number;

· RMS Difference (Root Mean Square) = an idea of short term noise;

· Resol. = smallest non-zero value between two consecutive data;

· Mean Value = average of displayed data (see Alt-O key);

· Linear Coefficient = linear regression rate of displayed data (see Alt-L key);

· Valid Data = percent of data calculated from time interval and period;

For DAS data only:

· Over-scale = number of over-scale corrected (see /m option);

· Over-range = number of excluded data for over-scale correction.

These informations can also be obtained without displaying graphic, by /test:2 option.

Selection of some graphic parameters can be set-up with the mouse or keyboard:

· left-button click on a channel line = change line type

· left-button double click on a channel line  = select one channel only

· right-button click on a channel line = change graph number

· right-button double click or * key = select all/none channel

· left-button click on the ENTER area, or ENTER = accept selections and redraw

· F6 key changes the line for all channels

To exit the Data Information window without redrawing, press Esc or F2 again.

Return to Main Menu Functions


About Formula on Data

You can access to this menu (by F8) only if multiple data files are appended (1 file or /a option used). The result will be created as a new channel (or replace previous result) and automatically added to the current graphic. Then you will be able to include it in a next formula.

The formula can be used to keep the result of a data calculation (simply a copy of a channel).

Syntax of a formula_string is:

1 to U or * = channel number or all channels.

0 = time vector, in Unix format.

<x> = constant number (real).

+ - . / \ = addition, subtraction, product, division right and left modes. All following channels will be added, subtracted, multiplied with, or divided by previous result, until an other mode encountered. Addition mode is default. Some examples:

  · "1.2+3/4"	<=> (ch1 * ch2 + ch3) / ch4

  · "123/<3>-4"	<=> (ch1 + ch2 + ch3) / 3 - ch4

  · "123\4"	<=> ch4 / (ch1 + ch2 + ch3)

  · "/2" or "<1>/2" or "2\<1>"	<=> 1 / ch2

l and e = logarithm (base 10) and exponential of previous result. Examples:

· "12e"	<=> e**(ch1 + ch2)

· "3l"	<=> log10(ch3)

c, s and t = cosinus, sinus and tangent of previous result (in radian). Example:

· "0.<1e-8>s"	<=> sin(time*1e-8)

v and w =  synchronised time events  mode. Example: "v123" produces a function with steps where there is events on all channels 1, 2 and 3 at a same time, and flat no where else. "v123w4" excludes events present also on channel 4.

Return to Main Menu Functions


Average, Trend and Period display
Average, Linear Trend and Period Counting

This functions can be accessed by the F7 key, and have two different modes:

1.  If the displayed data are original, i.e., there is no Offset, Linear, Derivative or Cumulative Sum calculations, then press F7 once shows the average of the displayed data, F7 again shows the linear trend, and F7 a last time returns to normal mode. These grey lines are shown for each graph, and correspond to the correction which will be applied when using Offset or Linear modes. Note that in X-Y mode, the average shows a small cross (the “gravity centre” of data!) instead of a line.

2.  If one of the Offset, Linear or Derivative modes are active, and only one channel is displayed, then press F7 once indicated on the right vertical label the average period of the signal, obtained by counting time intervals between zeros.

Return to Main Menu Functions


Limitations

Minimum value	Maximum value

______________________________________________________________________________

Number of columns	1	40

Number of channels	1	30

Number of valid data lines	3	2,147,483,648

Line width (characters)	0	512

Number of files	1	200 (if appended)

Time reference	01 Jan 1970 00:00:00	19 Jan 2038

Time interval between data	1 millisecond

Data values	± 1E-307	± 1E+308

Title (characters)	0	78

Sensor name (characters)	1	16

Sensor unit (characters)	0	7

Number of arguments (using DOS)	0	128 characters

Number of arguments (using scripts)	0	illimited

Memory and hard disk space

µDAS Grapher does not use memory; it creates a binary temporary file on hard disk, then use it for calculation and display. To visualise or export data files, your hard disk free space (or drive specified by option /tmp) must be approximately equal to the total size of all input files, in order to create a temporary binary file. To compute formula on data, you will need the double.

Only data filtering (options /dd and /df, Alt-D and Alt-T menu) use dynamic memory allocation.

DOS command line

The arguments given on the command line are limited by MS-DOS: the complete line cannot exceed 128 characters and some of them are strictly reserved to DOS: , (coma), |, <, >. This limits the use of some options in µDAS Grapher. To solve this problem, script files can be specified.


Contacts
About µDAS Grapher...

µDAS Grapher was developed during my doctorate thesis missions supported by IPGP (1995 to 1997) and a lot on my personal free time (WE and holidays...). Since 1996, it became a part of the EDAS (European Data Acquisition System) project of the Observatoire Royal de Belgique (ORB).

___________________________________________________________________________

Contacts:

Software:	François BEAUDUCEL, E-mail: beauducel@ipgp.jussieu.fr

Institut de Physique du Globe de Paris

Project:	Michel VAN RUYMBEKE, E-mail: labvruy@oma.be

Observatoire Royal de Belgique

Avenue Circulaire 3, 1180 BRUXELLES, Belgium

Tel: +32 (0) 23 73 02 86, Fax: +32 (0) 23 74 98 22

___________________________________________________________________________

Acknowledgements:

-	Thanks for useful comments and bug detection to M.F. Esnoult, H. Delorme, C. Antenor, P. Mourot, P. Kowalski, and A. Somerhausen.

-	SVGA display BGI driver and C source written by Jordan Hargraphix Software, © 1991-1994.

-	GIF exporting C source code written by Sverre H. Huseby, © 1992.

-	Executable program has been compressed with LZEXE written by Fabrice Bellard, © 1989.

-	µDAS binary format v8 implemented thanks to André Somerhausen information.

-	µDAS serial protocol implemented thanks to the AE-Belgium documentation, © 1995.


MDAS.EXE is the DOS programmer and download utility for the µDAS data logger.


LTERM.EXE is a terminal emulator for advanced programmation on serial port connections.


µDAS (micro Data Acquisition System): High resolution, 4-channel continuous integrator and data logger developed at Royal Observatory of Belgium.


PC-DAS is the first version of the Data Acquisition System: 8-channel continuous integrator and data logger controlled by a PC. Format of data files are different with µDAS: date header then minutes, seconds and 5-digit shots for each channel.


Reunion Tiltmeter are daily files coded in integer binary format: seconds of the day (2 bytes) then 16 channels of 12-bit each (24 bytes), i.e., 26 bytes per record.


NaN (Not A Number): specific value which will be ignored in graphics and calculations.


A shot is an integer value of counter. For µDAS data, it corresponds to a 5-digit number (0 to 99999).


Over-scale = jumps in data of ±100000, created by the 5-digit counters of µDAS data logger.


FM = frequency modulation.


UNIX Time = the number of second since 1970-01-01 00:00:00 (January 1rst, 1970 at midnight), coded with a long integer (8 bytes).


Note on µDAS Grapher internal time coding

For display and processing, µDAS Grapher uses the UNIX time coding. This leads some limitations in dates values that can be processed and this also affects the uncompleted time referenced files, for instance, the missing of the year will be interpreted as 1970... To take into account time variations less than 1 second, a 2-byte integer has been added that codes the number of milliseconds.