mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
Loading...
Searching...
No Matches

Noise profiles of images

template<typename eigenImT, typename eigenImT1, typename eigenImT2, typename eigenImT3>
void mx::improc::stddevImage (eigenImT &stdIm, const eigenImT1 &im, const eigenImT2 &rad, const eigenImT3 &mask, typename eigenImT::Scalar minRad, typename eigenImT::Scalar maxRad, bool divide)
 Form a standard deviation image, and optionally normalize the input relative to the local mean to form a S/N map.
template<typename eigenImT, typename eigenImT1, typename eigenImT2>
void mx::improc::stddevImage (eigenImT &stdIm, const eigenImT1 &im, const eigenImT2 &mask, typename eigenImT::Scalar minRad, typename eigenImT::Scalar maxRad, bool divide=false)
 Form a standard deviation image, and optionally normalize the input relative to the local mean to form a S/N map.
template<typename eigenCubeT, typename eigenCubeT1, typename eigenCubeT2, typename radT1, typename radT2>
void mx::improc::stddevImageCube (eigenCubeT &stdImc, const eigenCubeT1 &imc, const eigenCubeT2 &maskCube, radT1 minRad, radT2 maxRad, bool divide=false)

Function Documentation

◆ stddevImage() [1/2]

template<typename eigenImT, typename eigenImT1, typename eigenImT2>
void mx::improc::stddevImage ( eigenImT & stdIm,
const eigenImT1 & im,
const eigenImT2 & mask,
typename eigenImT::Scalar minRad,
typename eigenImT::Scalar maxRad,
bool divide = false )

Form a standard deviation image, and optionally normalize the input relative to the local mean to form a S/N map.

The standard deviation profile is calculated using linear interpolation on a 1 pixel grid

This version creates a radius map on each call, and calls the above version. This should not be used for repeated alls, rather create a radius map ahead of time.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Template Parameters
eigenImTthe eigen array type of the output and non-reference images
Parameters
[out]stdImthe standard deviation image. This will be resized.
[in]imthe image to form the standard deviation profile of, never altered.
[in]maska 1/0 mask. 0 pixels are excluded from the std-dev calculations.
[in]minRadthe minimum radius to analyze
[in]maxRadthe maximum radius to analyze
[in]divide[optional] if true, the output is the input image minus the interpolated mean profile, divided by the std-dev profile, i.e. a S/N map. default is false.

Definition at line 1527 of file imageFilters.hpp.

References radiusImage(), and stddevImage().

◆ stddevImage() [2/2]

template<typename eigenImT, typename eigenImT1, typename eigenImT2, typename eigenImT3>
void mx::improc::stddevImage ( eigenImT & stdIm,
const eigenImT1 & im,
const eigenImT2 & rad,
const eigenImT3 & mask,
typename eigenImT::Scalar minRad,
typename eigenImT::Scalar maxRad,
bool divide )

Form a standard deviation image, and optionally normalize the input relative to the local mean to form a S/N map.

The standard deviation profile is calculated using linear interpolation on a 1 pixel grid

Template Parameters
eigenImTthe eigen array type of the output and non-reference images. Each image input can be a different type to allow references, etc.
Parameters
[out]stdImthe standard deviation image. This will be resized.
[in]imthe image to form the standard deviation profile of, never altered.
[in]radarray of radius values
[in]maska 1/0 mask. 0 pixels are excluded from the std-dev calculations.
[in]minRadthe minimum radius to analyze
[in]maxRadthe maximum radius to analyze
[in]divideif true, the output is the input image minus the interpolated mean profile, divided by the std-dev profile, i.e. a S/N map. default is false.

Definition at line 1422 of file imageFilters.hpp.

References mx::math::vectorMean(), and mx::math::vectorVariance().

Referenced by stddevImage(), stddevImageCube(), and unitTest::improcTest::imageFiltersTest::TEST_CASE().

◆ stddevImageCube()

template<typename eigenCubeT, typename eigenCubeT1, typename eigenCubeT2, typename radT1, typename radT2>
void mx::improc::stddevImageCube ( eigenCubeT & stdImc,
const eigenCubeT1 & imc,
const eigenCubeT2 & maskCube,
radT1 minRad,
radT2 maxRad,
bool divide = false )

Form a standard deviation image for each image in a cube, and optionally normalize it relative to the local mean to form a S/N map cube. The standard deviation profile is calculated using linear interpolation on a 1 pixel grid

Template Parameters
eigencubeTis the eigen cube type of the input and output cubes.
eigenImTthe eigen array type of the output and non-reference images.
Parameters
[out]stdImcthe standard deviation image cube. This will be resized.
[in]imcthe image cube to form the standard deviation profile of.
[in]maskCubea 1/0 mask. 0 pixels are excluded from the std-dev calculations.
[in]minRadthe minimum radius to analyze
[in]maxRadthe maximum radius to analyze
[in]divide[optional] if true, the output is the input image minus the interpolated mean profile, divided by the std-dev profile, i.e. a S/N map. default is false.

Definition at line 1557 of file imageFilters.hpp.

References radiusImage(), and stddevImage().