fsdb_clean_images_metadata
FSDB images.json Metadata Cleanup CLILink
Removes the redundant biological / hardware metadata entries from every
scan's metadata/images.json in a database.
These entries are duplicated from metadata/metadata.json (which now holds
the canonical MIAPPE-aligned tree):
- older implementation (plant-imager): top-level
objectandhardware; - newer implementation (Plant-Imager3): a
Metadataentry holdinghardwareandobject.
Everything else in images.json (channels, task_params,
workspace, picamera/picamera2, ScanPath, created, ...) is
left untouched.
Usage ExamplesLink
# Dry-run first (shows what would be cleaned, writes nothing):
fsdb_clean_images_metadata /romi_db --dry-run
# Actually clean the files (a ``.bak`` copy is written for each changed file):
fsdb_clean_images_metadata /romi_db
# Clean without keeping backups:
fsdb_clean_images_metadata /romi_db --no-backup
clean_images_metadata
Link
Clean a single scan's metadata/images.json in place.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
Path
|
Path to the scan directory. |
required |
|
bool
|
If |
False
|
|
bool
|
If |
True
|
Returns:
| Type | Description |
|---|---|
bool
|
|
Source code in plantdb/commons/cli/fsdb_clean_images_metadata.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | |
main
Link
main(db_path, dry_run, no_backup, log_level)
Clean redundant metadata entries from every scan's images.json.
Source code in plantdb/commons/cli/fsdb_clean_images_metadata.py
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | |