Engine commands

On this page

Everything FloraStack does is one of these commands: the desktop app’s buttons and menus, the command-line tool’s subcommands, the command palette (Ctrl+K), MCP tools, the desktop control channel and the Python package’s Project.run all call them. Each takes its parameters as a JSON object and returns a JSON object. florastack-cli run runs them on a project, and florastack-cli commands prints this list as JSON, with the complete schemas. Automation, MCP and Python shows how to call them.

  • A query reads and returns at once; an instant command changes the session and returns; a job runs in the background, on one of the engine’s lanes, and returns its result when it ends.
  • An undoable command’s changes to the project are one undo step.
  • Parameters left out keep their defaults; unknown parameters are refused.
AreaCommands
alignalign.get, align.info, align.reset, align.run, align.set, align.sortByScale
annotationannotation.get, annotation.set
batchbatch.run
cachecache.info, cache.removeAbandoned, cache.setFolder
calibrationcalibration.get, calibration.set
capturecapture.calculate, capture.camera, capture.info, capture.rail, capture.run
computecompute.info, compute.set, compute.test
defectsdefects.clear, defects.detect, defects.export, defects.import, defects.info
developdevelop.get, develop.reset, develop.set
editedit.history, edit.redo, edit.undo
exportexport.estimate, export.get, export.reproduce, export.reset, export.run, export.set
filmstripfilmstrip.list, filmstrip.update
jobjob.cancel, job.list
outputoutput.list, output.remove, output.rename, output.save
parallaxparallax.animate, parallax.mesh, parallax.preview, parallax.stereo
presetpreset.apply, preset.list, preset.read, preset.save
projectproject.addFrames, project.checkFrames, project.close, project.findOrphans, project.findStacks, project.frames, project.info, project.moveFrames, project.new, project.open, project.removeFrames, project.rename, project.save, project.saveAs, project.setFramesEnabled, project.trashOrphans
retouchretouch.addLayer, retouch.cancelPaint, retouch.close, retouch.mapFocus, retouch.open, retouch.paint, retouch.removeLayer, retouch.setLayerVisible, retouch.setSource, retouch.sharpest, retouch.stroke
stackstack.average, stack.depthMap, stack.get, stack.preview, stack.pyramid, stack.reset, stack.set, stack.slabbed, stack.threshold
watchwatch.run

align

align.get

Alignment settings. The stack’s alignment, ordering, framing and focus settings.

Every setting, with the keys the preferences don’t set at their defaults: which terms are corrected and their limits, the processing order (automatic_order, reverse_order), the output’s framing (narrow, wide or common) and the out-of-focus threshold (min_sharp_fraction).

RunsUndoableRequiresChanges
QueryNoAn open projectNothing

Parameters: none.

Result:

NameTypeDescription
settingsobjectEvery setting, with the defaults filled in.

Example:

{}

align.info

Alignment. The stack’s alignment as the project holds it: each frame’s, the processing order and the output’s framings.

For each aligned frame: its transform from the master’s pixels and its terms (scale, rotation, shift), its brightness gain and score, its status and flags, its sharp-content fraction and what moved in it against its neighbor. For the run: the master, the frames’ size, the narrow end, the processing order and the settings it ran with. For each framing (narrow, wide, common): the size of the output it gives and the transform from its pixels to the master’s, or why the frames can’t be framed that way; framing is the one the settings choose.

RunsUndoableRequiresChanges
QueryNoAn open projectNothing

Parameters: none.

Result:

NameTypeDescription
alignedbooleanWhether the project holds an alignment run.
framing"narrow" | "wide" | "common"The framing the settings choose.
runobjectThe run, when there is one.

Example:

{}

align.reset

Reset alignment settings. Puts every alignment setting back at its default.

RunsUndoableRequiresChanges
InstantYesA project open for editingThe project or the session

Parameters: none.

Result:

NameTypeDescription
settingsobjectEvery setting, with the defaults filled in.

Example:

{}

align.run

Align frames. Aligns the enabled frames and orders the stack from its narrow end.

Reads and develops every enabled frame in turn and aligns each to its neighbor, correcting the terms the settings say. Then the end of the stack with the narrower field of view becomes its start, and its frame the master that the others are aligned to (unless automatic_order is off, or reverse_order on), and every frame’s sharp-content fraction is measured: the frames with no in-focus detail are flagged out-of-focus, for you to disable with project.setFramesEnabled. Frames that aren’t enabled lose any alignment they had. The result lists the master, the order and the flagged and rejected frames; align.info has every frame’s details. Runs as a job; the alignment is recorded in one undo step when it ends, or not at all when it is cancelled.

RunsUndoableRequiresChanges
Job, on the heavy laneYesA project open for editingThe project or the session

Parameters: none.

Result:

NameTypeDescription
defectsobjectThe defect mask this run detected and inpainted, when the settings asked for one (detect_defects) and the project had none.
frameOrderarray of integerAfter sorting by scale: the project’s frame order now.
masterintegerThe frame the others are aligned to, which the output is framed on.
movedarray of integerThe frames in which part of the subject moved against their neighbor: filmstrip.list shows where.
narrowEnd"first" | "last" | nullThe end of the stack with the narrower field of view, when the frames’ scales tell.
orderarray of integerThe aligned frames, in the order the stack is processed.
outOfFocusarray of integerThe frames with no in-focus detail: flagged for you to disable.
rejectedarray of integerThe frames whose alignment couldn’t be trusted, and keep their neighbor’s (align.info says why).
start"first" | "last"The end the stack is processed from.

Example:

{}

align.set

Set alignment settings. Changes some of the stack’s alignment, ordering, framing and focus settings.

Only the keys given change, as when a preset is applied: {"framing": "wide"} keeps the widest field of view and leaves the rest as it is. The result is checked whole, and a misspelled key is an error. The framing applies at once, since it follows from the stored alignment (align.info); the other settings apply when the stack is next aligned.

RunsUndoableRequiresChanges
InstantYesA project open for editingThe project or the session

Parameters:

NameTypeDescription
automatic_orderbooleanProcess the stack from the end with the narrower field of view, found from the scales of its first and last frames: the frames are aligned to that end’s frame, and with the default framing every pixel of the output is covered by every frame. Off, the stack is processed from its first frame. Default: true.
brightnessbooleanMatch each frame’s brightness to the master’s with a gain. Default: true.
detect_defectsbooleanBefore aligning, when the project has no defect mask, detect one from the frames (dust and hot pixels, which stay at the same sensor pixels) and inpaint it in every frame. Off by default: review a detected mask before stacking with it (defects.rs). A mask the project has, detected or supplied, is always inpainted. Default: false.
framing"narrow" | "wide" | "common"The output’s field of view: narrow crops to the narrow end’s (every frame covers it), wide keeps the widest, marking what each frame doesn’t cover in its coverage mask, and common crops to what every frame covers once aligned. Default: "narrow".
max_rotationnumber, from 0.0 to 45.0The largest rotation relative to the master, in degrees, from 0 to 45. Default: 5.0.
max_scalenumber, from 0.0 to 50.0The largest change of scale relative to the master, in percent, from 0 to 50. Default: 15.0.
max_shiftnumber, from 0.0 to 50.0The largest shift relative to the master, in percent of the frame’s width horizontally and of its height vertically, from 0 to 50. Default: 10.0.
min_motionnumber, from 0.1 to 100.0The smallest local movement flagged, in pixels of the frames, from 0.1 to 100: a region of a frame that moved at least this much against its neighbor, once aligned, is marked in its motion map, and a frame with such a region is flagged as moved (motion.rs). Movement is measured on a level of at most 1024 pixels, and below three quarters of a pixel there it can’t be told from the apparent motion of defocus and noise: on larger frames, the threshold is at least that many frame pixels (4.4 on a 6000-pixel frame). Default: 2.0.
min_scorenumber, from 0.0 to 1.0The lowest score at which a frame counts as matched, from 0 to 1: the correlation of the frame’s band-passed luminance with its reference’s once aligned. On the synthetic test stacks, neighbors score above 0.9 and a frame of another scene near 0. Default: 0.3.
min_sharp_fractionnumber, from 0.0 to 1.0A frame is flagged as out of focus when its sharp-content fraction, the share of the stack’s in-focus detail on which it is among the sharpest frames, is less than this, from 0 to 1 (0 flags none). Such frames, common at the start and the end of a stack, add nothing but blur; they are only flagged, for the user to exclude. Default: 0.002.
refinebooleanAfter chaining each frame to its neighbor, align it again directly against the master, starting from the chained estimate, so that the small errors of a long chain don’t add up. The direct estimate is kept only when it scores at least min_score: frames focused far from the master share little detail with it, so this helps shallow stacks of similar frames most. Default: false.
rejectbooleanReject the frames whose alignment hit a limit, scored below min_score or found no match: a rejected frame keeps the transform of the frame it was compared with, and the next frame is aligned to the last frame that wasn’t rejected. Off, such frames are only flagged. Default: true.
resolutioninteger, from 64 to 16384The longer side, in pixels, of the finest level alignment works at, from 64 to 16384: larger frames are reduced to it first. Alignment is sub-pixel at that level, so higher values cost time for little gain. Default: 2048.
reverse_orderbooleanProcess the stack from the other end: from its wide end with automatic_order, from its last frame without. Default: false.
rotationbooleanCorrect rotation. Default: true.
scalebooleanCorrect changes of scale: focus breathing, or the magnification a rail changes as it moves. Default: true.
shift_xbooleanCorrect horizontal shifts. Default: true.
shift_ybooleanCorrect vertical shifts. Default: true.

Result:

NameTypeDescription
settingsobjectEvery setting, with the defaults filled in.

Examples:

{"framing":"wide"}
{"brightness":false,"rotation":false}
{"automatic_order":false,"min_sharp_fraction":0.005,"reverse_order":true}

align.sortByScale

Sort frames by scale. Puts the enabled frames in the order of their scale, then aligns them in that order.

Repairs a stack shot or imported out of order. Focus breathing, or a rail, changes the magnification steadily with the focus, so the frames’ scales give their focus order. A first pass aligns the frames as they are, to measure their scales; the frames are then sorted by scale, in the direction that keeps the stack’s present trend, and aligned again in that order, as align.run does. Disabled frames keep their places in the list. Fails, changing nothing, when the scales differ too little to sort by. Runs as a job, which reads every frame twice; the new order and the alignment are one undo step.

RunsUndoableRequiresChanges
Job, on the heavy laneYesA project open for editingThe project or the session

Parameters: none.

Result:

NameTypeDescription
defectsobjectThe defect mask this run detected and inpainted, when the settings asked for one (detect_defects) and the project had none.
frameOrderarray of integerAfter sorting by scale: the project’s frame order now.
masterintegerThe frame the others are aligned to, which the output is framed on.
movedarray of integerThe frames in which part of the subject moved against their neighbor: filmstrip.list shows where.
narrowEnd"first" | "last" | nullThe end of the stack with the narrower field of view, when the frames’ scales tell.
orderarray of integerThe aligned frames, in the order the stack is processed.
outOfFocusarray of integerThe frames with no in-focus detail: flagged for you to disable.
rejectedarray of integerThe frames whose alignment couldn’t be trusted, and keep their neighbor’s (align.info says why).
start"first" | "last"The end the stack is processed from.

Example:

{}

annotation

annotation.get

Annotation layers. Lists an output’s non-destructive annotation layers.

RunsUndoableRequiresChanges
QueryNoAn open projectNothing

Parameters:

NameTypeDescription
outputintegerRequired. Output ID from output.list.

Result:

NameTypeDescription
layersarray of object

Example:

{"output":3}

annotation.set

Set annotation layers. Replaces an output’s annotation layers in one undo step.

Layers are rendered onto exported copies only. Scale bars use the export’s pixels_per_micrometer calibration; automatic lengths use 1, 2 or 5 times a power of ten. Text positions are fractions of the output size. Hidden layers stay saved. An empty list removes every layer.

RunsUndoableRequiresChanges
InstantYesA project open for editingThe project or the session

Parameters:

NameTypeDescription
layersarray of objectRequired. Complete layer list, bottom first, at most 256 layers.
outputintegerRequired. Output ID from output.list.

Result:

NameTypeDescription
layersarray of object

Example:

{"layers":[{"annotation":{"kind":"scale-bar"},"name":"Scale","textSize":16,"visible":true,"white":true}],"output":3}

batch

batch.run

Process batch. Queues stacks as separate projects, exports their outputs and writes a summary CSV.

Immediate subfolders are stacks; a folder with images directly inside is auto-split with project.findStacks. Mixed layouts are refused. Each stack receives the preset, a TOML file or a built-in one as builtin:<id> (preset.list), including depth-map contrast thresholds; each output is exported as the preset’s output settings say (export.run: a 16-bit TIFF unless they say otherwise, with the maps and aligned frames they ask for), the template’s extension giving way to their format’s. Failures are recorded and the queue continues. Outputs and projects are staged until the cancellable work ends, then published without replacing existing files. summary.csv lists stack, frames, method, time in seconds, warnings, project, output and error. Templates accept {stack}, {method}, {range}, {first}, {last}, {date} (UTC YYYY-MM-DD), and {params} (the method’s effective settings).

RunsUndoableRequiresChanges
Job, on the heavy laneNoNothingFiles outside the project

Parameters:

NameTypeDescription
inputstringRequired. The folder of stack folders, or one folder of frames to auto-split.
method"pyramid" | "depth-map" | "average"Method to run for each stack; pyramid by default. Default: "pyramid".
outputstringRequired. Destination for individual projects, TIFFs and summary.csv; existing entries are refused.
presetstringRequired. TOML preset applied to each project, including its depth-map contrast threshold; or a built-in one as builtin:<id> (preset.list).
splitobjectBoundary detection settings for a flat folder; omitted settings use their defaults. Default: {"gap":null,"maxScaleStep":5.0,"maxShift":10.0,"minScore":0.3,"minSimilarity":0.9}.
split.gapnumber, at least 0.0A gap in capture time longer than this, in seconds, cuts the batch; None chooses it from the batch: 30 s or 8 times its median gap, whichever is longer.
split.maxScaleStepnumber, from 0.0 to 50.0A change of scale between matching neighbors beyond this, in percent, is a new framing. Default: 5.0.
split.maxShiftnumber, from 0.0 to 50.0A shift between matching neighbors beyond this, in percent of the frame’s diagonal, is a new framing. Default: 10.0.
split.minScorenumber, from 0.0 to 1.0Neighbors that match with a lower score than this, from 0 to 1, and aren’t similar, are of different scenes. Default: 0.3.
split.minSimilaritynumber, from -1.0 to 1.0Neighbors whose low-passed luminance correlates less than this, from -1 to 1, and that don’t match, are of different scenes. Default: 0.9.
templatestringA TIFF filename with {stack}, {method}, {range}, {first}, {last}, {date} and {params} tokens. Default: "{stack}-{method}-{range}.tif".

Result:

NameTypeDescription
failedintegerNumber of failed entries; a CLI reports failure when nonzero.
stacksarray of objectEach queue entry, in processing order.
summarystringThe CSV summary file.

Examples:

{"input":"C:/Stacks","output":"C:/Results","preset":"C:/Presets/macro.toml"}
{"input":"C:/Stacks","output":"C:/Results","preset":"builtin:insect-macro"}

cache

cache.info

Cache sizes. How much the caches take: temporary projects, spilled tiles and the open project’s cache.

Walks the folders and adds up their files: the temporary projects’ folder (unnamed projects, which orphan cleanup moves to the trash once they are old), the tile folder (tiles of running stacks, and those crashed runs left), and the open project’s cache/ and previews/ folders (results kept so that nothing is computed twice; cleaned of what the project no longer refers to when it closes).

RunsUndoableRequiresChanges
QueryNoNothingNothing

Parameters: none.

Result:

NameTypeDescription
projectobjectThe open project’s cache/ and previews/ folders; none without a project.
temporaryProjectsobjectTemporary projects; none when the engine has no folder for them.
tilesobjectTiles of running stacks, and of crashed runs. In the system’s temporary directory, only FloraStack’s tile folders count.

Example:

{}

cache.removeAbandoned

Remove abandoned tile files. Removes the tile folders that crashed runs left in the tile folder.

Stacks keep their accumulators’ tiles in a folder of the tile folder (the system’s temporary directory unless compute.set chose another) when they exceed their memory budget, and remove it when they end; a run that crashes leaves it behind. This removes every such folder that no run holds and that hasn’t changed for a minute (a folder from before tile folders had locks, once it is a day old). They hold nothing a run can use again, so they are deleted, not moved to the trash. The desktop app runs this at startup.

RunsUndoableRequiresChanges
InstantNoNothingFiles outside the project

Parameters: none.

Result:

NameTypeDescription
folderstringThe folder looked in: the tile folder.
removedarray of string

Example:

{}

cache.setFolder

Set cache folder. Puts temporary projects and spilled tiles in a folder of your choice.

Temporary projects go into projects and spilled tiles into tiles under folder, made if they don’t exist, for projects and stacks started from now on: a project open now stays where it is. A fast local drive with room to spare is best. For this engine; it isn’t stored in the project.

RunsUndoableRequiresChanges
InstantNoNothingFiles outside the project

Parameters:

NameTypeDescription
folderstringRequired. The folder: temporary projects go into its projects folder, spilled tiles into its tiles folder.

Result:

NameTypeDescription
projectobjectThe open project’s cache/ and previews/ folders; none without a project.
temporaryProjectsobjectTemporary projects; none when the engine has no folder for them.
tilesobjectTiles of running stacks, and of crashed runs. In the system’s temporary directory, only FloraStack’s tile folders count.

Example:

{"folder":"D:/FloraStack cache"}

calibration

calibration.get

Calibration profiles. Lists the user’s objective and magnification calibrations.

RunsUndoableRequiresChanges
QueryNoNothingNothing

Parameters: none.

Result:

NameTypeDescription
profilesarray of objectThe full library, at most 64 uniquely named calibrations. An empty list removes the library.

Example:

{}

calibration.set

Save calibration profiles. Replaces the user’s library of calibration profiles.

The library is saved as calibrations.json beside the host’s temporary-projects folder, independently of projects and presets. Select a profile in the Export tab to copy its value into that project’s export settings. Editing the library then leaves existing measurements reproducible.

RunsUndoableRequiresChanges
InstantNoNothingFiles outside the project

Parameters:

NameTypeDescription
profilesarray of objectRequired. The full library, at most 64 uniquely named calibrations. An empty list removes the library.

Result:

NameTypeDescription
profilesarray of objectThe full library, at most 64 uniquely named calibrations. An empty list removes the library.

Example:

{"profiles":[{"name":"10x","pixelsPerMicrometer":2.5}]}

capture

capture.calculate

Calculate rail step. Recommends diffraction-based physical rail spacing and explains sensor sampling.

Uses 550 nm light, air, pupil ratio 1, N_eff=N(1+m), NA=m/(2 N_eff), wave depth=λ/NA² and 50% overlap. Pixel pitch assesses Airy-disk sampling, not a circle of confusion. Approximate paraxial model; see book/src/user/capture.md. Motor pulses cannot be converted to this spacing.

RunsUndoableRequiresChanges
QueryNoNothingNothing

Parameters:

NameTypeDescription
aperturenumber, from 0.5 to 64Required. Marked f-number at infinity, before extension (not the camera’s effective f-number).
magnificationnumber, from 0.01 to 100Required. Image size divided by object size, e.g. 1 for 1:1 macro.
pixelPitchnumber, from 0.1 to 100Required. Sensor pixel spacing in micrometers.

Result:

NameTypeDescription
airyDiameterPixelsnumber
depthMicrometersnumber
effectiveAperturenumber
explanationstring
stepMicrometersnumber

Example:

{"aperture":4,"magnification":1,"pixelPitch":4}

capture.camera

Control camera. Discovers, connects or operates a supported camera on a device worker.

Actions: discover, connect (exactly one camera), disconnect, liveView (returns a temporary JPEG path), focus (signed unit pulses), markNear, markFar, invalidateMarks. Marks exist only within this connection and count relative commands, not absolute optical positions. Disable continuous autofocus and do not touch the focus ring; invalidate marks whenever uncertain. A focus error invalidates both marks. gphoto on Linux/macOS only; other builds use the watch-folder workflow.

RunsUndoableRequiresChanges
Job, on the device laneNoNothingFiles outside the project

Parameters:

NameTypeDescription
action"discover" | "connect" | "disconnect" | "liveView" | "focus" | "markNear" | "markFar" | "invalidateMarks"Required. discover, connect, disconnect, liveView, focus, markNear, markFar or invalidateMarks.
pulsesinteger, from -10000 to 10000Signed unit motor pulses for focus only; positive moves toward far. Default: 0.

Result:

NameTypeDescription
devicesarray of string
focusobjectSession-relative focus marks. Manual focus, autofocus, reconnects and any movement error invalidate both marks.
pathstring

Examples:

{"action":"discover"}
{"action":"focus","pulses":1}

capture.info

Capture devices. Reports connected devices, capabilities and relative lens marks.

Does no device I/O; reports busy while a worker owns the devices. Camera control requires a gphoto build on Linux or macOS. Manual focus or autofocus invalidates relative marks: use invalidateMarks before marking again.

RunsUndoableRequiresChanges
QueryNoNothingNothing

Parameters: none.

Result:

NameTypeDescription
busyboolean
cameraobject
cameraControlboolean
focusobjectSession-relative focus marks. Manual focus, autofocus, reconnects and any movement error invalidate both marks.
railboolean

Example:

{}

capture.rail

Control rail. Lists serial ports, connects a rail, moves it or stops it.

Actions: ports, connect (settings required), disconnect, move (micrometers), stop. Establish a safe physical zero before connecting and set the travel limit accordingly. Marlin uses relative X millimeters and M400; Arduino uses calibrated integer steps. Stop is best-effort, invalidates position and requires reconnect; use job.cancel for an active device job, which stops at its next I/O checkpoint. Zaber ASCII is explicitly unavailable. No proprietary protocols are inferred.

RunsUndoableRequiresChanges
Job, on the device laneNoNothingFiles outside the project

Parameters:

NameTypeDescription
action"ports" | "connect" | "disconnect" | "move" | "stop"Required. ports, connect, disconnect, move or stop.
micrometersnumber, from -1000000 to 1000000Signed displacement for move only, in micrometers from the current position. Default: 0.0.
settingsobjectRequired only for connect; origin must already be physically established.
settings.baudinteger, from 1200 to 1000000Required. Firmware baud rate (8 data bits, no parity, one stop bit).
settings.feednumber, from 0.01 to 10000Required. Marlin feed rate, millimeters per minute.
settings.micrometersPerStepnumber, from 0.001 to 10000Required. Calibrated micrometers per full controller step, used for Arduino MOVE quantization.
settings.portstringRequired. Serial device, e.g. COM3 or /dev/ttyACM0.
settings.protocol"marlin" | "arduino" | "zaber-ascii"Required. Explicit firmware dialect; not auto-detected.
settings.timeoutMsinteger, from 100 to 3600000Required. Timeout for one completed movement or shutter operation, milliseconds.
settings.travelMicrometersnumber, from 0.001 to 1000000Required. Maximum absolute displacement from the connection’s user-established zero, in micrometers.

Result:

NameTypeDescription
devicesarray of string
focusobjectSession-relative focus marks. Manual focus, autofocus, reconnects and any movement error invalidate both marks.
pathstring

Examples:

{"action":"ports"}
{"action":"move","micrometers":50}

capture.run

Capture and stack. Shoots a lens or rail sequence into the watched folder while stacking previews.

Requires an empty input folder, output outside it and a preset. mode=rail takes frames photos separated by stepMicrometers after settling; mode=lens takes frames photos including both relative near/far marks (frames-1 intervals). Trigger=camera downloads each original atomically with a unique filename; controller sends DIY SHUTTER then waits for external ingest; external waits for a new readable frame before advancing. External/controller workflows require one photo per position and frameTimeoutMs greater than exposure plus transfer/processing time. Managed completion overrides watch.idleSeconds while shooting. On cancellation or failure, stops further movement/shots, joins hardware work and keeps completed originals. A blocking libgphoto2 call finishes before cancellation can stop the next operation; final stack publication is atomic as for watch.run.

RunsUndoableRequiresChanges
Job, on the device laneNoNothingFiles outside the project

Parameters:

NameTypeDescription
frameTimeoutMsinteger, from 100 to 3600000External/controller timeout per new ingested frame, including exposure, transfer and preview processing. Default: 120000.
framesinteger, from 2 to 10001Required. Number of photos; lens mode includes both marked endpoints (frames-1 intervals).
mode"rail" | "lens"Required. rail for physical spacing, lens for relative near/far motor marks.
settleMsinteger, from 0 to 60000Vibration settling after completed movement, milliseconds. Default: 300.
stepMicrometersnumber, from -1000000 to 1000000Signed physical spacing in micrometers for rail mode; zero for lens mode. Default: 0.0.
trigger"camera" | "controller" | "external"Required. camera downloads, controller triggers the DIY shutter, external waits for a tethered image.
watchobjectRequired. Watch-folder ingest, preview, preset and final output settings. idleSeconds applies only after shooting ends.
watch.idleSecondsnumber, from 0.1 to 86400Seconds without a new or changed frame before finalization; waits at least settleMs too. Default: 5.0.
watch.inputstringRequired. Folder populated by a tethered camera or its capture application.
watch.method"pyramid" | "depth-map" | "average"Method used for the running preview and the final output. Default: "pyramid".
watch.outputstringRequired. Folder for the saved project, TIFF and summary.csv, outside input.
watch.pollMsinteger, from 10 to 5000Maximum milliseconds between directory scans, including when native events are unavailable. Default: 250.
watch.presetstringRequired. TOML preset, including contrast thresholds for unattended depth-map runs; or a built-in one as builtin:<id>.
watch.settleMsinteger, from 50 to 60000Milliseconds a file’s size and modification time must remain unchanged before decoding. Default: 1000.
watch.templatestringA portable image filename; accepts batch.run’s template tokens, its extension following the preset’s format. Default: "{stack}-{method}-{range}.tif".

Result:

NameTypeDescription
failedintegerNumber of failed entries; a CLI reports failure when nonzero.
stacksarray of objectEach queue entry, in processing order.
summarystringThe CSV summary file.

Example:

{"frames":10,"mode":"rail","stepMicrometers":50,"trigger":"external","watch":{"input":"C:/Capture","output":"C:/Results","preset":"builtin:insect-macro"}}

compute

compute.info

Compute device. Which device stacks, the GPU or the CPU, and why, and how much memory stacking may use.

The compute preference (auto, cpu or gpu), the device it chose (gpu or cpu) with the GPU’s adapter, or the reason the CPU stacks, and the GPU memory budget of a stack’s accumulators. The first call in a process (or the first stack) probes the GPU: a device on the best adapter, every kernel compiled, and a self-test against the CPU’s results; with auto a software adapter isn’t taken. memory: the memory a stack’s working data may take on the host (beyond it, tiles go to the tile folder on disk), the memory installed, and the budget suggested for this machine.

RunsUndoableRequiresChanges
QueryNoNothingNothing

Parameters: none.

Result:

NameTypeDescription
adapterobjectThe GPU’s adapter, when stacking on the GPU.
budgetMbintegerThe GPU memory a stack’s accumulators may take, in MiB.
devicestringWhat stacks: gpu or cpu.
memoryobjectThe memory stacking may use on the host, and where it spills beyond it.
preference"auto" | "cpu" | "gpu"The preference: auto, cpu or gpu.
reasonstringWhy the CPU stacks, when it does.

Example:

{}

compute.set

Set compute device. Chooses which device stacks, and how much memory stacking may use.

device: auto (the default: the GPU when a hardware adapter passes the self-test, the CPU otherwise), cpu (always the CPU, whatever the machine has) or gpu (software adapters such as lavapipe and WARP taken too, which are slower than the CPU). budgetMb: the GPU memory a stack’s accumulators may take; beyond it, tiles move to the host between frames. memoryMb: the memory a stack’s working data may take on the host; beyond it, tiles move to the tile folder on disk, which is slower. tileFolder: that folder (empty for the system’s temporary folder). The preferences apply to stacks started from now on, for this engine; they aren’t stored in the project. Returns what compute.info does.

RunsUndoableRequiresChanges
InstantNoNothingThe project or the session

Parameters:

NameTypeDescription
budgetMbinteger, from 64 to 1048576The GPU memory budget of a stack’s accumulators, in MiB, from 64 to 1048576.
device"auto" | "cpu" | "gpu"auto, cpu or gpu.
memoryMbinteger, from 64 to 1048576The memory a stack’s working data may take on the host, in MiB, from 64 to 1048576.
tileFolderstringThe folder tiles beyond the memory budget go to; empty for the system’s temporary folder.

Result:

NameTypeDescription
adapterobjectThe GPU’s adapter, when stacking on the GPU.
budgetMbintegerThe GPU memory a stack’s accumulators may take, in MiB.
devicestringWhat stacks: gpu or cpu.
memoryobjectThe memory stacking may use on the host, and where it spills beyond it.
preference"auto" | "cpu" | "gpu"The preference: auto, cpu or gpu.
reasonstringWhy the CPU stacks, when it does.

Examples:

{"device":"cpu"}
{"budgetMb":2048,"device":"auto"}
{"memoryMb":4096,"tileFolder":"D:/Cache/tiles"}

compute.test

Test the GPU. Probes the GPU again and runs its self-test, now.

What compute.info does on its first call, again: a device on the best adapter the preference allows, every kernel compiled, and a self-test against the CPU’s results, after a driver update or a GPU change, say. device is the preference to test: the engine’s when left out, and auto when that is cpu. Returns what compute.info would with that preference; the engine’s preference stays as it is.

RunsUndoableRequiresChanges
Job, on the preview laneNoNothingNothing

Parameters:

NameTypeDescription
device"auto" | "cpu" | "gpu"auto (hardware adapters) or gpu (software ones too); the engine’s preference when left out, auto when that is cpu.

Result:

NameTypeDescription
adapterobjectThe GPU’s adapter, when stacking on the GPU.
budgetMbintegerThe GPU memory a stack’s accumulators may take, in MiB.
devicestringWhat stacks: gpu or cpu.
memoryobjectThe memory stacking may use on the host, and where it spills beyond it.
preference"auto" | "cpu" | "gpu"The preference: auto, cpu or gpu.
reasonstringWhy the CPU stacks, when it does.

Examples:

{}
{"device":"gpu"}

defects

defects.clear

Remove defect mask. Removes the stack’s defect mask, so that no pixel is inpainted.

Its file stays until the project is closed, so that undo can bring it back. Align again for it to apply.

RunsUndoableRequiresChanges
InstantYesA project open for editingThe project or the session

Parameters: none.

Result:

NameTypeDescription
clearedbooleanFalse when the project had none: nothing changed.

Example:

{}

defects.detect

Detect dust and hot pixels. Finds the dust and hot pixels of the enabled frames and makes them the stack’s defect mask.

Reads up to 32 of the enabled frames, spread over the stack (at least 5 are needed), and marks the pixels that are darker than all around them by the same factor in every frame (dust) or brighter than their neighbors in most frames (hot pixels), at the same sensor pixels, grown to cover the faint rim of each dust shadow. Review the mask before stacking with it: defects.export writes it as an image to look at or edit, and defects.import reads it back. Replaces the project’s mask, as one undo step; align again for it to apply.

RunsUndoableRequiresChanges
Job, on the heavy laneYesA project open for editingThe project or the session

Parameters: none.

Result:

NameTypeDescription
summaryobjectWhat a stored defect mask is: the summary its cache key holds, so that it can be told without reading the mask.

Example:

{}

defects.export

Export defect mask. Writes the stack’s defect mask as an 8-bit PNG of black spots on white.

For you to look at, edit in any image editor and read back with defects.import. An existing file is replaced only with overwrite.

RunsUndoableRequiresChanges
Job, on the heavy laneNoAn open projectFiles outside the project

Parameters:

NameTypeDescription
overwritebooleanReplace the file if it exists. Default: false.
pathstringRequired. The PNG file to write.

Result:

NameTypeDescription
bytesintegerIts size.
pathstring

Examples:

{"path":"C:/Stacks/dust.png"}
{"overwrite":true,"path":"C:/Stacks/dust.png"}

defects.import

Import defect mask. Makes an image of black spots on white the stack’s defect mask.

The image must have the frames’ size: black (or any value below half) where a pixel is defective, white elsewhere; alpha is ignored. Any format FloraStack reads will do, such as a PNG drawn over a frame, or one that defects.export wrote and you edited. Replaces the project’s mask, as one undo step; align again for it to apply.

RunsUndoableRequiresChanges
Job, on the heavy laneYesA project open for editingThe project or the session

Parameters:

NameTypeDescription
pathstringRequired. The image to read: black spots on white, the frames’ size.

Result:

NameTypeDescription
summaryobjectWhat a stored defect mask is: the summary its cache key holds, so that it can be told without reading the mask.

Example:

{"path":"C:/Stacks/dust.png"}

defects.info

Defect mask. Whether the stack has a defect mask, where it came from and what it masks.

The defect mask marks the dust and hot pixels that sit at the same sensor pixels in every frame. The alignment jobs inpaint it in every frame before aligning them, and stacking will read the frames the same way. detect says whether align.run detects a mask when the project has none (the detect_defects alignment setting).

RunsUndoableRequiresChanges
QueryNoAn open projectNothing

Parameters: none.

Result:

NameTypeDescription
detectbooleanWhether align.run detects a mask when the project has none.
maskbooleanWhether the project has a defect mask.
summaryobjectWhat it is, when it has one.

Example:

{}

develop

develop.get

Develop settings. The develop settings of the stack’s RAW frames, and how they were resolved.

settings are the preferences with every key they don’t set at its default. resolved is the development worked out on a reference frame (one white balance and one chromatic-aberration correction for every frame), when the project has one; current says whether it was resolved with these settings.

RunsUndoableRequiresChanges
QueryNoAn open projectNothing

Parameters: none.

Result:

NameTypeDescription
resolvedobjectThe stack’s development as resolved on its reference frame.
settingsobjectEvery setting, with the defaults filled in.

Example:

{}

develop.reset

Reset develop settings. Puts every develop setting back at its default.

RunsUndoableRequiresChanges
InstantYesA project open for editingThe project or the session

Parameters: none.

Result:

NameTypeDescription
settingsobjectEvery setting, with the defaults filled in.

Example:

{}

develop.set

Set develop settings. Changes some of the develop settings of the stack’s RAW frames.

Only the keys given change, as when a preset is applied: {"exposure": 0.5} changes the exposure and keeps the rest, and a nested table (noise_reduction) merges key by key. The result is checked whole. A misspelled key is an error. They apply to camera RAW and DNG frames; TIFF and other image files are imported unchanged.

RunsUndoableRequiresChanges
InstantYesA project open for editingThe project or the session

Parameters:

NameTypeDescription
chromatic_aberration"off" | "auto" | objectLateral chromatic aberration correction: the red and blue planes magnified relative to green about the image’s center, by a factor of 1 + scale. Default: "auto".
chromatic_aberration.manualobjectRequired.
chromatic_aberration.manual.bluenumber, from -0.01 to 0.01Required.
chromatic_aberration.manual.rednumber, from -0.01 to 0.01Required.
demosaic"fast" | "high-quality"The demosaic of output frames; previews always use [Demosaic::Fast]. Default: "high-quality".
exposurenumber, from -10.0 to 10.0Exposure in stops (EV), from -10 to 10: a gain of 2^exposure, linear like everything else. Default: 0.0.
highlights"reconstruct" | "off"What happens to highlights the sensor clipped. Default: "reconstruct".
lens_distortionbooleanApply the lens distortion correction the file records (DNG WarpRectilinear, or a camera’s own). Off by default: distortion changes with focus distance, so correcting it changes each frame’s geometry differently, which fights alignment. Alignment’s scale and shift absorb the focus breathing instead. Default: false.
noise_reductionobjectLight noise reduction: strengths from 0 (off, the default) to 1, as LightCraft’s (and Lightroom’s) 0 to 100 sliders. Off by default because both filters are nonlinear: the luminance filter smooths fine texture, which stacking reads as focus, and the chroma filter keeps every sample at zero or above, which lifts the noise floor of the darkest areas a little. Stacking averages noise away anyway; turn it on for frames shot at high ISO. Default: {"color":0.0,"luminance":0.0}.
noise_reduction.colornumber, from 0.0 to 1.0Smoothing of color (chroma) noise, keeping luminance. Default: 0.0.
noise_reduction.luminancenumber, from 0.0 to 1.0Edge-aware smoothing of luminance. It smooths fine texture too, which stacking reads as focus, so keep it low. Default: 0.0.
white_balance"as-shot" | "auto" | objectWhich white the frames are balanced for. Default: "as-shot".
white_balance.customobjectRequired.
white_balance.custom.temperaturenumber, from 2000.0 to 50000.0Required.
white_balance.custom.tintnumber, from -150.0 to 150.0Required.

Result:

NameTypeDescription
settingsobjectEvery setting, with the defaults filled in.

Examples:

{"exposure":0.5}
{"noise_reduction":{"color":0.3},"white_balance":{"custom":{"temperature":5200,"tint":3}}}
{"demosaic":"fast","lens_distortion":true,"white_balance":"auto"}

edit

edit.history

Undo history. Lists what undo and redo would do, and whether the project has unsaved changes.

RunsUndoableRequiresChanges
QueryNoAn open projectNothing

Parameters: none.

Result:

NameTypeDescription
dirtybooleanWhether the project has unsaved changes.
redoarray of objectThe redo steps, the next to redo first.
undoarray of objectThe undo steps, the next to undo first.

Example:

{}

edit.redo

Redo. Redoes the last change undone.

RunsUndoableRequiresChanges
InstantNoA project open for editingThe project or the session

Parameters: none.

Result:

NameTypeDescription
labelstringIts label: the title of the command that made it.

Example:

{}

edit.undo

Undo. Undoes the last change to the project.

Every undoable command is one step; a retouch stroke is one stroke. Refused while a running job depends on what the step would change.

RunsUndoableRequiresChanges
InstantNoA project open for editingThe project or the session

Parameters: none.

Result:

NameTypeDescription
labelstringIts label: the title of the command that made it.

Example:

{}

export

export.estimate

Estimate export size. About how many bytes exporting an output will write, and in how many files.

From the output’s size and the settings (the project’s, or the ones given): exact for uncompressed files, an estimate from typical compression otherwise, with the extras the settings ask for.

RunsUndoableRequiresChanges
QueryNoAn open projectNothing

Parameters:

NameTypeDescription
outputintegerRequired. The output, as output.list lists it.
settingsobjectSettings on top of the project’s, for this estimate only.
settings.aligned_framesbooleanWrite every frame aligned onto the output’s canvas alongside, as 16-bit TIFF files in a folder. Default: false.
settings.alignment_csvbooleanWrite master-to-input shift, scale, rotation, brightness gain and score as CSV. Default: false.
settings.annotationsbooleanRender visible annotation layers on the output copy. Default: true.
settings.calibrated_depthbooleanWrite full-precision calibrated depth as float TIFF values in micrometers. Default: false.
settings.calibration_namestringName of the selected objective or magnification, retained with its measured value. Default: "".
settings.confidence_mapbooleanWrite the confidence map (a depth-map output’s) alongside, as a 16-bit TIFF. Default: false.
settings.contribution_mapsbooleanWrite a normalized 16-bit contribution TIFF per input of a depth-map output. Default: false.
settings.depth"u8" | "u16" | "f32"u8, u16 or f32, as the format holds: JPEG 8-bit, PNG 8 or 16, TIFF 8, 16 or 32-bit float, DNG 16, OpenEXR 32-bit float. Default: "u16".
settings.depth_mapbooleanWrite the depth map (a depth-map output’s) alongside, as a 16-bit TIFF. Default: false.
settings.dng_compression"uncompressed" | "lossless-jpeg"DNG’s compression: uncompressed or lossless-jpeg. Default: "lossless-jpeg".
settings.dng_look"rendered" | "raw"DNG’s look: rendered or raw. Default: "rendered".
settings.exr_compression"none" | "rle" | "zips" | "zip" | "piz"OpenEXR’s compression: none, rle, zips, zip or piz. Default: "zip".
settings.exr_halfbooleanOpenEXR with half floats rather than full ones. Default: false.
settings.extended_rangebooleanIn 32-bit float files, keep values beyond [0, 1] (the result from before tone compression). Default: false.
settings.format"tiff" | "png" | "jpeg" | "dng" | "open-exr"tiff, png, jpeg, dng or open-exr. Default: "tiff".
settings.jpeg_qualityinteger, from 1 to 100JPEG’s quality, from 1 to 100. Default: 95.
settings.jpeg_subsampling"s422" | "s420" | "s444"JPEG’s chroma subsampling: s444, s422 or s420. Default: "s444".
settings.metadatabooleanCopy a frame’s metadata (EXIF, IPTC, XMP) into the file. Default: true.
settings.metadata_frameinteger, at least 1The frame whose metadata is copied: its position among the output’s frames in the project’s order (the filmstrip’s), from 1 (the first); beyond the last, the last. Default: 1.
settings.pixels_per_micrometernumberLateral calibration in master-image pixels per micrometer; copied from a profile or measured directly.
settings.profile"input" | "srgb" | object | "untagged"The color profile: input (the frames’ own), srgb, {"wide": "pro-photo"}, {"wide": "rec2020"} or untagged. Default: "input".
settings.profile.wide"pro-photo" | "rec2020"Required. A wide-gamut working space for [OutputProfile::Wide].
settings.templatestringThe file’s name without its extension: {project}, {name}, {method}, {frames}, {first}, {last}, {date} and {id} are filled in. Default: "{project} {name}".
settings.tiff_compression"none" | "lzw" | "deflate"TIFF’s compression: none, lzw or deflate. Default: "deflate".
settings.z_origin_micrometersnumberZ of the first captured frame, in micrometers. Default: 0.0.
settings.z_step_micrometersnumberSigned capture step in micrometers, in the recorded capture order; unset when unknown.

Result:

NameTypeDescription
approximatebooleanWhether bytes is a guess (compressed files), rather than known but for the headers, the profile and the metadata (a few KiB).
bytesintegerAbout how many bytes, every file included.
filesintegerHow many files.
namestringThe main file’s name.

Examples:

{"output":3}
{"output":3,"settings":{"depth":"u8","format":"jpeg"}}

export.get

Export settings. The project’s output settings: format, depth, profile, metadata, file names and extras.

RunsUndoableRequiresChanges
QueryNoAn open projectNothing

Parameters: none.

Result:

NameTypeDescription
settingsobjectWhat outputs are exported as: the preferences’ output group, which presets carry. See export.set’s help.

Example:

{}

export.reproduce

Reproduce an export. Recomputes an export from its sidecar and original input files.

Verifies the manifest version, software version, original SHA-256 input hashes and embedded masks. Replays each stacking method with its recorded development and alignment, then retouch and annotation layers and the original export settings. No original project or output cache is needed. Destination paths are selected here, never taken from the sidecar. CPU/GPU arithmetic can differ slightly when the device changes.

RunsUndoableRequiresChanges
Job, on the heavy laneNoNothingFiles outside the project

Parameters:

NameTypeDescription
folderstringRequired. New destination folder. Original paths in the sidecar are never written.
overwritebooleanReplace destination files if they exist. Default: false.
sidecarstringRequired. Versioned sidecar beside the original exported image.

Result:

NameTypeDescription
resultany

Example:

{"folder":"C:/Reproduced","sidecar":"C:/Exports/result.tif.json"}

export.reset

Reset export settings. Puts every output setting back at its default.

RunsUndoableRequiresChanges
InstantYesA project open for editingThe project or the session

Parameters: none.

Result:

NameTypeDescription
settingsobjectWhat outputs are exported as: the preferences’ output group, which presets carry. See export.set’s help.

Example:

{}

export.run

Export output. Writes an output into a folder with the output settings, and its extras alongside.

The file is named by the settings’ template, with the format’s extension; the depth and confidence maps (a depth-map output’s) are written beside it as 16-bit TIFF files ending in -depth and -confidence, and the frames aligned onto the output’s canvas as 16-bit TIFF files in a folder ending in aligned. Settings given apply to this export only, on top of the project’s. Existing files are refused unless overwrite. Each file is written whole and then renamed, so a failure leaves no partial file. Scientific extras include a float TIFF in micrometers, per-frame contribution maps and alignment CSV; visible annotation layers are rendered only onto the output copy. Every export includes a settings/version/input-hash JSON sidecar, published last; export.reproduce replays it. Runs as a job.

RunsUndoableRequiresChanges
Job, on the heavy laneNoAn open projectFiles outside the project

Parameters:

NameTypeDescription
folderstringRequired. The folder the files go into, made if it doesn’t exist.
outputintegerRequired. The output, as output.list lists it.
overwritebooleanReplace files that exist. Default: false.
settingsobjectSettings on top of the project’s, for this export only.
settings.aligned_framesbooleanWrite every frame aligned onto the output’s canvas alongside, as 16-bit TIFF files in a folder. Default: false.
settings.alignment_csvbooleanWrite master-to-input shift, scale, rotation, brightness gain and score as CSV. Default: false.
settings.annotationsbooleanRender visible annotation layers on the output copy. Default: true.
settings.calibrated_depthbooleanWrite full-precision calibrated depth as float TIFF values in micrometers. Default: false.
settings.calibration_namestringName of the selected objective or magnification, retained with its measured value. Default: "".
settings.confidence_mapbooleanWrite the confidence map (a depth-map output’s) alongside, as a 16-bit TIFF. Default: false.
settings.contribution_mapsbooleanWrite a normalized 16-bit contribution TIFF per input of a depth-map output. Default: false.
settings.depth"u8" | "u16" | "f32"u8, u16 or f32, as the format holds: JPEG 8-bit, PNG 8 or 16, TIFF 8, 16 or 32-bit float, DNG 16, OpenEXR 32-bit float. Default: "u16".
settings.depth_mapbooleanWrite the depth map (a depth-map output’s) alongside, as a 16-bit TIFF. Default: false.
settings.dng_compression"uncompressed" | "lossless-jpeg"DNG’s compression: uncompressed or lossless-jpeg. Default: "lossless-jpeg".
settings.dng_look"rendered" | "raw"DNG’s look: rendered or raw. Default: "rendered".
settings.exr_compression"none" | "rle" | "zips" | "zip" | "piz"OpenEXR’s compression: none, rle, zips, zip or piz. Default: "zip".
settings.exr_halfbooleanOpenEXR with half floats rather than full ones. Default: false.
settings.extended_rangebooleanIn 32-bit float files, keep values beyond [0, 1] (the result from before tone compression). Default: false.
settings.format"tiff" | "png" | "jpeg" | "dng" | "open-exr"tiff, png, jpeg, dng or open-exr. Default: "tiff".
settings.jpeg_qualityinteger, from 1 to 100JPEG’s quality, from 1 to 100. Default: 95.
settings.jpeg_subsampling"s422" | "s420" | "s444"JPEG’s chroma subsampling: s444, s422 or s420. Default: "s444".
settings.metadatabooleanCopy a frame’s metadata (EXIF, IPTC, XMP) into the file. Default: true.
settings.metadata_frameinteger, at least 1The frame whose metadata is copied: its position among the output’s frames in the project’s order (the filmstrip’s), from 1 (the first); beyond the last, the last. Default: 1.
settings.pixels_per_micrometernumberLateral calibration in master-image pixels per micrometer; copied from a profile or measured directly.
settings.profile"input" | "srgb" | object | "untagged"The color profile: input (the frames’ own), srgb, {"wide": "pro-photo"}, {"wide": "rec2020"} or untagged. Default: "input".
settings.profile.wide"pro-photo" | "rec2020"Required. A wide-gamut working space for [OutputProfile::Wide].
settings.templatestringThe file’s name without its extension: {project}, {name}, {method}, {frames}, {first}, {last}, {date} and {id} are filled in. Default: "{project} {name}".
settings.tiff_compression"none" | "lzw" | "deflate"TIFF’s compression: none, lzw or deflate. Default: "deflate".
settings.z_origin_micrometersnumberZ of the first captured frame, in micrometers. Default: 0.0.
settings.z_step_micrometersnumberSigned capture step in micrometers, in the recorded capture order; unset when unknown.

Result:

NameTypeDescription
filesarray of object
warningsarray of stringWhat the files leave out or couldn’t hold.

Examples:

{"folder":"C:/Stacks/Exports","output":3}
{"folder":"C:/Stacks","output":3,"overwrite":true,"settings":{"aligned_frames":true}}

export.set

Set export settings. Changes some of the project’s output settings.

Only the keys given change, as when a preset is applied. format: tiff, png, jpeg, dng or open-exr; depth: u8, u16 or f32, as the format holds; then each format’s options (tiff_compression, exr_compression and exr_half, jpeg_quality and jpeg_subsampling, dng_compression and dng_look); profile: input (the frames’ own), srgb, {"wide": "pro-photo"} or {"wide": "rec2020"}, or untagged; metadata and metadata_frame (the output’s frame, from 1 in the filmstrip’s order, whose EXIF, IPTC and XMP the file gets); extended_range (32-bit float files keep values beyond [0, 1]); template, the file name without its extension, with the tokens {project}, {name}, {method}, {frames}, {first}, {last}, {date} and {id}; and depth_map, confidence_map and aligned_frames, written alongside. Scientific options: calibrated_depth with signed z_step_micrometers and z_origin_micrometers, contribution_maps, alignment_csv, annotations, and pixels_per_micrometer with calibration_name. Null clears an optional step or lateral calibration. The keys are the preset files’ [output] keys.

RunsUndoableRequiresChanges
InstantYesA project open for editingThe project or the session

Parameters:

NameTypeDescription
aligned_framesbooleanWrite every frame aligned onto the output’s canvas alongside, as 16-bit TIFF files in a folder. Default: false.
alignment_csvbooleanWrite master-to-input shift, scale, rotation, brightness gain and score as CSV. Default: false.
annotationsbooleanRender visible annotation layers on the output copy. Default: true.
calibrated_depthbooleanWrite full-precision calibrated depth as float TIFF values in micrometers. Default: false.
calibration_namestringName of the selected objective or magnification, retained with its measured value. Default: "".
confidence_mapbooleanWrite the confidence map (a depth-map output’s) alongside, as a 16-bit TIFF. Default: false.
contribution_mapsbooleanWrite a normalized 16-bit contribution TIFF per input of a depth-map output. Default: false.
depth"u8" | "u16" | "f32"u8, u16 or f32, as the format holds: JPEG 8-bit, PNG 8 or 16, TIFF 8, 16 or 32-bit float, DNG 16, OpenEXR 32-bit float. Default: "u16".
depth_mapbooleanWrite the depth map (a depth-map output’s) alongside, as a 16-bit TIFF. Default: false.
dng_compression"uncompressed" | "lossless-jpeg"DNG’s compression: uncompressed or lossless-jpeg. Default: "lossless-jpeg".
dng_look"rendered" | "raw"DNG’s look: rendered or raw. Default: "rendered".
exr_compression"none" | "rle" | "zips" | "zip" | "piz"OpenEXR’s compression: none, rle, zips, zip or piz. Default: "zip".
exr_halfbooleanOpenEXR with half floats rather than full ones. Default: false.
extended_rangebooleanIn 32-bit float files, keep values beyond [0, 1] (the result from before tone compression). Default: false.
format"tiff" | "png" | "jpeg" | "dng" | "open-exr"tiff, png, jpeg, dng or open-exr. Default: "tiff".
jpeg_qualityinteger, from 1 to 100JPEG’s quality, from 1 to 100. Default: 95.
jpeg_subsampling"s422" | "s420" | "s444"JPEG’s chroma subsampling: s444, s422 or s420. Default: "s444".
metadatabooleanCopy a frame’s metadata (EXIF, IPTC, XMP) into the file. Default: true.
metadata_frameinteger, at least 1The frame whose metadata is copied: its position among the output’s frames in the project’s order (the filmstrip’s), from 1 (the first); beyond the last, the last. Default: 1.
pixels_per_micrometernumberLateral calibration in master-image pixels per micrometer; copied from a profile or measured directly.
profile"input" | "srgb" | object | "untagged"The color profile: input (the frames’ own), srgb, {"wide": "pro-photo"}, {"wide": "rec2020"} or untagged. Default: "input".
profile.wide"pro-photo" | "rec2020"Required. A wide-gamut working space for [OutputProfile::Wide].
templatestringThe file’s name without its extension: {project}, {name}, {method}, {frames}, {first}, {last}, {date} and {id} are filled in. Default: "{project} {name}".
tiff_compression"none" | "lzw" | "deflate"TIFF’s compression: none, lzw or deflate. Default: "deflate".
z_origin_micrometersnumberZ of the first captured frame, in micrometers. Default: 0.0.
z_step_micrometersnumberSigned capture step in micrometers, in the recorded capture order; unset when unknown.

Result:

NameTypeDescription
settingsobjectWhat outputs are exported as: the preferences’ output group, which presets carry. See export.set’s help.

Examples:

{"depth":"u8","format":"jpeg","jpeg_quality":92,"profile":"srgb"}
{"depth_map":true,"template":"{project}-{method}-{date}"}

filmstrip

filmstrip.list

Filmstrip. Every frame’s previews, as shot and aligned, with its flags and the motion found in it.

For each frame, in the project’s order: its preview as shot (developed, its defects inpainted) and aligned onto the output’s canvas, small JPEGs of at most 512 pixels a side, as paths to read; its flags (such as moved and out-of-focus); and what alignment found moved in it against its neighbor: a score, the largest displacement and the regions, in frame pixels. A preview that is missing or out of date is left out and counted in stale: filmstrip.update makes them.

RunsUndoableRequiresChanges
QueryNoAn open projectNothing

Parameters: none.

Result:

NameTypeDescription
framesarray of object
framing"narrow" | "wide" | "common"The framing the aligned previews show.
sideintegerThe previews’ longest side, in pixels.
staleintegerHow many previews are missing or out of date: filmstrip.update makes them.

Example:

{}

filmstrip.update

Update filmstrip. Makes the frames’ previews that are missing or out of date.

Reads and develops the frames whose preview is missing or out of date (their file, the develop settings or the defect mask changed), and aligns every aligned frame’s preview onto the canvas of the framing set, which needs no frame read. A frame whose file can’t be read is listed in unreadable and keeps its previews. align.run makes them too, as it reads the frames. Runs beside other jobs as a preview; a newer call replaces an older one still running. Previews are cache files, not edits: no undo step.

RunsUndoableRequiresChanges
Job, on the preview laneNoAn open projectNothing

Parameters: none.

Result:

NameTypeDescription
alignedPreviewsinteger
previewsintegerHow many previews it made, as shot and aligned.
unreadablearray of objectThe frames whose file couldn’t be read (moved, deleted or damaged), with why: their previews stay as they were.

Example:

{}

job

job.cancel

Cancel job. Cancels a job.

A queued job ends at once; a running one stops at its next checkpoint, and its result is discarded, so the project stays as it was. A job that is writing a file can’t be cancelled any more (cancelled is then false).

RunsUndoableRequiresChanges
InstantNoNothingThe project or the session

Parameters:

NameTypeDescription
jobintegerRequired. The job’s id, as dispatching its command returned it.

Result:

NameTypeDescription
cancelledbooleanFalse when no such job is queued or running, or when it can’t be stopped any more.
jobintegerA job’s id, unique in its engine.

Example:

{"job":3}

job.list

List jobs. Lists the jobs queued and running, then the last ones that ended, with their progress and results.

RunsUndoableRequiresChanges
QueryNoNothingNothing

Parameters: none.

Result:

NameTypeDescription
jobsarray of object

Example:

{}

output

output.list

List outputs. Lists the outputs, oldest first: how each was made, its maps and its retouch layers.

RunsUndoableRequiresChanges
QueryNoAn open projectNothing

Parameters: none.

Result:

NameTypeDescription
outputsarray of object

Example:

{}

output.remove

Remove output. Removes an output from the project.

Its cache files stay until the project is closed, so that undo can bring it back whole.

RunsUndoableRequiresChanges
InstantYesA project open for editingThe project or the session

Parameters:

NameTypeDescription
outputintegerRequired. The output’s id, as output.list lists it.

Result:

NameTypeDescription
outputintegerAn output’s id in its project.

Example:

{"output":4}

output.rename

Rename output. Renames an output.

RunsUndoableRequiresChanges
InstantYesA project open for editingThe project or the session

Parameters:

NameTypeDescription
namestringRequired. Its new name: at most 200 characters, no control characters.
outputintegerRequired. The output’s id, as output.list lists it.

Result:

NameTypeDescription
namestring
outputintegerAn output’s id in its project.

Example:

{"name":"Pyramid, grit 0.5","output":4}

output.save

Save output. Writes an output to an image file, in the format, depth and color profile given.

The metadata (EXIF, IPTC, XMP) comes from metadataFrom, or by default from the first of the output’s frames, with the frame count in XMP. With extended_range in the spec and a 32-bit float depth (TIFF or OpenEXR), values outside [0, 1] are kept: for an output whose tone compression brought it into range (the pyramid method’s), the result from before it is written (“retain extended range”). With map, one of the output’s maps (output.list names them) is written instead, such as a depth-map output’s depth and confidence maps: maps are data, so the spec’s profile must be untagged, and a 16-bit depth keeps every level. The file is written whole to a temporary file and then renamed, so a failed write leaves nothing behind; an existing file is replaced only with overwrite. Runs as a job, which can be cancelled until writing starts.

RunsUndoableRequiresChanges
Job, on the heavy laneNoAn open projectFiles outside the project

Parameters:

NameTypeDescription
mapstringOne of the output’s maps to write instead of the output, such as depth or confidence; the spec’s profile must then be untagged.
metadatabooleanCopy that frame’s metadata (EXIF, IPTC, XMP) into the file; on by default. Off, the file has only what FloraStack writes itself (the frame count). Default: true.
metadataFromintegerThe frame whose metadata the file gets; by default the first of the output’s frames.
outputintegerRequired. The output’s id, as output.list lists it.
overwritebooleanReplace the file if it exists. Default: false.
pathstringRequired. The file to write.
specobjectRequired. The format, its options, the bit depth and the color profile.
spec.depth"u8" | "u16" | "f32"Required. The sample type of an output file.
spec.extended_rangebooleanKeep float values outside [0, 1] (the “retain extended range” option, for people who tone-map themselves). Integer files always clip. Default: false.
spec.formatobjectRequired. An output format with its options.
spec.profile"input" | "srgb" | object | "untagged"The color profile of an output file. Default: "input".
spec.profile.wide"pro-photo" | "rec2020"Required. A wide-gamut working space for [OutputProfile::Wide].

Result:

NameTypeDescription
bytesintegerIts size.
pathstring
sidecarstringReproducibility manifest written beside this image.
warningsarray of stringWhat the file couldn’t hold or carry, such as metadata the format has no place for.

Examples:

{"output":4,"path":"C:/Stacks/bee.tif","spec":{"depth":"u16","format":{"compression":"deflate","format":"tiff"}}}
{"output":4,"overwrite":true,"path":"C:/Stacks/bee.jpg","spec":{"depth":"u8","format":{"format":"jpeg","quality":92,"subsampling":"s444"},"profile":"srgb"}}
{"output":5,"path":"C:/Stacks/bee.exr","spec":{"depth":"f32","extended_range":true,"format":{"compression":"zip","format":"open-exr","half":false}}}
{"map":"depth","output":6,"path":"C:/Stacks/bee-depth.tif","spec":{"depth":"u16","format":{"compression":"deflate","format":"tiff"},"profile":"untagged"}}

parallax

parallax.animate

Export rocking animation. Exports a looping back-and-forth parallax animation as GIF.

A sinusoidal camera excursion uses the stereo baseline. Frames are rendered and encoded one at a time, with infinite looping; unknown disocclusions appear black. GIF timing is in centiseconds. The selected output and its depth/confidence maps are read from one immutable snapshot.

RunsUndoableRequiresChanges
Job, on the heavy laneNoAn open projectFiles outside the project

Parameters:

NameTypeDescription
folderstringRequired. Destination folder, created when needed.
format"glb" | "obj" | nullMesh format: glb or obj (mesh command only).
fpsinteger, from 1 to 50Animation frames per second, 1 to 50 (animation command only; default 16).
framesinteger, from 4 to 120Animation frame count, 4 to 120 (animation command only; default 32).
mode"parallel" | "cross-eyed" | "anaglyph" | nullStereo packing: parallel, cross-eyed or anaglyph (stereo command only).
outputintegerRequired. The depth-map output to export.
overwritebooleanReplace existing destination files. Default: false.
settingsobjectConfidence, smoothing, depth direction, relief, resolution and baseline. Default: {"baseline":0.03999999910593033,"confidence":0.5,"maxDepthJump":0.25,"maxSide":1024,"meshSide":256,"relief":0.20000000298023224,"reverseDepth":false,"smoothing":2}.
settings.baselinenumber, from 0.0 to 0.25Stereo camera separation as a fraction of image width, from zero to 0.25. Default: 0.03999999910593033.
settings.confidencenumber, from 0.0 to 1.0Minimum confidence, from zero to one. Samples below it remain holes after smoothing. Default: 0.5.
settings.maxDepthJumpnumber, from 0.0 to 1.0Maximum normalized depth difference across a triangle; larger discontinuities leave holes. Default: 0.25.
settings.maxSideinteger, from 16 to 2048Longest texture or rendered image side, in pixels, from 16 to 2048. Default: 1024.
settings.meshSideinteger, from 2 to 512Longest mesh grid side, from 2 to 512. Default: 256.
settings.reliefnumber, from 0.001 to 1.0Mesh relief height as a fraction of the image’s longest side, from 0.001 to 1. Default: 0.20000000298023224.
settings.reverseDepthbooleanReverse focus order when the first input frame is farthest from the camera. Default: false.
settings.smoothinginteger, from 0 to 16Confidence-weighted smoothing radius in rendered pixels, from 0 to 16. Default: 2.

Result:

NameTypeDescription
filesarray of string

Example:

{"folder":"exports","fps":16,"frames":32,"output":3}

parallax.mesh

Export 3D mesh. Exports a textured relative-depth relief as GLB or OBJ.

GLB embeds its PNG texture. OBJ writes model.obj, material.mtl and texture.png into the chosen folder. The surface uses confidence masking and weighted smoothing; depth discontinuities can leave holes. These are relative focus depths, not metric geometry. Existing files require overwrite.

RunsUndoableRequiresChanges
Job, on the heavy laneNoAn open projectFiles outside the project

Parameters:

NameTypeDescription
folderstringRequired. Destination folder, created when needed.
format"glb" | "obj" | nullMesh format: glb or obj (mesh command only).
fpsinteger, from 1 to 50Animation frames per second, 1 to 50 (animation command only; default 16).
framesinteger, from 4 to 120Animation frame count, 4 to 120 (animation command only; default 32).
mode"parallel" | "cross-eyed" | "anaglyph" | nullStereo packing: parallel, cross-eyed or anaglyph (stereo command only).
outputintegerRequired. The depth-map output to export.
overwritebooleanReplace existing destination files. Default: false.
settingsobjectConfidence, smoothing, depth direction, relief, resolution and baseline. Default: {"baseline":0.03999999910593033,"confidence":0.5,"maxDepthJump":0.25,"maxSide":1024,"meshSide":256,"relief":0.20000000298023224,"reverseDepth":false,"smoothing":2}.
settings.baselinenumber, from 0.0 to 0.25Stereo camera separation as a fraction of image width, from zero to 0.25. Default: 0.03999999910593033.
settings.confidencenumber, from 0.0 to 1.0Minimum confidence, from zero to one. Samples below it remain holes after smoothing. Default: 0.5.
settings.maxDepthJumpnumber, from 0.0 to 1.0Maximum normalized depth difference across a triangle; larger discontinuities leave holes. Default: 0.25.
settings.maxSideinteger, from 16 to 2048Longest texture or rendered image side, in pixels, from 16 to 2048. Default: 1024.
settings.meshSideinteger, from 2 to 512Longest mesh grid side, from 2 to 512. Default: 256.
settings.reliefnumber, from 0.001 to 1.0Mesh relief height as a fraction of the image’s longest side, from 0.001 to 1. Default: 0.20000000298023224.
settings.reverseDepthbooleanReverse focus order when the first input frame is farthest from the camera. Default: false.
settings.smoothinginteger, from 0 to 16Confidence-weighted smoothing radius in rendered pixels, from 0 to 16. Default: 2.

Result:

NameTypeDescription
filesarray of string

Example:

{"folder":"exports/model","format":"glb","output":3}

parallax.preview

View 3D relief. Builds a textured relief for the orbit viewer.

Uses the selected output’s immutable depth and confidence maps and its visible retouch. Frame zero is nearest unless reverseDepth; geometry is relative, not metric. Samples below the confidence threshold remain holes. The preview is stored in the project cache.

RunsUndoableRequiresChanges
Job, on the preview laneNoAn open projectNothing

Parameters:

NameTypeDescription
outputintegerRequired. The depth-map output to view.
settingsobjectConfidence, smoothing, depth direction, relief and resolution. Default: {"baseline":0.03999999910593033,"confidence":0.5,"maxDepthJump":0.25,"maxSide":1024,"meshSide":256,"relief":0.20000000298023224,"reverseDepth":false,"smoothing":2}.
settings.baselinenumber, from 0.0 to 0.25Stereo camera separation as a fraction of image width, from zero to 0.25. Default: 0.03999999910593033.
settings.confidencenumber, from 0.0 to 1.0Minimum confidence, from zero to one. Samples below it remain holes after smoothing. Default: 0.5.
settings.maxDepthJumpnumber, from 0.0 to 1.0Maximum normalized depth difference across a triangle; larger discontinuities leave holes. Default: 0.25.
settings.maxSideinteger, from 16 to 2048Longest texture or rendered image side, in pixels, from 16 to 2048. Default: 1024.
settings.meshSideinteger, from 2 to 512Longest mesh grid side, from 2 to 512. Default: 256.
settings.reliefnumber, from 0.001 to 1.0Mesh relief height as a fraction of the image’s longest side, from 0.001 to 1. Default: 0.20000000298023224.
settings.reverseDepthbooleanReverse focus order when the first input frame is farthest from the camera. Default: false.
settings.smoothinginteger, from 0 to 16Confidence-weighted smoothing radius in rendered pixels, from 0 to 16. Default: 2.

Result:

NameTypeDescription
outputintegerAn output’s id in its project.
pathstring

Example:

{"output":3}

parallax.stereo

Export synthetic stereo. Exports parallel or cross-eyed stereo pairs, or a red-cyan anaglyph PNG.

Parallel camera reprojection converges at relative depth 0.5. Baseline is a fraction of image width; smaller depths move right in the left eye and left in the right eye. Cross-eyed output swaps the eyes. Unknown disocclusions and masked samples are transparent; no hidden surfaces are invented. Use reverseDepth for far-to-near captures.

RunsUndoableRequiresChanges
Job, on the heavy laneNoAn open projectFiles outside the project

Parameters:

NameTypeDescription
folderstringRequired. Destination folder, created when needed.
format"glb" | "obj" | nullMesh format: glb or obj (mesh command only).
fpsinteger, from 1 to 50Animation frames per second, 1 to 50 (animation command only; default 16).
framesinteger, from 4 to 120Animation frame count, 4 to 120 (animation command only; default 32).
mode"parallel" | "cross-eyed" | "anaglyph" | nullStereo packing: parallel, cross-eyed or anaglyph (stereo command only).
outputintegerRequired. The depth-map output to export.
overwritebooleanReplace existing destination files. Default: false.
settingsobjectConfidence, smoothing, depth direction, relief, resolution and baseline. Default: {"baseline":0.03999999910593033,"confidence":0.5,"maxDepthJump":0.25,"maxSide":1024,"meshSide":256,"relief":0.20000000298023224,"reverseDepth":false,"smoothing":2}.
settings.baselinenumber, from 0.0 to 0.25Stereo camera separation as a fraction of image width, from zero to 0.25. Default: 0.03999999910593033.
settings.confidencenumber, from 0.0 to 1.0Minimum confidence, from zero to one. Samples below it remain holes after smoothing. Default: 0.5.
settings.maxDepthJumpnumber, from 0.0 to 1.0Maximum normalized depth difference across a triangle; larger discontinuities leave holes. Default: 0.25.
settings.maxSideinteger, from 16 to 2048Longest texture or rendered image side, in pixels, from 16 to 2048. Default: 1024.
settings.meshSideinteger, from 2 to 512Longest mesh grid side, from 2 to 512. Default: 256.
settings.reliefnumber, from 0.001 to 1.0Mesh relief height as a fraction of the image’s longest side, from 0.001 to 1. Default: 0.20000000298023224.
settings.reverseDepthbooleanReverse focus order when the first input frame is farthest from the camera. Default: false.
settings.smoothinginteger, from 0 to 16Confidence-weighted smoothing radius in rendered pixels, from 0 to 16. Default: 2.

Result:

NameTypeDescription
filesarray of string

Example:

{"folder":"exports","mode":"parallel","output":3,"settings":{"baseline":0.04}}

preset

preset.apply

Apply preset. Applies a preset, a file or a built-in one, on top of the project’s preferences.

Tables merge key by key and other values replace what was there, so presets layer: one for develop settings, another for output. groups applies only some of the preset’s groups (a partial preset). Give path (a TOML file) or builtin (an id from preset.list). Every group is checked before anything changes.

RunsUndoableRequiresChanges
InstantYesA project open for editingThe project or the session

Parameters:

NameTypeDescription
builtinstringA built-in preset’s id, as preset.list lists them, in place of path.
groupsarray of "develop" | "align" | "stack" | "output"The groups to apply; all of the preset’s when left out.
pathstringThe preset file (TOML).

Result:

NameTypeDescription
groupsarray of "develop" | "align" | "stack" | "output"The groups it set.
namestringIts name, if it has one.

Examples:

{"path":"C:/Presets/rail.toml"}
{"groups":["develop"],"path":"C:/Presets/insect.toml"}
{"builtin":"insect-macro"}

preset.list

Built-in presets. The presets shipped with FloraStack: each one’s id, name, description and groups.

Apply one with preset.apply and its builtin id; in batch.run and watch.run, name it as the preset builtin:<id>.

RunsUndoableRequiresChanges
QueryNoNothingNothing

Parameters: none.

Result:

NameTypeDescription
presetsarray of object

Example:

{}

preset.read

Read preset. Reads a preset file: its name, description and preferences.

RunsUndoableRequiresChanges
QueryNoNothingNothing

Parameters:

NameTypeDescription
pathstringRequired. The preset file (TOML).

Result:

NameTypeDescription
descriptionstring
namestring
preferencesobjectIts preferences, by group, as the file has them.

Example:

{"path":"C:/Presets/rail.toml"}

preset.save

Save preset. Saves the project’s preferences, or some groups of them, as a preset file.

The file is TOML, written atomically. An existing file is replaced only with overwrite. By default it holds only the settings changed from their defaults, so that it layers over what a project has; with complete, every setting of its groups, the defaults included, so that applying it gives these settings whatever the project had.

RunsUndoableRequiresChanges
InstantNoAn open projectFiles outside the project

Parameters:

NameTypeDescription
completebooleanSave every setting of the groups, the defaults included, rather than only those changed from them. Default: false.
descriptionstringWhat it is for.
groupsarray of "develop" | "align" | "stack" | "output"The groups to save; all the project sets when left out.
namestringThe preset’s name, for the presets list.
overwritebooleanReplace the file if it exists. Default: false.
pathstringRequired. The preset file to write (TOML).

Result:

NameTypeDescription
groupsarray of "develop" | "align" | "stack" | "output"The groups it holds.
pathstring

Examples:

{"groups":["develop"],"name":"Bee","path":"C:/Presets/bee.toml"}
{"complete":true,"name":"Rail","path":"C:/Presets/rail.toml"}

project

project.addFrames

Add frames. Adds image and camera RAW files to the end of the frame list.

paths lists files and folders; a folder adds the frame files directly in it (by extension, sorted by name). Every file is read once, to check that FloraStack reads it, to hash it and to keep its metadata summary. Files that can’t be read, or that are in the project already (the same path or the same contents), are reported in skipped. Runs as a job; the frames are added in one undo step when it ends, or not at all when it is cancelled.

RunsUndoableRequiresChanges
Job, on the heavy laneYesA project open for editingThe project or the session

Parameters:

NameTypeDescription
pathsarray of stringRequired. Files and folders (at most 100000): a folder adds the frame files directly in it, sorted by name.

Result:

NameTypeDescription
addedarray of integerThe new frames’ ids, in order.
skippedarray of objectThe files not added, and why.

Examples:

{"paths":["C:/Stacks/bee/IMG_0001.CR3","C:/Stacks/bee/IMG_0002.CR3"]}
{"paths":["C:/Stacks/bee"]}

project.checkFrames

Check frames. Lists the frames whose files are missing or changed since they were added.

Each frame’s file is compared with what was added, by its size and modification time, and by its contents when the time changed. A missing frame can still be stacked from the cache where it was aligned; a changed one must be added and aligned again. The desktop app asks this when a project opens.

RunsUndoableRequiresChanges
QueryNoAn open projectNothing

Parameters: none.

Result:

NameTypeDescription
checkedintegerHow many frames were checked.
framesarray of objectThe ones missing, changed or unreadable; empty when every file is the one added.

Example:

{}

project.close

Close project. Closes the open project.

Refused while the project has unsaved changes, unless discardChanges. Its running jobs are cancelled and waited for; then the cache files that nothing refers to are removed, the undo history is dropped and the project folder’s lock is released.

RunsUndoableRequiresChanges
InstantNoNothingThe project or the session

Parameters:

NameTypeDescription
discardChangesbooleanClose it even if it has unsaved changes, which are lost. Default: false.

Result:

NameTypeDescription
cleanedintegerHow many cache files that nothing referred to were removed.
pathstringThe folder of the project closed; none when no project was open.

Examples:

{}
{"discardChanges":true}

project.findOrphans

Find old temporary projects. Lists the temporary projects old enough to be moved to the trash.

Orphans are unnamed projects in the temporary-projects folder that no FloraStack has open and that haven’t been saved or opened for days days (30 by default).

RunsUndoableRequiresChanges
QueryNoNothingNothing

Parameters:

NameTypeDescription
daysinteger, from 0 to 36500How many days unused a temporary project must be (30 by default), at most 36500.

Result:

NameTypeDescription
folderstringThe temporary-projects folder looked in.
orphansarray of object

Examples:

{}
{"days":7}

project.findStacks

Find stacks. Finds where each stack starts in a batch of files holding several, shot one after another.

paths lists files and folders, as project.addFrames takes them: a folder gives the frame files directly in it, sorted by name. Every file is read once, in that order, and compared with the one before it: a new stack starts where their capture times are further apart than split.gap seconds (by default 30 s, or 8 times the batch’s median gap when that is longer), where the next frame shows another scene (it doesn’t match the one before, scoring below split.minScore, and doesn’t look like it once blurred, correlating below split.minSimilarity), where the framing jumps (the scale by more than split.maxScaleStep percent, or the view by more than split.maxShift percent of the diagonal) or where the frame size changes. Frames of one stack differ only in focus and a little in scale, so out-of-focus frames at a stack’s ends stay with it. Needs no project and changes none: the result lists each stack’s files, and every boundary with its reasons. Files that can’t be read are listed in skipped and left out. Runs as a job.

RunsUndoableRequiresChanges
Job, on the heavy laneNoNothingNothing

Parameters:

NameTypeDescription
pathsarray of stringRequired. Files and folders (at most 100000), in order: a folder gives the frame files directly in it, sorted by name.
splitobjectWhen the batch is cut: the gap in capture time, in seconds (gap, chosen from the batch when left out), and the limits on neighbors (minScore, minSimilarity, maxScaleStep, maxShift); each left out is the default. Default: {"gap":null,"maxScaleStep":5.0,"maxShift":10.0,"minScore":0.3,"minSimilarity":0.9}.
split.gapnumber, at least 0.0A gap in capture time longer than this, in seconds, cuts the batch; None chooses it from the batch: 30 s or 8 times its median gap, whichever is longer.
split.maxScaleStepnumber, from 0.0 to 50.0A change of scale between matching neighbors beyond this, in percent, is a new framing. Default: 5.0.
split.maxShiftnumber, from 0.0 to 50.0A shift between matching neighbors beyond this, in percent of the frame’s diagonal, is a new framing. Default: 10.0.
split.minScorenumber, from 0.0 to 1.0Neighbors that match with a lower score than this, from 0 to 1, and aren’t similar, are of different scenes. Default: 0.3.
split.minSimilaritynumber, from -1.0 to 1.0Neighbors whose low-passed luminance correlates less than this, from -1 to 1, and that don’t match, are of different scenes. Default: 0.9.

Result:

NameTypeDescription
boundariesarray of objectWhere each stack after the first starts, and why.
gapnumberThe gap in capture time that cuts the batch, in seconds: the one given, or the one chosen from the batch; absent when no file has a capture time.
skippedarray of objectThe files left out, and why.
stacksarray of objectThe stacks, in the order of their files.

Examples:

{"paths":["C:/Stacks/2024-05-01"]}
{"paths":["C:/Stacks/2024-05-01"],"split":{"gap":60,"maxScaleStep":3}}

project.frames

List frames. Lists the frames in order, with their files, hashes and metadata summaries.

RunsUndoableRequiresChanges
QueryNoAn open projectNothing

Parameters: none.

Result:

NameTypeDescription
framesarray of object

Example:

{}

project.info

Project information. Describes the open project: its name, folder, frames, outputs and undo state.

RunsUndoableRequiresChanges
QueryNoAn open projectNothing

Parameters: none.

Result:

NameTypeDescription
createdstringRFC 3339.
dirtybooleanWhether it has unsaved changes.
enabledFramesinteger
framesinteger
migratedFrominteger
modifiedstringWhen it was last saved, RFC 3339.
namestringNone for a temporary project.
outputsinteger
pathstring
readOnlyboolean
redostringWhat a redo would redo now.
softwarestringThe software that last saved it.
temporaryboolean
undostringWhat an undo would undo now.

Example:

{}

project.moveFrames

Move frames. Moves frames to another place in the frame list.

The frames, in the order given, go before the frame now at position to of the list without them (from 0; past the end means at the end).

RunsUndoableRequiresChanges
InstantYesA project open for editingThe project or the session

Parameters:

NameTypeDescription
framesarray of integerRequired. The frames to move, in the order they go in.
tointegerRequired. Where they go: before the frame at this position of the list without them, from 0.

Result:

NameTypeDescription
orderarray of integer

Example:

{"frames":[7],"to":0}

project.new

New project. Creates a project folder and opens the new project, closing the project that is open.

With a name, the project folder is <name>.florastack in folder; without one, the project is temporary (unnamed) and goes in the temporary-projects folder, where orphan cleanup offers to move it to the trash once it is old and still unnamed. The project that is open is closed first, which is refused while it has unsaved changes, unless discardChanges.

RunsUndoableRequiresChanges
InstantNoNothingThe project or the session

Parameters:

NameTypeDescription
discardChangesbooleanClose the open project even if it has unsaved changes, which are lost. Default: false.
folderstringThe folder to make the project folder in. Needed with name, and only with it.
namestringThe project’s name; its folder is <name>.florastack in folder. Leave it out for a temporary project.

Result:

NameTypeDescription
cleanedintegerHow many cache files that nothing referred to were removed.
migratedFromintegerThe project format version the file was upgraded from, if it was older.
namestring
pathstringThe project folder.
readOnlyboolean
temporaryboolean

Examples:

{"folder":"C:/Stacks","name":"Bee head"}
{}

project.open

Open project. Opens a project folder, closing the project that is open.

path is the .florastack folder or its project.json. A project from an older version is upgraded in memory and written in the current format at the next save. With readOnly, the project isn’t locked against other editors and can’t be changed. Cache files that nothing in the project refers to any more are removed.

RunsUndoableRequiresChanges
InstantNoNothingThe project or the session

Parameters:

NameTypeDescription
discardChangesbooleanClose the open project even if it has unsaved changes, which are lost. Default: false.
pathstringRequired. The .florastack project folder, or its project.json.
readOnlybooleanOpen it for reading only: not locked against other editors, and it can’t be changed or saved. Default: false.

Result:

NameTypeDescription
cleanedintegerHow many cache files that nothing referred to were removed.
migratedFromintegerThe project format version the file was upgraded from, if it was older.
namestring
pathstringThe project folder.
readOnlyboolean
temporaryboolean

Examples:

{"path":"C:/Stacks/Bee head.florastack"}
{"path":"C:/Stacks/Bee head.florastack","readOnly":true}

project.removeFrames

Remove frames. Removes frames from the frame list.

The files stay where they are. Outputs made from the frames keep their pixels and their record of what they were made from.

RunsUndoableRequiresChanges
InstantYesA project open for editingThe project or the session

Parameters:

NameTypeDescription
framesarray of integerRequired. The frames’ ids, as project.frames lists them.

Result:

NameTypeDescription
changedinteger

Example:

{"frames":[3,4]}

project.rename

Rename project. Gives the open project a name, which makes a temporary project permanent.

The project folder keeps its name; only the name in project.json changes.

RunsUndoableRequiresChanges
InstantYesA project open for editingThe project or the session

Parameters:

NameTypeDescription
namestringRequired. The new name: at most 200 characters, no control characters.

Result:

NameTypeDescription
namestring

Example:

{"name":"Bee head, 2026"}

project.save

Save project. Saves the open project to its project.json.

Saving is atomic: a failed save (a full disk) leaves the last good save as it was. The undo history stays.

RunsUndoableRequiresChanges
InstantNoA project open for editingThe project or the session

Parameters: none.

Result:

NameTypeDescription
pathstring
savedAtstringWhen, in RFC 3339.

Example:

{}

project.saveAs

Save project as. Saves the open project in another folder, where it stays open.

The project goes to <folder>/<name>.florastack, named after the project: name a temporary project first with project.rename. It is saved first. A temporary project is moved out of the temporary-projects folder (copied instead where moving isn’t possible, as to another drive); a named one is copied, and the original stays as it was saved. The undo history stays. Refused while a job is running, onto a folder that exists, and for a project whose frames are stored relative to its folder when the new folder is elsewhere.

RunsUndoableRequiresChanges
InstantNoA project open for editingFiles outside the project

Parameters:

NameTypeDescription
folderstringRequired. The folder to save the project in, made if needed: the project goes to <folder>/<name>.florastack.

Result:

NameTypeDescription
movedbooleanWhether it was moved (a temporary project) rather than copied.
pathstringThe project folder it is open in.

Example:

{"folder":"C:/Users/me/Pictures/Stacks"}

project.setFramesEnabled

Enable or disable frames. Chooses whether frames go into stacks.

RunsUndoableRequiresChanges
InstantYesA project open for editingThe project or the session

Parameters:

NameTypeDescription
enabledbooleanRequired. Whether they go into stacks.
framesarray of integerRequired. The frames.

Result:

NameTypeDescription
changedinteger

Example:

{"enabled":false,"frames":[1,2]}

project.trashOrphans

Move old temporary projects to the trash. Moves orphaned temporary projects to the trash.

Each path is checked again before it is moved: it must still be an orphan in the temporary-projects folder. Nothing is deleted; the projects can be restored from the trash.

RunsUndoableRequiresChanges
InstantNoNothingFiles outside the project

Parameters:

NameTypeDescription
daysinteger, from 0 to 36500How many days unused each must still be (30 by default).
pathsarray of stringRequired. The project folders, as project.findOrphans lists them.

Result:

NameTypeDescription
failedarray of object
trashedarray of string

Example:

{"paths":["C:/Users/me/AppData/Local/FloraStack/projects/untitled-20260901120000-0.florastack"]}

retouch

retouch.addLayer

Add retouch layer. Adds an empty retouch layer on top of an output’s.

RunsUndoableRequiresChanges
InstantYesA project open for editingThe project or the session

Parameters:

NameTypeDescription
namestringIts name; “Layer n” when left out.
outputintegerRequired. The output, as output.list lists it.

Result:

NameTypeDescription
layerintegerA retouch layer’s id in its project.
outputintegerAn output’s id in its project.

Example:

{"name":"Antennae","output":3}

retouch.cancelPaint

Cancel live stroke. Takes back the stroke being drawn.

RunsUndoableRequiresChanges
InstantNoA project open for editingNothing

Parameters: none.

Result:

NameTypeDescription
cancelledboolean

Example:

{}

retouch.close

Close retouching. Closes the output open for retouching, caching its result.

The result is cached as the output’s retouched map, so that opening it again needs no recomputation.

RunsUndoableRequiresChanges
InstantNoAn open projectNothing

Parameters: none.

Result:

NameTypeDescription
closedbooleanWhether an output was open for retouching.

Example:

{}

retouch.mapFocus

Map sharpest frames. Maps each point of the output open for retouching to its sharpest frame.

Measures the output’s frames’ focus at a quarter of their size, as the depth-map method’s first pass does, and keeps which frame is sharpest at each point as the output’s sharpest map, for retouch.sharpest. A depth-map output needs none: its depth map tells. Runs beside other jobs.

RunsUndoableRequiresChanges
Job, on the preview laneNoAn open projectNothing

Parameters: none.

Result:

NameTypeDescription
framesintegerThe frames it maps to.
heightinteger
widthintegerThe map’s size, a quarter of the output’s on each side.

Example:

{}

retouch.open

Open for retouching. Opens an output for retouching, with its visible strokes painted.

Reads the output and paints its visible retouch strokes over it, or reads the result cached when the project was last saved, and the map of each point’s sharpest frame when the output has one (a depth map’s own, or retouch.mapFocus’s). Then retouch.setSource picks what strokes paint from, retouch.stroke paints one, and edit.undo takes it back. One output is open for retouching at a time; opening another caches and closes the one open.

RunsUndoableRequiresChanges
Job, on the heavy laneNoAn open projectNothing

Parameters:

NameTypeDescription
outputintegerRequired. The output’s id, as output.list lists it.

Result:

NameTypeDescription
heightinteger
outputintegerAn output’s id in its project.
renderedstringHow its strokes got onto it: cached (read back), painted (painted again) or none (it has none).
sharpestbooleanWhether it can tell each point’s sharpest frame.
skippedinteger
strokesintegerIts visible strokes, and how many of them couldn’t be painted (their source is gone).
widthinteger

Example:

{"output":3}

retouch.paint

Paint live. Paints part of a stroke as it is drawn, without committing it.

begin starts a stroke with the settings and samples given; later calls add their samples to it. The result shows the stroke so far exactly as retouch.stroke will paint it, which commits it; retouch.cancelPaint takes it back. Returns the region that changed, in output pixels.

RunsUndoableRequiresChanges
InstantNoA project open for editingNothing

Parameters:

NameTypeDescription
beginbooleanStarts a new stroke, in place of one being drawn. Default: false.
strokeobjectRequired. The stroke: with begin, its settings and first samples; later, the samples to add (its settings must stay the same).
stroke.brush"details" | "pixels" | "darken" | "lighten" | "eraser"Required. A brush. See the crate documentation.
stroke.hardnessnumber, from 0.0 to 1.0Required. How much of the brush, from its center out, paints fully before its edge fades, from 0 (a soft edge all the way) to 1 (a hard edge).
stroke.opacitynumber, from 0.0 to 1.0Required. How strongly it paints, from 0 to 1.
stroke.samplesarray of array of numberRequired. The pointer’s path: [x, y, pressure] samples, in pixels of the output (from its top left corner) and pressure from 0 to 1 (1 without a pen), at most 100000. Pressure scales the brush’s size.
stroke.sizenumber, from 1.0 to 4000.0Required. The brush’s diameter, in pixels of the output, from 1 to 4000.
stroke.sourceobjectWhere it paints from: {"frame": id} or {"output": id}; none for the eraser.
stroke.versionintegerHow the record is rendered: 1, this crate’s [STROKE_VERSION]. Default: 1.

Result:

NameTypeDescription
regionarray of integerThe region painted, [x, y, width, height] in output pixels; none when nothing changed.

Example:

{"begin":true,"stroke":{"brush":"details","hardness":0.5,"opacity":1,"samples":[[100,120,1]],"size":40,"source":{"frame":7}}}

retouch.removeLayer

Remove retouch layer. Removes a retouch layer and its strokes.

RunsUndoableRequiresChanges
InstantYesA project open for editingThe project or the session

Parameters:

NameTypeDescription
layerintegerRequired. The layer, as output.list lists the output’s layers.
outputintegerRequired. The output, as output.list lists it.

Result:

NameTypeDescription
layerintegerA retouch layer’s id in its project.
outputintegerAn output’s id in its project.

Example:

{"layer":5,"output":3}

retouch.setLayerVisible

Show retouch layer. Shows or hides a retouch layer’s strokes.

RunsUndoableRequiresChanges
InstantYesA project open for editingThe project or the session

Parameters:

NameTypeDescription
layerintegerRequired. The layer, as output.list lists the output’s layers.
outputintegerRequired. The output, as output.list lists it.
visiblebooleanRequired. Whether its strokes show.

Result:

NameTypeDescription
layerintegerA retouch layer’s id in its project.
outputintegerAn output’s id in its project.

Example:

{"layer":5,"output":3,"visible":false}

retouch.setSource

Set retouch source. Picks the frame or output that strokes paint from.

A frame is read and developed as stacking reads it, its brightness gain applied, and warped onto the output’s canvas, then kept in the cache, so that it is read rather than decoded the next time; another output must have the output’s size. Give frame or output. Runs beside other jobs; a newer call replaces one still running.

RunsUndoableRequiresChanges
Job, on the preview laneNoAn open projectNothing

Parameters:

NameTypeDescription
frameintegerA frame, as project.frames lists it.
outputintegerAnother output of the same size, as output.list lists it.

Result:

NameTypeDescription
loadedstringHow it was loaded: memory (kept since it was last used), cache or decoded.
sourceobjectWhere a brush paints from: a frame of the stack, warped onto the output’s canvas, or another output of the same size (a slab, or a stack by another method).

Examples:

{"frame":7}
{"output":2}

retouch.sharpest

Sharpest frame. The frame where a point of the output is sharpest.

From the depth map of a depth-map output, or the map retouch.mapFocus made. x and y are in pixels of the output.

RunsUndoableRequiresChanges
QueryNoAn open projectNothing

Parameters:

NameTypeDescription
xnumberRequired. In pixels of the output, from its left edge.
ynumberRequired. In pixels of the output, from its top edge.

Result:

NameTypeDescription
frameintegerThe frame; none where no frame covers the point, or beyond the output.
indexintegerIts position among the output’s frames, in the order they were stacked.

Example:

{"x":1200.5,"y":840}

retouch.stroke

Retouch stroke. Paints a stroke onto the output open for retouching, as one undo step.

The stroke goes on top of layer’s strokes, or of the top layer’s, in a new layer when the output has none. Its samples are [x, y, pressure] in pixels of the output, rounded to a hundredth of a pixel. Brushes: details (the source’s detail, its brightness and color matched to the output’s, with a hard edge where there is fine detail), pixels (the source as it is), darken and lighten (only where the source is darker or lighter), and eraser (back to the output as stacked; no source). When it is the stroke retouch.paint drew, it is committed as painted.

RunsUndoableRequiresChanges
InstantYesA project open for editingThe project or the session

Parameters:

NameTypeDescription
layerintegerThe layer it goes into, which must be visible; by default the top layer, or a new one when there is none.
strokeobjectRequired. The stroke: its brush, source, size, hardness, opacity and samples.
stroke.brush"details" | "pixels" | "darken" | "lighten" | "eraser"Required. A brush. See the crate documentation.
stroke.hardnessnumber, from 0.0 to 1.0Required. How much of the brush, from its center out, paints fully before its edge fades, from 0 (a soft edge all the way) to 1 (a hard edge).
stroke.opacitynumber, from 0.0 to 1.0Required. How strongly it paints, from 0 to 1.
stroke.samplesarray of array of numberRequired. The pointer’s path: [x, y, pressure] samples, in pixels of the output (from its top left corner) and pressure from 0 to 1 (1 without a pen), at most 100000. Pressure scales the brush’s size.
stroke.sizenumber, from 1.0 to 4000.0Required. The brush’s diameter, in pixels of the output, from 1 to 4000.
stroke.sourceobjectWhere it paints from: {"frame": id} or {"output": id}; none for the eraser.
stroke.versionintegerHow the record is rendered: 1, this crate’s [STROKE_VERSION]. Default: 1.

Result:

NameTypeDescription
layerintegerA retouch layer’s id in its project.
outputintegerAn output’s id in its project.
regionarray of integerThe region painted, in output pixels.
strokesintegerThe layer’s strokes now.

Examples:

{"stroke":{"brush":"details","hardness":0.5,"opacity":1,"samples":[[100,120,1],[140,130,0.8]],"size":40,"source":{"frame":7}}}
{"layer":5,"stroke":{"brush":"eraser","hardness":0,"opacity":0.5,"samples":[[300,200,1]],"size":80}}

stack

stack.average

Stack by weighted average. Stacks the aligned frames by weighted average into a new output.

Blends every frame into every pixel, each weighted by its sharpness there: the Laplacian’s energy, averaged over radius pixels and raised to power, the weights smoothed over smoothing pixels. Fast, and a good fallback for simple subjects; where near and far detail overlap, the pyramid method is sharper. Uses the project’s settings (stack.get), or the ones given for this stack only, and the stored alignment, framed as the alignment settings say (align.info): align the stack first with align.run, and again after adding or enabling frames. Frames whose alignment was rejected are left out. Pixels that no frame covers, which only wide framing has, are transparent. Runs as a job; the output is added in one undo step when it ends, or not at all when it is cancelled.

RunsUndoableRequiresChanges
Job, on the heavy laneYesA project open for editingThe project or the session

Parameters:

NameTypeDescription
namestringThe output’s name; “Weighted average” when left out.
powernumber, from 0.5 to 4.0How strongly the sharpest frame wins, from 0.5 to 4; the project’s when left out.
radiusnumber, from 0.0 to 64.0The radius sharpness is measured over, in pixels, from 0 to 64; the project’s (stack.get) when left out.
smoothingnumber, from 0.0 to 64.0How smoothly the blend moves from one frame to the next, in pixels, from 0 to 64; the project’s when left out.

Result:

NameTypeDescription
depthobjectThe depth-map method’s threshold and the pixels it filled.
framesarray of integerThe frames stacked, in the order they were added.
framing"narrow" | "wide" | "common"The output’s field of view. See the module documentation.
heightinteger
levelsintegerThe pyramid’s number of levels.
outputintegerThe new output.
rangeobjectHow the pyramid’s result was brought into range.
settingsobjectThe settings it was stacked with, and the framing.
skippedarray of integerThe enabled frames left out, because their alignment was rejected.
uncoveredintegerHow many pixels no frame covers: transparent in the output (only wide framing has them).
widthintegerIts size, in pixels.

Examples:

{}
{"name":"Average, smooth","radius":2.0,"smoothing":2.0}

stack.depthMap

Stack by depth map. Stacks the aligned frames by the depth-map method into a new output.

Finds, for every pixel, the frame in which it is sharpest, smooths that depth map with an edge-aware filter and takes each pixel from the frames at its depth, blending the two on either side: every pixel’s color and contrast are its frames’, for smooth tones and accurate color. Where the confidence (how clearly the sharpest frame stands out) is below the threshold, as in an out-of-focus background or on a smooth surface, the depth is filled from the confident pixels around instead. radius is the estimation radius the focus is measured over, smoothing the reach of the depth map’s smoothing, and threshold how the contrast threshold is chosen: auto (from the statistics: the pixels whose depth follows noise, or else the 10th percentile), level (the absolute level) or percentile (percentile percent of the pixels). Reads every frame twice. The output keeps the depth map (the frame index scaled to 16 bits, 0 for the first frame) and the confidence map (0.5 at the threshold) as its depth and confidence maps, which output.save writes with map. Where near and far detail overlap (hair, bristles), the pyramid method is sharper. Uses the project’s settings (stack.get), or the ones given for this stack only, and the stored alignment, as stack.average does. Runs as a job; the output is added in one undo step when it ends, or not at all when it is cancelled.

RunsUndoableRequiresChanges
Job, on the heavy laneYesA project open for editingThe project or the session

Parameters:

NameTypeDescription
levelnumber, at least 0.0The threshold’s absolute level, from 0, for "threshold": "level"; the project’s when left out.
namestringThe output’s name; “Depth map” when left out.
percentilenumber, from 0.0 to 100.0The share of the pixels to fill at least, in percent from 0 to 100, for "threshold": "percentile"; the project’s when left out.
radiusnumber, from 0.0 to 64.0The estimation radius, in pixels, from 0 to 64; the project’s (stack.get) when left out.
smoothingnumber, from 0.0 to 256.0The depth map’s smoothing radius, in pixels, from 0 to 256; the project’s when left out.
threshold"auto" | "level" | "percentile"How the contrast threshold is chosen: auto, level or percentile; the project’s when left out.

Result:

NameTypeDescription
depthobjectThe depth-map method’s threshold and the pixels it filled.
framesarray of integerThe frames stacked, in the order they were added.
framing"narrow" | "wide" | "common"The output’s field of view. See the module documentation.
heightinteger
levelsintegerThe pyramid’s number of levels.
outputintegerThe new output.
rangeobjectHow the pyramid’s result was brought into range.
settingsobjectThe settings it was stacked with, and the framing.
skippedarray of integerThe enabled frames left out, because their alignment was rejected.
uncoveredintegerHow many pixels no frame covers: transparent in the output (only wide framing has them).
widthintegerIts size, in pixels.

Examples:

{}
{"name":"Depth map, more filled","percentile":50,"threshold":"percentile"}
{"radius":3.0,"smoothing":16.0}

stack.get

Stacking settings. The stacking methods’ settings.

Every setting, with the keys the preferences don’t set at their defaults: for the weighted average (average), the radius sharpness is measured over, the smoothing of the blend and the power that sets how strongly the sharpest frame wins; for the pyramid method (pyramid), the number of levels, the grit suppression, the decisions (luminance or channels), the range limit, the tone compression and the coarse limit; for the depth-map method (depth_map), the estimation radius, the smoothing radius and the contrast threshold: how it is chosen (threshold: auto, level or percentile), and its level and percentile.

RunsUndoableRequiresChanges
QueryNoAn open projectNothing

Parameters: none.

Result:

NameTypeDescription
settingsobjectEvery setting, with the defaults filled in.

Example:

{}

stack.preview

Preview stack. Stacks the aligned frames at a quarter of their size, as a quick preview.

The weighted average of stack.average, or with method “pyramid” or “depth-map” the method of stack.pyramid or stack.depthMap, on frames reduced to a quarter of their size on each side with the settings scaled to match, so that it shows in seconds what the full stack will look like. Takes the same settings as that method’s command. The result is a linear 32-bit float TIFF in the project’s previews/ folder, as a path, kept until the project is closed: no output, no undo step. Runs beside other jobs as a preview; a newer call replaces an older one still running, so call it after every change of a setting.

RunsUndoableRequiresChanges
Job, on the preview laneNoAn open projectNothing

Parameters:

NameTypeDescription
coarseLimitinteger, from 0 to 1000The pyramid’s coarse limit in frames, or null for off; the project’s when left out.
decisions"luminance" | "channels"The pyramid’s decisions, luminance or channels; the project’s when left out.
gritnumber, from 0.0 to 1.0The pyramid’s grit suppression, 0 or from 0.25 to 1; the project’s when left out.
levelnumber, at least 0.0The depth-map method’s threshold level, from 0; the project’s when left out.
levelsinteger, from 0 to 10The pyramid’s levels at full size, 0 to 10 (0 chooses); the project’s when left out.
method"average" | "pyramid" | "depth-map"The method, “average”, “pyramid” or “depth-map”; the settings below are that method’s. Left out, the command’s own: “average” for stack.preview, “pyramid” for the slabs of stack.slabbed and for its final stack.
percentilenumber, from 0.0 to 100.0The depth-map method’s threshold percentile, from 0 to 100; the project’s when left out.
powernumber, from 0.5 to 4.0The weighted average’s power, from 0.5 to 4; the project’s when left out.
radiusnumber, from 0.0 to 64.0The weighted average’s or the depth-map method’s radius, in pixels of the full-size frames, from 0 to 64; the project’s (stack.get) when left out.
rangeLimitnumber, from 0.0 to 1.0The pyramid’s range limit, from 0 to 1; the project’s when left out.
smoothingnumber, from 0.0 to 256.0The weighted average’s smoothing, in pixels of the full-size frames, from 0 to 64, or the depth-map method’s, from 0 to 256; the project’s when left out.
threshold"auto" | "level" | "percentile"How the depth-map method’s contrast threshold is chosen: auto, level or percentile; the project’s when left out.
tone"compress" | "clip" | "keep"The pyramid’s tone compression: compress, clip or keep; the project’s when left out.

Result:

NameTypeDescription
framesarray of integerThe frames stacked, in the order they were added.
framing"narrow" | "wide" | "common"The output’s field of view. See the module documentation.
heightinteger
methodstringThe method, “average”, “pyramid” or “depth-map”.
pathstringThe preview: a linear 32-bit float TIFF, with an alpha channel when some pixels are covered by no frame.
settingsobjectThe settings at full scale, and the framing.
skippedarray of integerThe enabled frames left out, because their alignment was rejected.
uncoveredintegerHow many pixels no frame covers.
widthintegerIts size, in pixels: a quarter of the full stack’s on each side.

Examples:

{}
{"smoothing":3.0}
{"grit":0.25,"method":"pyramid"}
{"level":0.002,"method":"depth-map","threshold":"level"}

stack.pyramid

Stack by pyramid. Stacks the aligned frames by the pyramid method into a new output.

Decomposes every frame into a Laplacian pyramid and keeps, at every level and position, the coefficients of the frame with the most local energy: the finest detail of every frame survives where near and far structure overlap (hair, bristles, antennae), without the veils the weighted average leaves around out-of-focus edges. The finest level is blended to keep noise down (grit), choices are made on luminance or on each channel (decisions), every pixel is held within the range the frames span there (rangeLimit), and the result is brought into [0, 1] as tone says; when that changes any pixel, the result before it is kept with the output for “retain extended range” files (output.save with extendedRange and 32-bit float). coarseLimit (off by default) keeps the coarse levels’ choices within that many frames of the frame in focus there. Uses the project’s settings (stack.get), or the ones given for this stack only, and the stored alignment, as stack.average does. Runs as a job; the output is added in one undo step when it ends, or not at all when it is cancelled.

RunsUndoableRequiresChanges
Job, on the heavy laneYesA project open for editingThe project or the session

Parameters:

NameTypeDescription
coarseLimitinteger, from 0 to 1000The coarse limit in frames, 0 to 1000, or null for off; the project’s when left out.
decisions"luminance" | "channels"Whether choices are made on luminance or on each channel; the project’s when left out.
gritnumber, from 0.0 to 1.0Grit suppression at the finest level, 0 (off) or from 0.25 to 1; the project’s when left out.
levelsinteger, from 0 to 10The number of pyramid levels, 1 to 10, or 0 to choose from the canvas’s size; the project’s (stack.get) when left out.
namestringThe output’s name; “Pyramid” when left out.
rangeLimitnumber, from 0.0 to 1.0How strictly each pixel is held within the frames’ range there, from 0 to 1; the project’s when left out.
tone"compress" | "clip" | "keep"How the result is brought into [0, 1]: compress, clip or keep; the project’s when left out.

Result:

NameTypeDescription
depthobjectThe depth-map method’s threshold and the pixels it filled.
framesarray of integerThe frames stacked, in the order they were added.
framing"narrow" | "wide" | "common"The output’s field of view. See the module documentation.
heightinteger
levelsintegerThe pyramid’s number of levels.
outputintegerThe new output.
rangeobjectHow the pyramid’s result was brought into range.
settingsobjectThe settings it was stacked with, and the framing.
skippedarray of integerThe enabled frames left out, because their alignment was rejected.
uncoveredintegerHow many pixels no frame covers: transparent in the output (only wide framing has them).
widthintegerIts size, in pixels.

Examples:

{}
{"grit":0.25,"name":"Pyramid, more detail"}
{"decisions":"channels","tone":"keep"}

stack.reset

Reset stacking settings. Puts every stacking setting back at its default.

RunsUndoableRequiresChanges
InstantYesA project open for editingThe project or the session

Parameters: none.

Result:

NameTypeDescription
settingsobjectEvery setting, with the defaults filled in.

Example:

{}

stack.set

Set stacking settings. Changes some of the stacking methods’ settings.

Only the keys given change, as when a preset is applied: {"average": {"radius": 2}} changes the weighted average’s radius and leaves the rest as it is. The result is checked whole, and a misspelled key is an error. The settings apply to the next stack and preview.

RunsUndoableRequiresChanges
InstantYesA project open for editingThe project or the session

Parameters:

NameTypeDescription
averageobjectThe weighted average’s: radius, smoothing and power. Default: {"power":3.0,"radius":3.0,"smoothing":8.0}.
average.powernumber, from 0.5 to 4.0How strongly the sharpest frame wins, from 0.5 to 4: the power the sharpness is raised to before the weights are normalized. 1 blends in proportion to sharpness; higher values come closer to picking one frame per pixel. Default: 3.0.
average.radiusnumber, from 0.0 to 64.0The radius over which sharpness is measured: the standard deviation, in pixels, of the window the Laplacian’s energy is averaged over, from 0 to 64. Larger is steadier on noise and smooth surfaces, smaller follows fine detail more closely. Default: 3.0.
average.smoothingnumber, from 0.0 to 64.0How smoothly the blend moves from one frame to the next across the image: the standard deviation, in pixels, of the blur of each frame’s weights, from 0 to 64. Larger hides the seams between frames, smaller keeps edges between near and far parts crisper. Default: 8.0.
depth_mapobjectThe depth-map method’s: radius, smoothing, threshold, level and percentile. Default: {"level":0.001,"percentile":30.0,"radius":2.0,"smoothing":8.0,"threshold":"auto"}.
depth_map.levelnumber, at least 0.0The threshold’s level of confidence when threshold is level, from 0, in units of linear luminance contrast. Default: 0.001.
depth_map.percentilenumber, from 0.0 to 100.0The share of the pixels, in percent from 0 to 100, whose depth is filled at least when threshold is percentile. Default: 30.0.
depth_map.radiusnumber, from 0.0 to 64.0The estimation radius: the standard deviation, in pixels, of the window the focus measure is averaged over, from 0 to 64. Larger is steadier on noise and smooth surfaces, smaller follows the edges between near and far parts more closely. Default: 2.0.
depth_map.smoothingnumber, from 0.0 to 256.0The smoothing radius: the reach, in pixels, of the edge-aware filter that smooths the depth map and carries it into the pixels below the threshold, from 0 to 256. Default: 8.0.
depth_map.threshold"auto" | "level" | "percentile"How the contrast threshold is chosen: auto (the default), level (an absolute level) or percentile (a share of the pixels). Default: "auto".
pyramidobjectThe pyramid method’s: levels, grit, decisions, range_limit, tone and coarse_limit. Default: {"decisions":"luminance","grit":0.5,"levels":0,"range_limit":1.0,"tone":"compress"}.
pyramid.coarse_limitinteger, from 0 to 1000Off by default: the most frames the coarse levels’ choices may be from the depth-consistent frame (the one whose finest-level energy is largest there), from 0 to 1000.
pyramid.decisions"luminance" | "channels"Whether choices are made on luminance (one choice for all channels, so colors stay together) or on each channel. Default: "luminance".
pyramid.gritnumber, from 0.0 to 1.0Grit suppression at the finest level, from 0.25 (closest to picking) to 1 (blends most), or 0 (off: the sharpest frame’s coefficient is picked, as at the other levels, which keeps the most fine detail and builds up the most noise). The finest level’s coefficients are blended with weights of their energy raised to 1 / grit. Default: 0.5.
pyramid.levelsinteger, from 0 to 10The number of pyramid levels, from 1 to 10; 0 chooses from the canvas’s size (about 16 samples on the short side of the coarsest level: 5 for 720x540, 7 for 20 MP). More levels decide coarser structure by selection rather than by averaging the frames. Default: 0.
pyramid.range_limitnumber, from 0.0 to 1.0How strictly each pixel is held within the range the frames span there, from 0 (off) to 1 (never darker or brighter than every frame): removes the inversion halos and color casts of selection. Default: 1.0.
pyramid.tone"compress" | "clip" | "keep"How the result is brought into [0, 1]: compress (a local shoulder for highlights, negatives to 0), clip or keep (values outside stay, for those who tone-map themselves). Default: "compress".

Result:

NameTypeDescription
settingsobjectEvery setting, with the defaults filled in.

Examples:

{"average":{"radius":2.0}}
{"pyramid":{"grit":0.25,"tone":"clip"}}
{"depth_map":{"percentile":40,"threshold":"percentile"}}

stack.slabbed

Stack in slabs. Stacks the aligned frames in overlapping slabs by one method, then the slabs by another.

For very deep stacks. Splits the frames, in the order they are stacked, into slabs of slabSize consecutive frames, neighbors sharing at least overlap frames, stacks each slab with the slabs method and the slabs with the final method (the pyramid by default, for both), each with the project’s settings (stack.get) under the ones given for this stack, as stack.preview takes them: {"method": "pyramid", "grit": 0.25}. By default a slab holds the square root of the number of frames, rounded up, and neighbors share a fifth of a slab. Slabs are stacked one at a time, in the memory of one stack. Each slab becomes an output of its own, made from its frames, for retouching to take pixels from; the final output is made from the slabs’ outputs. With reuse (the default), a slab the project has an output of already, made from the same frames, development, alignment and settings, is taken from that output instead of being stacked again: run it again with other final settings and only the slabs’ outputs are stacked, not the frames. Uses the stored alignment, as stack.average does. Runs as a job; the outputs are added in one undo step when it ends, or not at all when it is cancelled.

RunsUndoableRequiresChanges
Job, on the heavy laneYesA project open for editingThe project or the session

Parameters:

NameTypeDescription
finalobjectThe final stack’s method and its settings; the pyramid method, with the project’s settings, when left out.
final.coarseLimitinteger, from 0 to 1000The pyramid’s coarse limit in frames, or null for off; the project’s when left out.
final.decisions"luminance" | "channels"The pyramid’s decisions, luminance or channels; the project’s when left out.
final.gritnumber, from 0.0 to 1.0The pyramid’s grit suppression, 0 or from 0.25 to 1; the project’s when left out.
final.levelnumber, at least 0.0The depth-map method’s threshold level, from 0; the project’s when left out.
final.levelsinteger, from 0 to 10The pyramid’s levels at full size, 0 to 10 (0 chooses); the project’s when left out.
final.method"average" | "pyramid" | "depth-map"The method, “average”, “pyramid” or “depth-map”; the settings below are that method’s. Left out, the command’s own: “average” for stack.preview, “pyramid” for the slabs of stack.slabbed and for its final stack.
final.percentilenumber, from 0.0 to 100.0The depth-map method’s threshold percentile, from 0 to 100; the project’s when left out.
final.powernumber, from 0.5 to 4.0The weighted average’s power, from 0.5 to 4; the project’s when left out.
final.radiusnumber, from 0.0 to 64.0The weighted average’s or the depth-map method’s radius, in pixels of the full-size frames, from 0 to 64; the project’s (stack.get) when left out.
final.rangeLimitnumber, from 0.0 to 1.0The pyramid’s range limit, from 0 to 1; the project’s when left out.
final.smoothingnumber, from 0.0 to 256.0The weighted average’s smoothing, in pixels of the full-size frames, from 0 to 64, or the depth-map method’s, from 0 to 256; the project’s when left out.
final.threshold"auto" | "level" | "percentile"How the depth-map method’s contrast threshold is chosen: auto, level or percentile; the project’s when left out.
final.tone"compress" | "clip" | "keep"The pyramid’s tone compression: compress, clip or keep; the project’s when left out.
namestringThe final output’s name; “Slabbed pyramid” (after the final method) when left out.
overlapinteger, from 0 to 100000How many frames neighboring slabs share at least, fewer than a slab holds; a fifth of a slab, at least 1, when left out.
reusebooleanWhether a slab the project has an output of already, made from the same frames with the same settings, is taken from that output instead of being stacked again; true when left out.
slabSizeinteger, from 2 to 100000The frames in a slab, from 2, fewer than the frames stacked; the square root of their number, rounded up, when left out.
slabsobjectThe slabs’ method and its settings, as stack.preview takes them; the pyramid method, with the project’s settings, when left out.
slabs.coarseLimitinteger, from 0 to 1000The pyramid’s coarse limit in frames, or null for off; the project’s when left out.
slabs.decisions"luminance" | "channels"The pyramid’s decisions, luminance or channels; the project’s when left out.
slabs.gritnumber, from 0.0 to 1.0The pyramid’s grit suppression, 0 or from 0.25 to 1; the project’s when left out.
slabs.levelnumber, at least 0.0The depth-map method’s threshold level, from 0; the project’s when left out.
slabs.levelsinteger, from 0 to 10The pyramid’s levels at full size, 0 to 10 (0 chooses); the project’s when left out.
slabs.method"average" | "pyramid" | "depth-map"The method, “average”, “pyramid” or “depth-map”; the settings below are that method’s. Left out, the command’s own: “average” for stack.preview, “pyramid” for the slabs of stack.slabbed and for its final stack.
slabs.percentilenumber, from 0.0 to 100.0The depth-map method’s threshold percentile, from 0 to 100; the project’s when left out.
slabs.powernumber, from 0.5 to 4.0The weighted average’s power, from 0.5 to 4; the project’s when left out.
slabs.radiusnumber, from 0.0 to 64.0The weighted average’s or the depth-map method’s radius, in pixels of the full-size frames, from 0 to 64; the project’s (stack.get) when left out.
slabs.rangeLimitnumber, from 0.0 to 1.0The pyramid’s range limit, from 0 to 1; the project’s when left out.
slabs.smoothingnumber, from 0.0 to 256.0The weighted average’s smoothing, in pixels of the full-size frames, from 0 to 64, or the depth-map method’s, from 0 to 256; the project’s when left out.
slabs.threshold"auto" | "level" | "percentile"How the depth-map method’s contrast threshold is chosen: auto, level or percentile; the project’s when left out.
slabs.tone"compress" | "clip" | "keep"The pyramid’s tone compression: compress, clip or keep; the project’s when left out.

Result:

NameTypeDescription
depthobjectThe final depth map’s threshold and the pixels it filled.
finalSettingsobjectThe settings a stack was made with, as its result reports them.
framesarray of integerThe frames stacked, in the order they were added.
framing"narrow" | "wide" | "common"The output’s field of view. See the module documentation.
heightinteger
outputintegerThe final output, made from the slabs’ outputs.
overlapinteger
rangeobjectHow the result was brought into range, when a pyramid made the slabs or the final stack.
skippedarray of integerThe enabled frames left out, because their alignment was rejected.
slabSettingsobjectThe settings the slabs and the final stack were made with, and the framing.
slabSizeintegerThe frames in a slab, and how many neighboring slabs share at least.
slabsarray of objectThe slabs, in order.
uncoveredintegerHow many pixels no slab covers: transparent in the output (only wide framing has them).
widthintegerIts size, in pixels.

Examples:

{}
{"final":{"method":"depth-map","percentile":40,"threshold":"percentile"},"name":"Slabbed depth map"}
{"final":{"grit":0.75},"overlap":3,"slabSize":12,"slabs":{"grit":0.25}}

stack.threshold

Show contrast threshold. Shows which parts of the stack fall below the depth map’s contrast threshold.

The depth-map method follows each pixel’s sharpest frame only where that frame stands out clearly; below the contrast threshold, in smooth or blurred areas, it fills the depth from the confident pixels around. This shows where that happens, at a quarter of the frames’ size: the sharpest frame’s luminance at each pixel, black below the threshold, transparent where no frame covers it, as an 8-bit TIFF in the project’s previews/ folder (each call removes the one before), with the threshold’s level and the share of the pixels below it. Takes the threshold settings of stack.depthMap, the project’s (stack.get) when left out. The first call reads every frame, as the depth-map method’s first pass does; later calls with the same frames, alignment, develop settings and radius reuse what it measured and take milliseconds, so call it on every move of a threshold slider. Runs beside other jobs as a preview; a newer call replaces an older one still running.

RunsUndoableRequiresChanges
Job, on the preview laneNoAn open projectNothing

Parameters:

NameTypeDescription
levelnumber, at least 0.0The threshold’s absolute level, from 0, for "threshold": "level"; the project’s when left out.
percentilenumber, from 0.0 to 100.0The share of the pixels to fill at least, in percent from 0 to 100, for "threshold": "percentile"; the project’s when left out.
radiusnumber, from 0.0 to 64.0The estimation radius, in pixels of the full-size frames, from 0 to 64; the project’s (stack.get) when left out.
threshold"auto" | "level" | "percentile"How the contrast threshold is chosen: auto, level or percentile; the project’s when left out.

Result:

NameTypeDescription
belownumberThe share of the covered pixels below it, from 0 to 1: their depth is filled from around them.
heightinteger
levelnumberThe threshold’s level of contrast, which "threshold": "level" takes.
measuredbooleanWhether the frames’ focus was measured again, rather than reused from the call before.
pathstringThe picture: an 8-bit TIFF, gray with an alpha channel.
widthintegerIts size, in pixels: a quarter of the full stack’s on each side.

Examples:

{}
{"percentile":40,"threshold":"percentile"}
{"level":0.002,"threshold":"level"}

watch

watch.run

Watch capture folder. Ingests settled frames, aligns arrivals and updates a preview until capture goes quiet.

Watches files directly inside input, including existing images, using native events plus polling. A frame must have unchanged size and modification time for settleMs and decode successfully, with unchanged metadata before and after the read. Truncated or locked files are retried until the quiet timeout, then reported as warnings. Files rewritten after ingest are refused. New frames extend the neighbor alignment chain; job events expose the latest preview path and frame count. After idleSeconds without a new or changed frame, runs final alignment and exports one stack and its project plus summary.csv. Waits for the first frame indefinitely. Output must be outside input. Template tokens are the same as batch.run; preset depth-map thresholds need no interaction.

RunsUndoableRequiresChanges
Job, on the heavy laneNoNothingFiles outside the project

Parameters:

NameTypeDescription
idleSecondsnumber, from 0.1 to 86400Seconds without a new or changed frame before finalization; waits at least settleMs too. Default: 5.0.
inputstringRequired. Folder populated by a tethered camera or its capture application.
method"pyramid" | "depth-map" | "average"Method used for the running preview and the final output. Default: "pyramid".
outputstringRequired. Folder for the saved project, TIFF and summary.csv, outside input.
pollMsinteger, from 10 to 5000Maximum milliseconds between directory scans, including when native events are unavailable. Default: 250.
presetstringRequired. TOML preset, including contrast thresholds for unattended depth-map runs; or a built-in one as builtin:<id>.
settleMsinteger, from 50 to 60000Milliseconds a file’s size and modification time must remain unchanged before decoding. Default: 1000.
templatestringA portable image filename; accepts batch.run’s template tokens, its extension following the preset’s format. Default: "{stack}-{method}-{range}.tif".

Result:

NameTypeDescription
failedintegerNumber of failed entries; a CLI reports failure when nonzero.
stacksarray of objectEach queue entry, in processing order.
summarystringThe CSV summary file.

Example:

{"idleSeconds":5,"input":"C:/Capture","output":"C:/Results","preset":"C:/Presets/macro.toml"}

Suggest a change to this chapter