tomodrgn downsample#
Purpose#
Downsample an image stack or volume by Fourier cropping. Note that where possible, it is preferred to re-extract particles in the appropriate upstream processing software at the desired box size, rather than downsampling here.
Sample usage#
The examples below are adapted from tomodrgn/testing/commandtest*.py
, and rely on other outputs from commandtest.py
to execute successfully.
# Warp v1 style inputs
tomodrgn \
downsample \
data/10076_classE_32_sim.star \
--source-software cryosrpnt \
--downsample 16 \
--batch-size 50 \
--output output/10076_classE_16_sim.mrcs \
--write-tiltseries-starfile \
--lazy
# WarpTools style inputs
tomodrgn \
downsample \
data/warptools_test_4-tomos_10-ptcls_box-32_angpix-12_optimisation_set.star \
--downsample 16 \
--batch-size 50 \
--output output/warptools_70S_box-16.mrcs \
--write-tiltseries-starfile \
--lazy
Arguments#
usage: downsample [-h]
[--source-software {auto,warp,cryosrpnt,nextpyp,cistem,warptools,relion}]
--downsample DOWNSAMPLE --output MRCS
[--batch-size BATCH_SIZE] [--is-vol] [--chunk CHUNK]
[--lazy] [--datadir DATADIR] [--write-tiltseries-starfile]
input
Positional Arguments#
- input
Input particles or volume (.mrc, .mrcs, .star, or .txt)
Core arguments#
- --source-software
Possible choices: auto, warp, cryosrpnt, nextpyp, cistem, warptools, relion
Manually set the software used to extract particles. Default is to auto-detect.
Default:
'auto'
- --downsample
New box size in pixels, must be even
- --output
Output projection stack (.mrcs)
- --batch-size
Batch size for processing images
Default:
5000
- --is-vol
Flag if input .mrc is a volume
Default:
False
- --chunk
Chunksize (in # of images) to split particle stack when loading and saving if full stack + downsampled stack too large for system memory
- --lazy
Lazily load each image on the fly if full stack too large for system memory
Default:
False
- --datadir
Optionally provide path to input .mrcs if loading from a .star file
- --write-tiltseries-starfile
If input is a star file, write a downsampled star file
Default:
False
Common next steps#
Validate that downsampling produced the desired downsampled particles with
tomodrgn backproject_voxel
ortomodrgn train_nn