API/Reference
LuckyImaging.lucky_image — Functionlucky_image(cube; dims, q, metric=:max, register=:dft, kwargs...)Perform classic lucky imaging for a cube of data along dimension dims. The selection fraction is set by the quantile q, where q=0.9 corresponds to a 10% selectrion fraction. The following options are available for modifying the metric used for selection as well as how the frames are registered.
Metrics
The following metrics, set with the keyword argument metric are available
:max- the maximum value:mean- the mean value:min- the minimum value (useful for coronagraphic images)- other - pass a function with the signature
f(::AbstractMatrix)which returns a scalar value
Registration
The following options for registering the selected frames are available, set with the register keyword argument. Extra options can be provided to kwargs...
:dft- useSubpixelRegistration.jlto register the frames using their phase offsets. The reference frame will be the one with the highest metric, and keyword arguments likeupsample_factorcan be passed directly.:max- register to maximum value:com- register to center of mass:invcom- register to center of inverse mass (useful for coronagraphic images)nothing- cube is already co-registered
Keyword arguments
dims- the dimension along which to perform lucky imaging (required)q- the selection quantile (required)metric- the metric used for selection. Default is:maxregister- the method used for registration. Default is:dftwindow- if provided, will measure the metric and frame offsets inside a centered window withwindowside length.kwargs...- additional keyword arguments will be passed to theregistermethod (e.g.,upsample_factor)
Examples
julia> cube = # load data ...
julia> res = lucky_image(cube; dims=3, q=0.9, upsample_factor=10)See Also
LuckyImaging.lucky_image! — Functionlucky_image!(out::AbstractMatrix, cube; dims, q, kwargs...)Perform classic lucky imaging and store the combined frame in out. See lucky_image for a full description.
LuckyImaging.testcube — Functiontestcube()
Return the filepath of the test cube artifact. This needs to be loaded, using FITSIO.jl, for example. This data is a sequence of frames captured on the VAMPIRES instrument on Subaru/SCExAO.[2]
Examples
julia> using FITSIO
julia> cube = read(FITS(testcube())[1])