Image Inventory
This utility (dataset/utilities/25_inventory.script, a Bash script)
lists the files of the directory it runs in — in the Datasets tab, the project's
merge/ directory — in the Images pane, so that any
of them can be opened in the File Preview
without leaving 4d: the dataset STAR files, the class averages, a model, a PNG,
an HDF5 file. It computes nothing and changes nothing.
Parameters
| Parameter | Role |
|---|---|
comment | A free comment; shown so that the Parameters panel is not empty, and otherwise unused. |
inventory_file_kind | Which kind of files to list, a menu in the parameter editor: all, MRC, MAP, PostScript, Amplitude-and-Phase lists, Spot Lists, ML, PNG, h5, gif, STAR (numbered 0 to 10 in the table below). The script resets it to all before each run, so a value set elsewhere does not last; the whole inventory is what the step is for. |
Algorithm
- Empties its results file and starts an inventory list.
- For each kind asked for, finds the matching files, one directory level deep, in the working directory and in the subdirectories that kind lives in (hidden files and directories are left out):
A subdirectory that does not exist is noted in the log and skipped. The subdirectory names come from the image directories of 4d's predecessors; inKind Files Where 1 *.mrcthe directory itself, FFTIR/,SCRATCH/,CUT/2 *.mapthe directory itself, FFTIR/,SCRATCH/,CUT/3 *.psthe directory itself, PS/4 *.aph,*.hklAPH/5 *.sptthe directory itself 6 *.mrcevery ML*/directory7 *.pngthe directory itself 8 *.h5the directory itself 9 *.gifthe directory itself 10 *.starthe directory itself 0 all of the above merge/most of them are not present, and the list is what lies inmerge/itself. - Sorts the list and writes it to the results, every file as an important image.
Results
No files are written apart from the results list. The Images pane shows every
file found; select one to see it in the File Preview — a .star or
text file as text, an MRC map in the volume viewer.
The files of the dataset directory itself (
MERGING/,
Class2D_RealTime/, …) lie deeper than one level and are not listed
here; the steps that write them list them in their own results.