Repository navigation
Usage and Workflow
python3 m8raw2dng2.py [options] [files-or-folders ...]
-
-i <path>input file or folder (default: current folder) -
-o <path>output folder (default: alongside the input)
Bare conversion is byte-identical to the original tool (bar the estimated
FNumber); every refinement is
opt-in. Full switch list in Flags Reference.
Prefer no Python? The standalone Mac/Windows app on each release runs this same workflow through the GUI; see Installation to get and unlock it.
Two convenience launchers ship with the tool:
-
m8raw2dng2_run.bat(Windows) -
m8raw2dng2_run.command(macOS - may needchmod +xand a Gatekeeper right-click Open the first time; see Installation)
Open either in a text editor and set the variables near the top:
-
INPUT- the RAW folder (or a single.RAW/.DNG) -
OUTPUT- leave blank to write DNGs beside the input -
FLAGS- the option string (default-v -p -b -s --no-crop --cfa RGGB); see Flags Reference -
PYTHON-python/python3, or a full path if Python is not onPATH
Keep the launcher beside m8raw2dng2.py (and your lensdb.ini / sensdb.ini).
Copy it once per recipe you use often - e.g. m8_convert, m8_darkfield,
m8_calibrate - each with its own FLAGS.
A complete setup is three one-time calibrations plus the everyday convert. You can skip straight to converting - the calibrations are refinements.
Build a per-body darkfield so -s can flatten fixed-pattern column structure.
Shoot several dark frames at base ISO with the lens cap on, then:
python3 m8raw2dng2.py -sd -i ./darkframes
-sd accepts a whole folder of dark frames and auto-selects the clean, fast,
low-ISO ones, averaging them for a less noisy darkfield. It writes
LevelCorrection values into sensdb.ini keyed by body serial. Add --auto-lines
to also detect defect columns and record them as Line entries. See
Databases and The Math.
To find bad columns, paint the configured/auto-detected ones white and inspect:
python3 m8raw2dng2.py -st -i ./frame.RAW
Detected columns are stored as Line entries in sensdb.ini and repaired by
neighbour interpolation on every -s conversion.
When you read a bad column's position from a pixel viewer and enter it as a Line
by hand, add 2 to every x and y: the RAW carries a 2-px border that the cropped
DNG drops (RAW 3968x2646, DNG 3964x2642), so RAW coordinates sit 2 px off the DNG
coordinates you measured.
--auto-repair re-detects columns per image as well, but use it on dark /
calibration frames only - on a lit photo it mistakes scene structure for defects
and smears real columns. Normal shots need only plain -s, which repairs the
stored Line entries regardless.
For an un-coded lens the M8 records no aperture. Calibrate once so every later conversion recovers the true aperture from the meters:
python3 m8raw2dng2.py --calibrate-fnumber 2.8,4,5.6,8,11 -l 000110 f1.RAW f2.RAW f3.RAW f4.RAW f5.RAW
Shoot anything (auto exposure is fine) at the listed apertures, in filename order.
The derived MeterOffset (and cross-check ImageCalib) is stored in sensdb.ini
under the body serial. 5-10 frames, once per (body, lens). See The Math.
Everyday conversion with lens EXIF, sensor fixes, preview, recursion and a self-check:
python3 m8raw2dng2.py -v -p -l 000110 -s -R --verify -i ./in -o ./out
If a .BIA sidecar sits next to a .RAW (same stem), it is read as another raw
frame, subtracted from the CFA, clamped, and BlackLevel is forced to 0. This is
automatic whenever the sidecar is present. It corrects the per-exposure dark
pedestal on long exposures. See The Math.
python3 m8raw2dng2.py --probe ./frame.RAW # report geometry, write nothing
python3 m8raw2dng2.py --dry-run -i ./in # list what would be done
# verbose, embed previews, one folder
python3 m8raw2dng2.py -v -p -i ./in -o ./out
# byte-faithful single file with an exact aperture
python3 m8raw2dng2.py -v -A 2.0 -i ./frame.RAW -o ./out
# standard-DNG layout so macOS Finder shows thumbnails
python3 m8raw2dng2.py -p --legacy-preview -i ./in -o ./out