Managing Files

Gwyddion uses its custom data format (.gwy) to store data. This format has the following important advantages:

Therefore, we recommned to use this format for saving of processed files. If you open our sample files, you can see that each one is plotted in different false color palette. This is direct consequence of the fact that Gwyddion stores the full state of the data window including its palette.

Other data file formats are handled with appropriate file loading and saving modules. Beside a large number of file formats used in scanning probe microscopy, graphical file types (PNG, JPEG, TIFF, TARGA) and raw binary and ASCII data can be imported too. If your SPM data format is not supported by Gwyddion yet or it is loaded incorrectly, you are encouraged to write an import module (if you can program) or contact the maintainers to help them improve the support.

File FormatExtensionsSupported ByReadWriteSPS
APE Research.datapefile moduleYesNoNo
ASCII data (raw) rawfile, rawgraph, [a] asciiexport modulesYes Yes [b] No
Assing AFM.afmassing-afm moduleYesYesNo
Image Metrology BCR, BCRF.bcr, .bcrfbcrfile moduleYesNoNo
Binary data (raw) rawfile moduleYesNoNo
Burleigh v2.1.imgburleigh moduleYesNoNo
Burleigh BII.biiburleigh_bii moduleYesNoNo
Burleigh exported.txt, .binburleigh_exp moduleYesNoNo
Createc.datcreatec moduleYesNoNo
DME Rasterscope.imgdmefile moduleYesNoNo
ECS.imgecsfile moduleYesNoNo
Gwyddion native.gwygwyfile moduleYesYesYes
PSI HDF4.hdfhdf4file moduleYesNoNo
Hitachi AFM.afmhitachi-afm moduleYesNoNo
Intematix SDF.sdfintematix moduleYesNoNo
JEOL SPM.tifjeol moduleYesNoNo
JPK Instruments.jpkjpkscan moduleYesNoNo
ADE Phase Shift MapVue.mapmapvue moduleYesNoNo
Zygo binary MetroPro.datmetropro moduleYesNoNo
MicroProf FRT.txtmicroprof moduleYesNoNo
Micromap.sdfasdfile moduleYesNoNo
Molecular Imaging MI.mimifile moduleYesNoLimited [c]
Molecular Imaging STP.stpstpfile moduleYesNoNo
Nanoeducator.spm, .mspm, .stmnanoeducator moduleYesNoYes
Nanonis.sxmnanonis moduleYesNoNo
Nanoscope  nanoscope, nanoscope-ii modules [d] YesNoNo
Nanosurf.ezd, .nidezdfile moduleYesNoNo
Nanotop.spmnanotop moduleYesNoNo
GXSM netCDF.ncnetcdf moduleYesNoNo
NT-MDT.mdtnt-mdt moduleYesNoNo
Olympus LEXT OLS3000.oldols moduleYesNoNo
Omicron Scala.par + dataomicron moduleYesNoYes
Omicron MATRIX.mtrx + dataomicronmatrix moduleYesNoNo
Wyko OPD and ASC.opd, .ascopdfile moduleYesNoNo
Pacific Nanotechnology PNI.pnipnifile moduleYesNoNo
Pixmap images .png, .jpeg, .tiff, .ppm, .tga, .bmp [e] pixmap moduleYes Yes [f] No
PSIA.tiffpsia moduleYesNoNo
Quesant.afmquesant moduleYesNoNo
RHK Technology SPM32.sm2rhk-spm32 moduleYesNoLimited [c]
RHK Technology SM3.sm3rhk-sm3 moduleYesNoLimited [c]
Seiko.xqdseiko moduleYesNoNo
Sensofar.plusensofar moduleYesNoNo
Sensolytics.datsensolytics moduleYesNoNo
Scanning Probe Microscopy Markup Langugae.xmlspml moduleYesNoNo
Shimadzu shimadzu moduleYesNoNo
IonScope SICM.imgsicmfile moduleYesNoNo
SPIP ASCII export.ascspipasc moduleYesNoNo
Surfstand Surface Data File.sdfsdfile moduleYes Yes [g] No
STMPRG stmprg moduleYesNoNo
CSM Surf.sursurffile moduleYesNoNo
Surface Imaging Systems.sissis moduleYesNoNo
Veeco Instruments.zfr, .tfr, .zfp, …spmlab moduleYesNoNo
Veeco Instruments FLT.fltspmlabf moduleYesNoNo
Unisoku.hdr + .datunisoku moduleYesNoNo
WITec.witwitfile moduleYesNoNo
WSxM (Nanotec).tom, .stpwsxmfile moduleYesNoNo

[a] Only simple two-column files are imported.

[b] Currently, only a simple data-matrix format can be exported.

[c] Spectra curves are imported as graphs, positional information is lost.

[d] Nanoscope II and Nanoscope III (and newer) are two distinct file formats, nanoscope loads the newer files while nanoscope-ii loads the old version II files.

[e] And others, namely for import. The exact list depends on formats supported by libraries on the particular platform.

[f] Alhough this is usually lossy. Export to pixmap graphics is intended for presentational purpose mainly.

[g] Only the text variant can be exported at present.

File Loading

Many SPM file formats use identical file extensions such as .img, .afm or .dat. This, however, cannot confuse Gwyddion because it detects the file format automatically based solely on file contents. Thanks to the efficiency of the automated detection you should rarely need to intervene and select file types manually. See Raw Data File Import for details of import of data from unsupported formats and from pixmap images.

If necessary, it is possible to enforce an attempt to load the file assuming a particular format by expanding the File type selector and choosing a file type. However, if the file format is not detected automatically it is quite unlikely the file can be loaded at all.

By enabling Show only loadable files of selected type the file list can be limited only to the selected type. The file type label then indicates the filtering by appending (filtered) to the end. In the case of Automatically detected file type this means the list to files is limited to those Gwyddion thinks it can load. This can be very convenient, on the other hand it can slow down listing of directories with many files.

Once a file type is selected it remains selected even in subsequent file open dialog invocations. If you seem to be suddenly unable to load a file, check the file type is set to the corresponding type, or to Automatically detected.

File open dialog with expanded file type options and channel preview. The small text above the preview shows the module used to load the file (sis) and the number of channels (ch), graphs (gr) and single-point spectra (sps) in the file.

File Merging

File merging is similar to normal file loading, except that the selected file (or files) is merged into the current open file. In other words, channels, graphs and spectra, together with all their settings and properties are added to those already present in the current file.

File Saving

Much of the previous paragraphs applies to file saving too. One of the main differences is the reliability of automatic file type determination. While loading can and does examine the file contents, saving depends on file name and extension. Combined with the large number of different file types using the same extension such as .img, .afm or .dat it leads to ambiguities. Select the file type explicitly before saving if you are unsure.

Since the only file type able to fully represent Gwyddion data structures is its native data format, saving to a .gwy file is the only proper saving. Saving to other file formats essentially consists of exporting of a limited subset of the data, typically only the active channel (without masks and presentations). Therefore it does not change the file name of the current file to the just saved file name.

Document History

The history of recently opened files can be accessed with FileOpen Recent. The submenu contains the last 10 recently used files for quick recalling, an extensive recent file history is accessed with the last item Document History.

Document history lists the files sorted by the last access time (the most recently accessed at the top), with previews and some additional information about a selected channel. The function of the bottom row of buttons is following:

Prune
Removes history entries of files that have been deleted or are no longer accessible for other reasons.
Close
Closes the document history window.
Open
Opens the selected file. This can be also achieved by activating the selected row, either by double-clicking or with the keyboard.

The history can be searched/filtered by file name using the filter controls above the buttons. The filter is activated by pressing Enter in the filter pattern entry. To display all history entries, clear the entry and activate it. The filter pattern is interpreted in two ways:

  • If the pattern contains wildcards, i.e. * or ?, it is interpreted as file glob. This means ? represents a signle arbitrary character, * represents an arbitrary sequence of zero or more characters, and the file name has to precisely match the pattern. Note directory separators (/ or \) are not treated specially, therefore in the pattern *.sis the initial * matches all leading directory components. The pattern syntax is described in GPatternSpec documentation.
  • If the pattern does not contain any wildcards, it is directly searched as a part of the file name.

Search case sensitivity, controlled by option Case sensitive, is useful mainly on systems distinguishing letter case in file names, such as Unix. On systems that do not distinguish the case themselves it is recommended to keep the setting on case insensitive.