Import data

Purpose. Convert raw microscope data into COSEDA’s working format: a timestamped dataset run containing an HDF5 image stack, a log file, plots directory, and a dataset .ini that tracks paths, acquisition metadata, and processing parameters. Imported datasets are automatically added to the workspace.

Supported formats

Format

Menu item

Typical source

EMD

Import EMD

Thermo Fisher / Velox

MRC

Import MRC

MRC images or stacks

TIFF

Import TIFF

Numeric TIFF image sequences

HDF5

Import HDF5

Pre-existing HDF5 datasets

All importers are accessible from File > Import in the main window.

EMD importer

The EMD importer converts Velox .emd files to COSEDA’s HDF5 format.

Adding files

  • Add File — select individual .emd files via a file dialog.

  • Add Folder — select a folder; all .emd files directly inside it will be included.

  • Drag and drop — drag .emd files or folders directly onto the dialog window.

  • Remove Selected — remove highlighted entries from the list.

Duplicates are automatically prevented.

Parameters

Parameter

Description

Bin Factor

Integer downsampling factor applied during conversion (default 1 = no binning).

Sample Class

Classification label for the dataset: reference, MOF, COF, zeolite, protein, or other.

Using the GUI

Click Import to start conversion. The status area shows per-file progress, and the main window status bar displays Importing (1/N) during batch processing. Successfully converted datasets are automatically added to the workspace and the workspace state is saved.

MRC importer

Converts individual MRC files or folders of MRC files. A selected folder is converted into one combined HDF5 stack. A selected file is converted as a single MRC source; both 2D images and 3D stacks are accepted when the MRC mode is supported.

Adding inputs

  • Add File — select one or more .mrc files.

  • Add Folder — select a folder containing .mrc files.

  • Drag and drop — drag .mrc files or folders directly onto the dialog window.

  • Remove Selected — remove highlighted entries.

Using the GUI

Click Import to convert all selected sources. Each source produces one INI + H5 pair. Converted datasets are added to the workspace, the workspace state is saved, and the first imported dataset is automatically opened.

TIFF importer

Converts one folder of TIFF images into a single HDF5 image stack. Files can use .tif or .tiff extensions, and names may include prefixes or other text, for example scan_A_000001.tif, scan_A_000002.tif, …

The importer reads all TIFF files in the selected folder using natural filename order, so numeric parts sort as humans expect (frame_2.tif before frame_10.tif). Numeric gaps do not stop the import.

Parameters

Parameter

Default

Description

Compression

None

HDF5 compression filter (None, gzip, or lzf).

Compression Level

4

Compression level (only applies to gzip).

Using the GUI

Select a folder, set compression options, and click Import. The resulting dataset is added to the workspace and the workspace state is saved.

HDF5 importer

Imports one or more existing HDF5 files by creating COSEDA run folders and moving each selected HDF5 file into its run folder. The moved HDF5 file is renamed to match the generated run name.

The selected HDF5 file should already contain a 3D image stack at entry/data/images for the downstream workflow.

Parameters

Parameter

Description

HDF5 File(s)

One or more .h5 or .hdf5 files.

Destination Folder

Optional parent folder for the generated run folders. If unset, each run folder is created next to its source HDF5 file.

Using the GUI

Select existing HDF5 file(s) and click Import. For each imported file, COSEDA creates a timestamped run folder, moves/renames the HDF5 into that folder, creates the .ini, and adds the .ini to the workspace.

What import produces

For each dataset, the importer creates a timestamped run such as <source>_run_<YYYY-MM-DD_HH-MM-SS>.

Common outputs:

  • <run>.ini — configuration file with [Paths], [AcquisitionDetails], [Parameters], and [Output] sections. Depending on importer, the INI is written either inside the run folder or next to it.

  • <run>/<run>.h5 — HDF5 file with the image stack at entry/data/images.

  • <run>/<run>.log — import log.

  • <run>/plots/ — plot output folder used by later workflow steps.

The importers also add or normalize NeXus/COSEDA bookkeeping in the HDF5 file where possible, including image NXdata, image indices/key datasets, dense logs, goniometer transforms, detector geometry, beam energy, and NXprocess import provenance.

After import, proceed to the Preflight Check to verify and complete metadata before running any processing.