← Back to the Import tab overview
The Import tab
The Import tab watches a folder and brings new microscope files into the project as datasets, optionally processing them on arrival. The window is a two-column split: the left column defines what to import and how, while the right column drives and monitors the import. It is built from seven panels, each with a blue title and its own ? button that opens the matching section of this page; the ? at the right end of the IMPORT DATASETS title bar opens the top of the page.
The numbered markers on the screenshot point to each region; the legend and the sections below explain them.
1
2
3
4
5
6
7
| # | Panel | What it is and does |
|---|---|---|
| 1 | Title bar | The IMPORT DATASETS title line; the ? help button at its right end opens this page. |
| – | Import dataset from EMPIAR | The switch Import data from EMPIAR; switched on, an entry of the EMPIAR archive and its description; Scan EMPIAR in Current Status then makes its *.h5 files the source of the import (above File Import Setting; not yet on the screenshot). |
| 2 | File Import Setting | The source folder and the import-mode checkboxes (on-start, continuous, link-only, delete, sub-directories, EPU). |
| 3 | Import Settings | The import parameters: file filters, file type and extension, gain/dark references, target group. |
| 4 | Process Imported Images | Which processing scripts run automatically as data arrives, and in which order. |
| 5 | Current Status | Drive and monitor the import: scan, import, and reset buttons, with the live status and disk-space display. |
| 6 | Import Options | File-name parsing (metadata deduced from file names) and the import delay time. |
| 7 | Import Folder Details | A live table of every file found in the import folder and its progress through import. |
Import dataset from EMPIAR — download a deposition
Imports the 4D-STEM datasets of an entry of the EMPIAR archive straight from the EBI servers, without downloading them by hand first.
- Import data from EMPIAR — the switch (the project parameter
empiar_import). On, the deposition is the source of the import: the fields of File Import Setting (the import folder and its options) are hidden, and the Scan for files button of Current Status reads Scan EMPIAR and lists the files of the entry. Off, the rest of this panel is hidden, nothing is looked up, and the import folder is the source again. Switching it on or off empties Import Folder Details, which then lists what the next scan finds. - EMPIAR entry — the entry to import from, by its number, typed
after the fixed
EMPIAR-(for example12236, low-dose cryo-electron ptychography of apoferritin). Press Return after typing a number; a pastedEMPIAR-12236is taken as its number. The project keeps the entry in the parameterempiar_entry. - Description — what the EMPIAR web service says about the entry: title, DOI, release date and size, authors, corresponding author, publication, related EMDB maps, and for each image set its category, data format, number of images, value type, directory and details. The links open in the web browser.
- Scan EMPIAR (in Current Status) — lists the
*.h5files in the directories of the entry's image sets (and below them) in Import Folder Details, one image per file, and makes the deposition the source of the import in place of the import folder. The file type and extension of the Import Settings are set to H5 files. The EBI file server can take up to a minute to list a directory. - Import 10 and Import All then
download the files, one by one, into the image directories of the
project (with
curl; about 1 GB per file for EMPIAR-12236, 84 GB in all, so check the free disk space shown in Current Status). Import All asks first. A download goes to a.partfile that is renamed only once complete, so a failed download never passes for a dataset. Stop Import → Stop now ends a download at once: its partial file is deleted, the unfinished image goes to theTRASHgroup, and its file is listed as not imported again (the watch icon), to be downloaded by the next import. The filter Only consider files with this text of the Import Settings selects files of the deposition, as it does for a folder. The link-only and delete options do not apply. - Metadata — the files of EMPIAR-12236 keep their acquisition
metadata as text attributes of the pattern stack (Acceleration voltage
[kV], Convergence semi-angle [mrad], STEM step-size
[A]). The import script Import 4D STEM dataset
(
10_Import_HDF5), when run while importing, writes them into the header of the 4d stack (beam_energy_kev,convergence_semi_angle_mrad,step_size_angstroms, which also calibrates its scan positions) and into the parameters of the image:KV,CSA,StepSizeandscan_step_4d_nm. - Images imported before are recorded under the entry's name and are skipped by the next scan of the same deposition. Use the import folder switches EMPIAR import off, which makes the folder the source again.
File Import Setting — source folder & import mode
Defines where raw files come from and the ground rules for bringing them
in. It contains a directory browser for the import folder
(stored as the project's import_dir) and a set of mode checkboxes:
- Import new images … on start — automatically scan and import when the project opens.
- Continuously import new images — keep watching the folder and import fresh files as they appear (subject to the import delay in Import Options).
- Only link original images — reference the originals in place instead of copying them into the project (saves disk space). Mutually exclusive with delete.
- DELETE the original images after importing — remove each source file once imported. A red warning is shown while this is active; it is mutually exclusive with link only.
- Also import sub-directories from above location — additionally
scan one level of sub-directories below the chosen folder and import the
files found in them. Each source sub-directory's files are placed into the target
group under a sub-directory of the same name, i.e.
import_target_group/<sub-directory-name>/<number>, and those nested images appear in the Library as their own groups. Only the immediate sub-directories are scanned (not deeper), and it is mutually exclusive with Import is from EPU. - Import is from EPU — expect Thermo-Fisher EPU layouts (files in
./*/Data/below the chosen folder); reveals the extra XML column.
Import Settings — import parameters
The parameter form for the import itself, populated from the project's import
parameter lists (e.g. import.params.list,
import_nonEPU.params.list). Typical entries include text filters
(ignore / only consider files containing a given text), the
type of files to import (e.g. H5 files for ptychography) and
their file extension, whether the input is already gain-corrected, the gain- and
dark-reference file locations, defect/problematic pixel lists, and the
target image group into which new datasets are placed. These are
ordinary 4d parameters, so their labels,
types, and tooltips come from the central parameter definitions and their values
are saved with the project.
Process Imported Images — run scripts on arrival
Chooses which processing scripts run automatically as data arrives. Two script lists are combined here:
- to run WHILE importing — executed sequentially as each dataset is imported.
- to run AFTER import — run on each imported dataset after its import, in a queue (see the switch below). This list is the Import tab's own: choosing scripts here does not change the scripts of the Library's Process Selected, nor the other way round.
- Clear scripts — empty both lists.
- The switch Local Queue ⟷ Slurm Queue decides where the scripts after the import run. On Local Queue (green), each imported dataset goes to the LocalQueue of this computer — always ahead of the datasets queued there before, so that the newest data is processed first. On Slurm Queue (blue), it is launched on the GPU computers of the cluster, as Launch on Slurm Queue of the Library does. The switch turns to Slurm only while the Slurm queue is switched on in the preferences and the project lies on the file system the nodes mount; should that no longer hold during an import, the datasets go to the LocalQueue instead. The project keeps the setting.
The combined selection is shown in the list “Scripts to be executed (Blue: During Import, Black: After Import)”, colour-coded by when each runs.
Current Status — drive & monitor the import
The control centre for the import, with a live status line (“N image(s) found in folder of which N image(s) are to be imported”) and a free-disk-space indicator, plus three button groups:
- Scan — Scan for files to look for files, or Abort Scan (useful when a folder holds tens of thousands of files). While EMPIAR import is on, the button reads Scan EMPIAR and lists the files of the EMPIAR entry instead (from the EBI server the first time).
- Import — Import 10 imports the next 10 of the discovered files (click it again to import the next 10, and so on), or Import All imports all of them.
- Reset — Reset Import Status of All Files, marking them unimported again.
When the delete originals option is active, a red warning banner appears here.
Import Options — file-name parsing & delay
Two acquisition-specific settings:
- Parameters to be deduced from file names — shows the expected
file-name pattern (e.g.
<DUMMY>_<specimennumber>_<multishot_series_number>_<TLTANG>) and a Change Pattern button that opens the file-name parser, letting 4d extract metadata (e.g. image number) from each filename. - Import delay time — the number of minutes to wait before importing a freshly created file, so acquisition can finish writing it first. Hidden while EMPIAR import is on: the files of a deposition are complete, and are imported without delay.
Import Folder Details — the files table
A live table of every file found in the import folder and its progress through import, with columns:
| Column | Meaning |
|---|---|
| State | Import state (waiting, importing, imported, …). |
| Import Folder | Source subfolder the file was found in. |
| Import File Name | Original file name. |
| Data | The data file. |
| XML | Associated metadata file (shown for EPU imports). |
| Age | How long ago the file was created. |
| Target Directory | Where the dataset is placed inside the project. |