← Back to the Export tab · Export, Stats & Notifications
Export Images&CTF data experimental
This script (export/DEVELOPMENT/export_drift.script, a C-shell
script) is the export of a conventional drift-correction
project, as Focus ran it next to a TEM: for every image it copies the chosen
files of the movie pipeline — raw stack, gain reference and defect map,
gain-corrected and drift-corrected stacks, the drift-corrected average (with and
without dose weighting), the drift plot, the CTF diagnostic image — into one
subdirectory per kind of file under the export directory, each renamed after the
original movie, and it builds a RELION micrograph STAR file with the CTF values of
every image.
Status. One of the four Development exports inherited from
Focus, not shown in 4D-STEM or Fibril picking projects and awaiting
porting. Its switches and subdirectory names (
export_anything_doit,
export_rawstack_doit, export_…_subdir, …) are not
defined in the current parameter files, so the Parameters panel shows only
export_basedir; and it reads the per-image 2dx_image.cfg
files and 2dx_merge_dirfile.dat of a Focus project, which a 4d
project does not have. It does not run as it stands. For 4D-STEM data the
image export for cryoSPARC is the working
counterpart.
Parameters
| Parameter | Role |
|---|---|
export_anything_doit | The master switch: 0 does nothing; 1 and 2 export (the helper distinguishes a full export from one that leaves the large stacks out). |
export_basedir | The export directory, taken relative to merge/LOGS/. |
export_rawstack_doit / _subdir | The raw movie as imported. |
export_gainref_doit, export_pixeldef_doit / export_gainref_subdir | The gain reference and the defect map, under their original names. |
export_gaincorstack_doit / _subdir | The gain-corrected stack. |
export_driftcorstack_doit / _subdir | The drift-corrected stack (…_aligned.mrcs). |
export_driftcoraver_doit / _subdir | The drift-corrected average, dose-weighted (<name>.mrc) and not (<name>_noDW.mrc). |
export_driftcorfig_doit / _subdir | The drift plot, the image's configuration file, and MotionCor2's shifts when present. |
export_CTFDiag_doit / _subdir | The CTF diagnostic image (<name>.ctf:mrc) and CTFFIND4's or gCTF's text output. |
export_CTFstar_doit | Write the micrograph STAR file from the CTF values of the image's configuration; otherwise the gCTF results of the image are appended. |
Algorithm
- Creates the export directory and lists the two STAR files it will write as important results.
- For every image directory of the project list: reads the names of its files and its CTF values (defocus, figure of merit, resolution limit, phase shift), voltage, Cs, pixel size and iciness from its configuration; derives the export name from the raw movie's name (dots and the extension removed).
- Copies each enabled kind of file with the helper
import_export_sub.com(anrsync -auvPinto<basedir>/<subdir>/<export name>). - Appends one row per image to
micrographs_all_defocus.star— micrograph, CTF image, defocus U/V/angle, voltage, Cs, amplitude contrast (fromphacon), magnification, detector pixel size, figure of merit, maximum resolution, phase shift — and the same row with the image's iciness tomicrographs_all_defocus_withIciness.star, writing the RELION 3.0 headers first when the files are new. - Advances the progress bar by image and re-reads the results at the end.