Fast Transient Imaging
A Python framework revolving around reconstruction of impulse responses from AMCW lidar measurements.
ProcessMeasurement Namespace Reference

Functions

def ProcessMeasurement (MeasurementDirectory, FrequencyList, CalibrationDirectory, ReferenceDistribution=CFiniteDistribution([0.0]), OutputDirectory="MomentImages", KeywordArguments)
 This function processes the specified measurement generating trigonometric moment images for the given frequencies and plotting analysis information. More...
 

Function Documentation

def ProcessMeasurement.ProcessMeasurement (   MeasurementDirectory,
  FrequencyList,
  CalibrationDirectory,
  ReferenceDistribution = CFiniteDistribution([0.0]),
  OutputDirectory = "MomentImages",
  KeywordArguments 
)

This function processes the specified measurement generating trigonometric moment images for the given frequencies and plotting analysis information.

Parameters
MeasurementDirectoryAll selected files in this directory are loaded as available data for the measurement.
FrequencyListAn iterable of modulation frequencies in Hz (not MHz). The function attempts to produce moment images for each of these frequencies. If data is missing for one of these frequencies, the entire function fails. For biasing it is assumed, that FrequencyList[i]==i*FrequencyList[1].
CalibrationDirectoryIt is assumed that the files in the given directory contain measurements taken with the same configuration as the measurement but on a different scene. The scene should produce the impulse response given by ReferenceDistribution on every pixel. This is typically achieved by pointing the light source directly at the sensor without lens and passing a Dirac-delta for ReferenceDistribution.
ReferenceDistributionThis parameter is forwarded to CTrigonometricMomentImageStack.GetPerPixelCalibration().
OutputDirectoryThe path to a directory to be filled with images by means of CTrigonometricMomentImageStack.Store(). Alternatively, this can be a list of file names.
KeywordArgumentsThe following keyword arguments exist:
PhaseSetIf this is a set of phase values in radians, all processing steps consider solely images corresponding to phase shifts in this set. However, the four taps belonging to a single phase shift are still considered. By default all phase shifts available in the measurement are used.
ExposureThe exposure time of the measurements which are to be used in seconds. Pass None to combine all exposures (default). Note that they are combined in a very naive fashion.
MeasurementFilterFunctionA function like that passed to CMeasurement.AddCaptureData() that can be used to define which files should be loaded from the measurement. It works on top of the other corresponding options. Pass None to avoid additional filtering (default).
CalibrationFilterFunctionLike MeasurementFilterFunction but for the calibration measurement.
SubtractImagesIf this parameter is True, images with a relative phase offset of pi are not handled separately but subtracted from one another immediately (default True).
IgnoreTapsIf this parameter is True, all procedures will only use the first phase tap stored in each file (default False).
FractionToKeepFor measurements where whole images are outliers it can be necessary to remove some takes. This parameter defines the fraction of images to keep (per frequency, phase, tap and exposure). Pass None or 1.0 to keep all data (default).
FinalSmoothingThe standard deviation in pixels of the Gaussian blur applied to the calibrated moment image right before biasing (default 0.0, i.e. no smoothing).
BiasingThresholdThe minimal value of an Eigenvalue of a normalized Toeplitz matrix (default 0.003). Intuitively, greater values employ more biasing to enforce smoother impulse responses. Pass a negative value to disable biasing entirely.
BiasingModeForwards to CTrigonometricMomentImageStack.ApplyBiasing().
EnablePlottingIf this is True (default) various matplotlib plots will be generated to ease analysis of the output.
ShowMomentImagesIf this is True, all measured images are plotted (default False). This can be time-consuming.
ShowScatterPlots,ShowGraphPlots,ShowFourierPlots,ShowExposurePlotsForwards to CMeasurement.PlotPixelData() (default True,False,False, False).
ShowPisarenkoEstimateIf this boolean is True (default) the Pisarenko estimate for the final moment images is shown.
PixelDataX,PixelDataYForwards to CMeasurement.PlotPixelData() as X and Y (default None,None, i.e. a random pixel).
BrightnessFactorThe factor by which the magnitude of the moment images is multiplied.
Returns
A tuple (Measurement,MomentImageStack) where Measurement is a CMeasurement holding the data loaded from MeasurementDirectory and MomentImageStack is a CTrigonometricMomentImageStack holding the final moment images.