Edited Readme.md to match the current development. Some parameters were added and minor behaviour changes.

This commit is contained in:
Marcus Scholz 2020-03-22 13:13:15 +01:00
parent 3987d484ad
commit 77cb2c9f45
1 changed files with 33 additions and 21 deletions

View File

@ -6,7 +6,7 @@ It can scan a couple of images, extract their Exif-tags, and compare the `DateTi
It can parse a .his (CSV) file from a [GeigerLog](https://sourceforge.net/projects/Geigerlog/) file export and calculate the radiation in µS/h using the factor in `sifactor`.
Furthermore it can optionally read a gpx-file, compare the timestamps to 'DateTimeOriginal' and determine closest-matching latitude / longitude. If your gpx-file has times stored including the timezone, you can set --timezone to the local timezone, your camera / geiger counter ran at.
It can optionally read a gpx-file, compare the timestamps to 'DateTimeOriginal' and determine closest-matching latitude / longitude / altitude. Timestamps in GPX files are ususally stored in UTC timezone, you can set --timezone to match the local timezone, your camera / geiger counter ran at.
It then creates a `UserComment` with the actual measured radiation at the time the photo has been taken and writes the geocoordinates into the appropiate Exif tags.
@ -19,8 +19,9 @@ Right now it depends on the following non-core Python 3 libraries:
* [gpxpy](https://github.com/tkrajina/gpxpy) gpx-py is a python GPX parser. GPX (GPS eXchange Format) is an XML based file format for GPS tracks.
## Requirements
* A bunch of images (jpg, cr2, etc.) with its time of creation stored in `DateTimeOriginal`.
* GeigerCounter log file in csv format as it is being exported by the software GeigerLog.
* A bunch of images (jpg, cr2, etc.) with its time of creation stored in `DateTimeOriginal`
* Optionally a GPX (1.0 / 1.1) track that has been recorded during the same timeperiod.
All sources are matched by their timestamp, so all sources have to be recorded during the same time (and timezone). The Geiger counter has to log a value every second, as the script compares the timestamps exactly.
@ -34,9 +35,8 @@ These exported .his files look like this:
## Usage
```
usage: rad_tag.py [-h] [-si SIFACTOR] [-tz Timezone] [-d] [-g GPX]
[-o OUTDIR]
CSV Photo [Photo ...]
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 tags of given photos.
@ -52,7 +52,9 @@ optional arguments:
0.0065)
-tz Timezone, --timezone Timezone
Manually set timezone of CSV / and Photo timestamp,
defaults to localtime if omitted. (default: None)
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)
@ -62,26 +64,33 @@ optional arguments:
```
### Examples
Use test.hisdb.his from current working dir and modify (overwrite) all .CR2 files in place.
Use test.hisdb.his and walk.gpx from testdata and modify (overwrite) all .JPG files in place.
```
./rat_tag.py test.hisdb.his *.CR2
./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 Exif UserComment
DSC_0196.JPG 2020-03-03 18:33:33 NOT FOUND!
DSC_0197.JPG 2020-03-03 20:14:18 Radiation ☢ 0.15 µS/h
DSC_0198.JPG 2020-03-03 22:18:13 Radiation ☢ 0.07 µS/h
```
Use test.hisdb.his in folder 'testdata', read all .JPG files from 'testsource' and write them to 'testdest'.
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
```
./rad_tag.py testdata/test.hisdb.his -o testdest/ testsource/*.JPG
Modifying photos in testdest/ (copy)
filename date / time Exif UserComment
DSC_0196.JPG 2020-03-03 18:33:33 NOT FOUND!
DSC_0197.JPG 2020-03-03 20:14:18 Radiation ☢ 0.15 µS/h
DSC_0198.JPG 2020-03-03 22:18:13 Radiation ☢ 0.07 µS/h
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
```
## GeigerLog setup
@ -116,6 +125,9 @@ GeigerLog now presents you a rendering of the radiation over time in its main wi
Once imported, you can export the history into a hisdb.his-file, which is basically the CSV-file `rad_tag.py` can process. Choose 'History' -> Save History Data into .his file (CSV)'.
## GPS setup
Especially if you use a mobile phone for GPS-logging. Take care, the app can use GPS when turned off, and let it write position sufficiently often. Threshold is 5 minutes by default, but precision will improve when logging more often. Especially "inactivity detection" might become a problem, when staying at one place for a period of time.
## future possibilities