optris::sdk::rec::FlagPolicyMeta
Whether the shutter was held back while this was recorded, and what that cost.
Why a recording has to carry this at all: Why a recording has to carry this at all A shutter cycle is the non-uniformity correction. Holding it -- AutoNucConfig::while_recording -- buys an unbroken stream and pays for it in drift, and a recording stores finished temperatures, so the drift is in the pixels permanently. No amount of reprocessing on replay takes it out. A suppressed recording is therefore wrong by an amount that is invisible: the stream has no gap, the numbers still look like temperatures, and nothing distinguishes the file from a good one. That is the worst possible outcome of the feature, so the file says what was done to it.
Where it is found, and why in three places: Where it is found, and why in three places One object, written wherever the answer differs, the same way RenderMeta is. Each place answers a different question and all optionals are written only when engaged:
FileMetadata::flag_policy, inotc-meta.json:while_recordingandoverride_drift_c-- what was asked for. In the file header, so "was this recording made with the flag suppressed" is answered from the first few kilobytes without decoding a frame. Absent entirely when the policy was"use", so an ordinary recording is byte for byte what it was before this existed.- the per-frame track, under
flag_policy:heldanddrift_c-- what was happening on that frame. Present only on frames where a due correction was refused, so a reader sees exactly which stretch of the recording is degraded and by how much. - a closing record on the same track, under
flag_policywithpeak_drift_candheld_frames: what it cost overall. Written as the recording stops, because the header is down before the first frame and a summary cannot exist yet. The one number to put beside a file without scanning it.
Absent in every recording written before this existed, which a reader must not read as "nothing was suppressed" -- those files could not suppress anything, so for them it is the same thing.
Units: Units The three drifts are temperature differences. As optris::sdk::Player::GetRecordedFlagPolicy() and a replayed frame's Telemetry hand them out, they are in degrees of the SDK's temperature unit (kelvin-sized in Celsius, Fahrenheit-sized once SetTemperatureUnit() chose Fahrenheit). In the file, in FileMetadata::flag_policy and in what Recorder::WriteFrame() takes, they are kelvin, by design.
Public attributes
while_recording
std::string while_recording
The policy in force: "use", "avoid" or "avoid_unless_drift".
Spelled rather than numbered, so a foreign reader does not have to know this SDK's enumerator values -- the same choice RenderMeta::auto_scale_mode and encoding make. An unrecognised string means a policy from a newer build; treat the file as suppressed by something and do not guess what.
override_drift_c
std::optional< float > override_drift_c
The drift that overrode "avoid_unless_drift". Absent for the other two policies, which do not consult one.
held
std::optional< bool > held
True on a frame whose due correction was refused by the policy. Absent at file level and on the closing record.
drift_c
std::optional< float > drift_c
The worst internal-probe drift since the last correction, at this frame. The radiometric cost as the scheduler measures it.
Absent, rather than zero, before the camera's minimum flag interval has elapsed: the probes are not read until then, so there is no measurement to record. A reader must not take a missing value for no drift.
peak_drift_c
std::optional< float > peak_drift_c
The largest drift_c reached over the whole recording. Present only on the closing record.
held_frames
std::optional< uint32_t > held_frames
How many frames of this recording were written with a correction overdue. Present only on the closing record.
Frames, not corrections: a refused cycle stays due, so every frame from the refusal onwards is one that went out uncorrected. That makes this directly comparable with the recording's own frame count, which is the comparison worth making -- "16 000 of 16 200 frames" says how much of the file is degraded, where a count of corrections would not.
Mirrors optris::sdk::ShutterDeferral::deferred_frames, which has the longer version of why it is counted this way.