Table of Contents
How to use rad-tag
Depending on your photo-workflow you can tag your photos before or after processing. I described my workflow here (in German). It works on .jpg files as well as on camera raw files - if exiv2 supports that files.
Only CSV filename and Photo(s) are positional arguments, but you should really set the timezone with
-tz
if it differs from utc - if you are going to also read a GPX file with--gpx FILE
.
Default operation mode is to work on the given set of Photos without dry mode. Be careful to not overwrite tags you did not want to get changed. Especially use --dry
mode when you are still trying to figure things out. It might also be worth a thought to write the tags to copies in another directory, check out --outdir OUTDIR
If your specific geiger counter counts different than 1 CP/M = 0.0065µS/h you can set that specific factor with the option --sifactor
.
On screen help
When you start rad-tag.py -h
you are prompted the quick help which shows all available mandatory and optional arguments:
usage: rad_tag.py [-h] [-si SIFACTOR] [-tz Timezone] [-d] [-g GPX] [-o OUTDIR]
CSV Photo [Photo ...]
A unix-tyle tool that extracts GPS and/or radiation data from GPX/CSV files
and writes them into the Exif/ITPC/XMP tags of given photos.
positional arguments:
CSV Geiger counter history file in CSV format.
Photo One or multiple photo image files to process.
optional arguments:
-h, --help show this help message and exit
-si SIFACTOR, --sifactor SIFACTOR
Factor to multiply recorded CPM with. (default:
0.0065)
-tz Timezone, --timezone Timezone
Manually set timezone of CSV / and Photo timestamp,
defaults to UTC if omitted. This is useful, if the
GPS-Logger saves the time incl. timezone (default:
utc)
-d, --dry Dry-run, do not actually write anything. (default:
False)
-g GPX, --gpx GPX GPS track in GPX format (default: None)
-o OUTDIR, --outdir OUTDIR
Directory to output processed photos. (default: .)
Examples
Use test.hisdb.his and walk.gpx from testdata and modify (overwrite) all .JPG files in place.
./rad_tag.py ./testdata/walk.hisdb.his --gpx .d/testdata/walk.gpx -tz Europe/Berlin ./testdest/*.JPG
Modifying photos in place (overwrite)
filename date / time Matched Data
_MG_3824.JPG 2020-03-15 16:17:54+01:00 ☢: 0.05µS/h Lat.: 51.92611112 Long.: 7.69379252 Alt.: 93.0m
_MG_3825.JPG 2020-03-15 16:18:12+01:00 ☢: 0.08µS/h Lat.: 51.92620192 Long.: 7.69360727 Alt.: 91.7m
_MG_3826.JPG 2020-03-15 16:18:12+01:00 ☢: 0.08µS/h Lat.: 51.92620192 Long.: 7.69360727 Alt.: 91.7m
_MG_3827.JPG 2020-03-15 16:18:12+01:00 ☢: 0.08µS/h Lat.: 51.92620192 Long.: 7.69360727 Alt.: 91.7m
Use test.hisdb.his in folder 'testdata', read all files from 'testsource' and write them to 'testdest'.
./rad_tag.py ./testdata/walk.hisdb.his -o ./testdest --gpx ./testdata/walk.gpx -tz Europe/Berlin ./testsource/*
Modifying photos in /home/mscholz/testdest (copy)
filename date / time Matched Data
DSC_0226.JPG 2020-03-15 15:02:04+01:00 ☢: N/A Lat.: N/A, Long.: N/A Alt.: N/A
DSC_0227.JPG 2020-03-15 15:11:43+01:00 ☢: N/A Lat.: N/A, Long.: N/A Alt.: N/A
_MG_3804.JPG 2020-03-15 15:59:11+01:00 ☢: 0.06µS/h Lat.: 51.92582544 Long.: 7.68739496 Alt.: 95.4m
_MG_3805.CR2 2020-03-15 16:01:49+01:00 ☢: 0.05µS/h Lat.: 51.92314108 Long.: 7.69078156 Alt.: 104.2m
_MG_3805.JPG 2020-03-15 16:01:49+01:00 ☢: 0.05µS/h Lat.: 51.92314108 Long.: 7.69078156 Alt.: 104.2m
_MG_3807.CR2 2020-03-15 16:07:02+01:00 ☢: 0.08µS/h Lat.: 51.9235013 Long.: 7.69250565 Alt.: 101.3m
_MG_3807.JPG 2020-03-15 16:07:02+01:00 ☢: 0.08µS/h Lat.: 51.9235013 Long.: 7.69250565 Alt.: 101.3m