frameclassification

This module provides heuristical functions to find exact frame positions of changes of the cameras settings.

You will most likely need one of:

function documentation

runmacs.spec.calibration.frameclassification.getActionState(al, t)[source]

Takes an actionLog and a time, calculates the full state at that specific time.

runmacs.spec.calibration.frameclassification.getActionTimes(al)[source]

Takes an actionLog and returns all contained unique times in sorted order.

runmacs.spec.calibration.frameclassification.getActionValue(tcut, al)[source]

Takes a cut time and an actionLog of a single value (e.g. ..[‘fps’]).

Returns:Value at the time of tcut
runmacs.spec.calibration.frameclassification.getChanges(frameTimes, actionLog)[source]

Computes all actionLog changes for a given frameTimes and actionLog, approximately interpolated to frames.

Returns:(frameNo, stateBefore, stateAfter)
runmacs.spec.calibration.frameclassification.getChangesFromEnviFile(fil)[source]

Computes and refines changes from EnviFile.

runmacs.spec.calibration.frameclassification.getPartsFromDataTimeAndAL(data, frameTimes, actionLog)[source]

Computes changes and converts them to continous image parts

Parameters:
  • data – An 1-dimensional array with representative illumination values for each frame
  • frameTimes – An array of the same shape as data, containing the time of each frame
  • actionLog – The corresponding actionLog as dict of lists of 2-tuples.
Returns:

A list containing (cutStart, cutStop, state)

runmacs.spec.calibration.frameclassification.joinChanges(changes)[source]

Joins nearby changes (after refinement).

runmacs.spec.calibration.frameclassification.mergeFits(a, b)[source]

Combines the results of two change fits to a single change.

runmacs.spec.calibration.frameclassification.preJoinChanges(changes)[source]

Joins common closely following changes to a single change.

runmacs.spec.calibration.frameclassification.refineChange(data, change)[source]

Uses a data-timeline to refine the position of a given change.

runmacs.spec.calibration.frameclassification.refineChanges(data, changes)[source]

Uses a data-timeline to refine the positions of given changes.

runmacs.spec.calibration.frameclassification.stateIsComplete(state)[source]

Checks if all state variables are covered by a given state.