Gundalf file formats


File Formats

Note that some file formats described below are the same in both Gundalf Windows and Gundalf Cloud, which are inter-operable in this regard. This means that for example, a .sba array file created on either can be read by either. From Gundalf C8.2b, the file format of nsr, amp and the new obs theta-phi files all have a standard header like the signature text file and all contain just values without a preceding index to be consistent with each other. Since these are never read in, there are no compatibility problems with the legacy Gundalf Windows but customer-built parsers for these output files may need small modifications.

The standard header referred to above contains essential information about the array, the version of Gundalf and time and date stamps to identify the file. It is only present in the far-field signature file (.sg1), the amplitude spectrum of the signature (.amp), the notional source file (.nsr) and the theta/phi signature sweep file (.obs). All lines in the standard header contain a '#' in column 1 and the header is terminated with a line containing '#---------------------------'.

Format of signature text file (.sg1, .amp files)


Standard header lines

An example of a standard header follows. These may contain additional information in future releases.

# Client:                   
# Active Array Volume:      650 cu.in.
# Sub-arrays:               1
# Gun Pressure:             2000 psi.
# Average depth:            6.0 m.
# Gun types:                1500LL(7) 
# Number of guns:           7
# Number of active guns:    7
# Temperature:              10 C.
# Sound Velocity:           1496 m/s
# Reflection coefficient:   -1.00
# Modelled by:              Gundalf Optimiser, C8.2b, 2020-May-30
# Calibration epoch:        2020-Jan-12
# Time stamp:               2020-May-13, 14:42:07
# Sample interval:          500.0 microseconds.
# Number of samples:        1000
# Record start time:        0.0 s.
# Polarity:                 Non-SEG (onset positive)
# Pre-filtering:            No band pass pre-filter applied
# Post-filtering:           No band pass pre-filter applied -- No Q filtering -- No Wiener filtering
#-------------------------------------------------------
Parameter lines

For .sg1 signature files, these currently contain a '#' in column 1 followed by:

dt = (sample interval in seconds)
iz = (index of time zero, (0 by default))
ns = (number of samples)
un = pm (Pascal-m.), br (bars) or bm (bar-m). This option is
intended to be included by the user who wishes to import a
signature. Gundalf uses bar-m internally for infinite far-field
signatures and bars for signatures at a specified observation point.

For .amp files, these currently contain a '#' in coliumn 1 followed by:

df = (sample interval in Hz)
iz = (index of frequency zero, (0 by default))
ns = (number of samples)
Data lines

Data lines just contain the amplitude values in the units described by the un keyword for .sg1 files and are in dB relative to 1 microPa/Hz at 1m for .amp files. There may be white space before the value.

Example of .sg1 file:

# dt = 0.001
# iz = 0
# ns = 1000
# un = bm
0
0
0.18
0.56
...

Example of .amp file:

# df = 1.953125
# iz = 0
# ns = 513
  148.4269
  165.635
  178.4143
  190.4378
...

Format of signature binary file (.sgy)


This is an industry standard SEGY format.

Format of filter text file (.flt file)


Note that such filters have the same text format as signature files created by Gundalf and must have the header:-

# dt = (sample interval in seconds)
# iz = (index of time zero, normally 0)
# ns = (number of samples in filter)

Filters have no units so the un field is not included.

Optionally, they may also contain one additional header line with the format:-

# ID: (any text here is shown in Gundalf as the filter header.)

Note that filters should be scaled to have an amplitude spectral value of 1.0 in the pass-band. This means that the Fricke maximum scaled amplitude (see discussion in the Gundalf reference help page) is almost independent of the chosen filtering

Format of notional source file (.nsr, .nsg files)


Standard header lines

These are described above.

Parameter lines

These currently contain a '#' in column 1 followed by:

dt = (sample interval in seconds)
iz = (index of time zero, (0 by default))
ns = (number of samples)
nguns = (total number of guns including drop-outs).

The notional source values themselves are separated by a '#' gun line which contains the gun index, the volume in cu.in. and the x,y,z positions in metres all separated by keywords.

Data lines

Data lines just contain the notional sources with the actual notional source value in bar-m. NOTE: dropped out guns do not appear in the notional source file. Note that gun indices normally start at 0 in Gundalf.

Example:

# dt = 0.001
# iz = 0
# ns = 1000
# nguns = 7
# gun 0, vol= 100.0, x= 0.0, y= 0.0, z= 6.0
 0.0
 1.5
...
# gun 1, vol= 200.0, x= 3.0, y= 0.0, z= 6.0
 0.0
 1.7
...
SEGY files

If you use the SEGY output format for the notional sources (.nsg), note that since version 8.1a, the x,y,z coordinates of the notional source are placed in the SEGY header in the following locations:-

  • bytes 49-52 Source depth below surface (a positive number)
  • bytes 73-76 Source-co-ordinate X
  • bytes 77-80 Source co-ordinate Y

These are 2s complement 4 byte integers. These should be scaled by the contents of

  • bytes 69-70 Scalar to be applied to source depth
  • bytes 71-72 Scalar to be applied to source X and Y co-ordinates

These scalars are 2s complement 2 byte integers which may only take the values ±1,10,100,1000,10000 with negative implying division by the scalar. To get the correct value, just multiply or divide the 4-byte coordinate by abs(scalar)^sign(scalar).

Currently, the 4-byte values are in mm. and the scalars fixed at -1000 which will return them to m.

Finally in Gundalf, X increases away from the boat, Y increases from starboard to port, so Z and depth are coincident in a right-handed system.

CSV format

This is simply the comma-separated field format familiar to spreadsheet users. An example of a line in a csv file would be:-

field1,field2,field3,field4

Such records can be imported directly into spreadsheets, (the files should normally have the suffix .csv as a prompt for Excel or other spreadsheet programs).

Parameter lines

These are the header lines which all begin with a '#' as documented above.

Data lines

The remainder of the file contains lines each of which contains the sample for each gun at a particular time separated by commas. When imported into a spreadsheet, the columns will contain the individual notional sources.

Format of sub-array file (.sba files)


Note: The .sba files were not intended to be edited outside Gundalf. Doing so may lead to unexpected behaviour. Although they are human readable, they are only intended as a storage format which can be downloaded and uploaded. Editing should be via the gun canvas inside Gundalf only.

Having given this disclaimer, as a guide to understanding them, the format is as follows.

Any line beginning with # will be treated as a comment and ignored. For airguns, the remaining records have the following format, each field separated by white-space. For sources alternative to airguns, the format is currently volatile and is not described here.

<Pressure (psi)> <Volume (cu.in)> <x (m.)> <y(m.)> <z (m.)> <gun-code> <delay (msec)> <WSK flag> <WSR> <Dropped flag> <sub-array number>

Here the gun-code is an integer defined in the standard gun file, gdf.gun and copied below. The gun-code, Dropped flag and sub-array number are all integers and should not have a decimal point embedded.

0 "1500C"
1 "1900C"
2 "Sleeve"
3 "600B"
4 "2800"
5 "2800LLX"
6 "1900D-DHS"
7 "1900LLX"
8 "1500LL"
9 "G-GUN"
10 "GI-GUN"
11 "8500APG"
12 "800C"
13 "SleeveII"
14 "G-gunII"
15 "1900LLXT"
16 "Mini-G-GUN"
17 "e500A"
18 "e500B"
19 "e500C"
20 "e300A"
21 "e300B"
22 "e300C"
23 "XLA"

WSK flag = 0 if there is no wave-shape kit and 1 if there is.

WSR is the wave shape ratio (0.0 <= WSR <= 1.0), WSR = 1.0 if none

The dropped flag is 1 if the gun is dropped out and 0 otherwise.

The sub-array number simply indicates in which sub-array a gun is situated. These numbers are used to manipulate sub-arrays but are not used to model a signature. Every gun is considered as interacting during modelling.

Although the array files can be edited, it is best to create them using GUNDALF so that they are correctly formatted.

Format of azimuthal directivity file (.azi files)


These encode azimuthal information for plotting in the reports. They are intentionally quite low resolution so as to provide sufficient information whilst being reasonably efficient computationally. We do not recommend they be used as sources to other processing for this reason. If higher resolution is needed for some reason, it is much better to start from the notional sources.

These files are used as an intermediate format for the dip-azimuthal plots at 4 frequency bands and also for the range-range SPE and SPL plots available in the environmental modelling. The .azi file has several panels embedded within it. In both directivity plotting and environmental plotting, each plot comes from one of these panels.

File header

This a one line header with three space-separated fields - the number of frequency bands, the total number of angular samples and the temporal frequency interval.

  • The number of frequency bands is simply the number of separate panels of information in the .azi file.

  • The total number of angular samples is an internal configuration parameter currently set to 64 as a compromise between resolution and cost of computation.

  • The temporal frequency interval deltaf is given by

deltaf = 1.0 / (sampleInterval * nextPower2( nsamps )),

where sampleInterval is the sample interval in s. and nsamps is the number of samples specified for the output signature. The Nyquist is 1.0 / (2.0 * sampleInterval). There are therefore nextPower2( nsamps )/2 samples in the frequency domain.

Following this, there is a data block for each of the panels. Each data block itself has a one-line panel header followed by all the data records for that panel.

Panel header - dip-azimuthal plots

There will be four frequency bands or panels.

The panel header has four space-separated fields:- panel number, panel start frequency (Hz), panel end frequency (Hz), the value 0

Panel data record - dip-azimuthal plots

The data appears as three space-separated fields: y index, x index, dB value. Note that these do not directly correspond to azimuth and dip values; they are simply indices into an internal data structure defined on a rectangular grid sampled evenly in y,x between -pi/2 and +pi/2. This grid is of size (number of angular samples) x (number of angular samples). The rectangular grid is for plotting convenience to make sure every point is defined.

To calculate the azimuth and dip coordinates from this, first recall that Gundalf is a right-hand coordinate system. Dip-azimuth directivity plots are shown with the boat direction at the bottom so the x-axis goes from bottom to top since the boat is travelling in the direction of negative x, and the y-axis goes from left (starboard) to right (port). The point with indices [0,0] is therefore in the bottom left as the directivity panel is viewed in the report.

The third field, the dB value, is calculated by converting from the y and x indices into polar coordinates to give the azimuth and dip. The far-field signature at this azimuth and dip is calculated shifting the notional sources correspondingly adding them and the relevant dB value calculated from the resulting far-field.

Panel header - range-range environmental plots

In this case, there are 3 panels, one for SPE, one for SPL and a third for duration which is currently unused. Otherwise the format is the same as for the dip-azimuthal plots.

Panel data record - range-range environmental plots

Considerable pre-processing is applied to the original data triplets with coordinate conversion and application of specialist spreading functions.

For both types of plot, the resulting rectangular grid of dB values is then presented to the plotting software.

Format of inline and crossline directivity files


Inline and crossline signature files (.iig, .xig)

Data header

This a one line header containing the number of samples, the total number of dips, the sample interval and a dummy field.

Data blocks

After this header the data appears in triplet form as (time index), (dip number index), (amplitude value in bar-m.).

Inline and crossline amplitude spectrum files (.imp, .xmp)

Data header

This a one line header containing the number of frequencies, the total number of dips, the frequency interval and the average frequency.

Data blocks

After this header the data appears in triplet form as (frequency index), (dip number index), (amplitude db value).

Format of theta/phi file (.obs files)


Standard header lines

These are described above.

Parameter lines

These currently contain a '#' in column 1 followed by:

dt = (sample interval in seconds)
iz = (index of time zero, (0 by default))
ns = (number of samples)
un = bm

The signature values for each theta/phi themselves are separated by a '#' line which contains the theta and phi values in degrees.

Data lines

Data lines just contain the values in bar-m.

Example:

# dt = 0.001
# iz = 0
# ns = 1000
# un = bm
# theta=0,phi=0
 0.0
 1.5
...
# theta=0,phi=10
 0.0
 1.7
...