Both raw ASCII and binary data files and files in unsupported formats can be imported with rawfile module – with some effort. Raw data import can be explicitly invoked by selecting Raw data files type in the file open dialog. It can be also set to appear automatically when you try to open a file in an unknown format. This is controlled in the raw file dialog by option Automatically offer raw data import of unknown files.
Its first tab, Information, allows to set basic file information:
Horizontal and vertical data resolution (number of samples).
Fixes horizontal and vertical resolution to the same value.
Physical sample dimensions.
Keeps the ratio between physical dimension and number of samples equal for horizontal and vertical direction, that is the data has square pixels.
The factor to multiply raw data with to get physical values.
Special value that denotes missing data. Often a value at the
edge of raw data range is used, e.g. -32768 for signed 16bit
data. For text data it is also possible to give a string, e.g.
substitutes missing data in the file.
If the missing value handling is enabled all pixels with the specified substitute value will be masked and replaced with a neutral value in the imported data field.
Invalid values (not-a-number, NaN) in floating point data types are masked and replaced automatically so you only need to enable the replacement if some other (finite) value is used to denote missing data.
On the second tab, Data Format, particular data format can be chosen. There are two independent possibilities: Text data and Binary data.
Text files are assumed to be organized by lines, each line containing a one data row, data being represented by integers or floating point numbers in standard notation. Following options are available:
The line data starts at, that is the number of lines to ignore from file start. All types of end-of-line markers (Unix, MS-DOS, Macintosh) are recognized.
The number of fields to ignore at the begining of each line.
If delimiter is, then any nonzero number of whitespace characters counts as field delimiter. If a whitespace character is selected, the delimiter must be this character. Otherwise field are separated by specified character or string and all whitespace around delimiters is ignored.
By default, floating point numbers are assumed to use decimal point. This option changes it to comma.
Following options are available for binary files:
You can either select one of predefined standard data formats, orto specify a format with odd number of bits per sample or other peculiarities.
How bytes in samples are swapped. This option is only available for predefined formats larger than one byte. Its bits correspond to groups of bytes to swap: if the j-th bit is set, adjacent groups of 2j bits are swapped.
For example, value 3 means sample will be divided into couples (bit 1) of bytes and adjacent couples of bytes swapped, and then divided into single bytes (bit 0) and adjacent bytes swapped. The net effect is reversal of byte order in groups of four bytes. More generally, if you want to reverse byte order in groups of size 2j, which is the common case, use byte swap pattern j − 1.
Offset in file, in bytes, the data starts at.
Size of one sample in bits for user defined formats. E.g., if you have a file with only 4 bits per sample, type 4 here. For predefined formats, their sample size is displayed, but it is not modifiable.
The number of bits to skip after each sample.
Usually, samples are adjacent to each other in the file. But sometimes there are unused bits or bytes between them, that can be specified with this option. Note for predefined types the value must be a multiple of 8 (i.e., only whole bytes can be skipped).
The number of bits to skip after each sample in addition to bits skipped after each sample.
Usually, rows are adjacent to each other in the file. But sometimes there are unused bits or bytes between them, that can be specified with this option. Note for predefined types the value must be a multiple of 8 (i.e., only whole bytes can be skipped).
Whether the order of bits in each byte should be reversed.
Whether the order bits in each sample should be reversed for user defined samples.
Whether samples are to be interpreted as signed numbers (as opposed to unsigned). For predefined formats, their signedness is displayed, but it is not modifiable.
Import settings can be saved as presets that allow to easily import the same file – or the same file type – later.
Button Preset name field. renames currently selected preset to specified name, deletes selected preset, and replaced current import setting with selected preset.saves current import settings under the name in