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

Radial profiles of images

Functions

template<typename vecT , typename eigenImT1 , typename eigenImT2 , typename eigenImT3 >
void mx::improc::radprof (vecT &rad, vecT &prof, const eigenImT1 &im, const eigenImT2 &radim, const eigenImT3 *mask, bool mean=false, typename eigenImT1::Scalar minr=0)
 Calculate the the radial profile. More...
 
template<typename vecT , typename eigenImT1 , typename eigenImT2 >
void mx::improc::radprof (vecT &rad, vecT &prof, const eigenImT1 &im, const eigenImT2 &mask, bool mean=false)
 Calculate the the radial profile. More...
 
template<typename vecT , typename eigenImT1 >
void mx::improc::radprof (vecT &rad, vecT &prof, const eigenImT1 &im, bool mean=false, double dr=1)
 Calculate the the radial profile. More...
 
template<typename radprofT , typename eigenImT1 , typename eigenImT2 , typename eigenImT3 >
void mx::improc::radprofim (radprofT &radprofIm, eigenImT1 &im, const eigenImT2 &rad, const eigenImT3 *mask, bool subtract, bool mean=false)
 Form a radial profile image, and optionally subtract it from the input. More...
 
template<typename radprofT , typename eigenImT >
void mx::improc::radprofim (radprofT &radprof, eigenImT &im, bool subtract=false, bool mean=false)
 Form a radial profile image, and optionally subtract it from the input. More...
 

Function Documentation

◆ radprof() [1/3]

template<typename vecT , typename eigenImT1 >
void mx::improc::radprof ( vecT &  rad,
vecT &  prof,
const eigenImT1 &  im,
bool  mean = false,
double  dr = 1 
)

Calculate the the radial profile.

The median radial profile is calculated by rebinning to a 1 pixel grid. This version calculates a centered radius image.

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

Template Parameters
vecTthe std::vector-like type to contain the profile
eigenImT1the eigen-array-like type of the input image
Parameters
[out]radthe radius points for the profile. Should be empty.
[out]profthe median image value at the corresponding radius. Should be empty.
[in]imthe image of which to calculate the profile
[in]mean[optional] set to true to use the mean. If false (default) the median is used.

Definition at line 973 of file imageFilters.hpp.

References mx::improc::radiusImage().

Referenced by mx::improc::radprof(), and mx::improc::radprofim().

◆ radprof() [2/3]

template<typename vecT , typename eigenImT1 , typename eigenImT2 >
void mx::improc::radprof ( vecT &  rad,
vecT &  prof,
const eigenImT1 &  im,
const eigenImT2 &  mask,
bool  mean = false 
)

Calculate the the radial profile.

The median radial profile is calculated by rebinning to a 1 pixel grid. This version calculates a centered radius image.

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

Template Parameters
vecTthe std::vector-like type to contain the profile
eigenImT1the eigen-array-like type of the input image
eigenImT2the eigen-array-like type of the radius and mask image
eigenImT3the eigen-array-like type of the mask image
Parameters
[out]radthe radius points for the profile. Should be empty.
[out]profthe median image value at the corresponding radius. Should be empty.
[in]imthe image of which to calculate the profile
[in]mask1/0 mask, only pixels with a value of 1 are included in the profile
[in]mean[optional] set to true to use the mean. If false (default) the median is used.

Definition at line 946 of file imageFilters.hpp.

References mx::improc::radiusImage(), and mx::improc::radprof().

◆ radprof() [3/3]

template<typename vecT , typename eigenImT1 , typename eigenImT2 , typename eigenImT3 >
void mx::improc::radprof ( vecT &  rad,
vecT &  prof,
const eigenImT1 &  im,
const eigenImT2 &  radim,
const eigenImT3 *  mask,
bool  mean = false,
typename eigenImT1::Scalar  minr = 0 
)

Calculate the the radial profile.

The median radial profile is calculated by rebinning to a 1 pixel grid.

Template Parameters
vecTthe std::vector-like type to contain the profile
eigenImT1the eigen-array-like type of the input image
eigenImT2the eigen-array-like type of the radius and mask image
eigenImT3the eigen-array-like type of the mask image
Parameters
[out]radthe radius points for the profile. Should be empty.
[out]profthe median image value at the corresponding radius. Should be empty.
[in]imthe image of which to calculate the profile
[in]radimimage of radius values per pixel
[in]mask[optional] 1/0 mask, only pixels with a value of 1 are included in the profile. Set to 0 to not use.
[in]mean[optional] set to true to use the mean. If false (default) the median is used.

Definition at line 826 of file imageFilters.hpp.

References mx::astro::constants::c().

◆ radprofim() [1/2]

template<typename radprofT , typename eigenImT >
void mx::improc::radprofim ( radprofT &  radprof,
eigenImT &  im,
bool  subtract = false,
bool  mean = false 
)

Form a radial profile image, and optionally subtract it from the input.

The radial profile is calculated using linear interpolation on a 1 pixel grid. This version calculates a centered radius image.

Template Parameters
radprofTthe eigen array type of the output
eigenImTthe eigen array type of the input
Parameters
[out]radprofthe radial profile image. This will be resized.
[in]imthe image to form the profile of.
[in]subtract[optional] if true, then on ouput im will have had its radial profile subtracted.
[in]mean[optional] set to true to use the mean. If false (default) the median is used.

Definition at line 1052 of file imageFilters.hpp.

References mx::improc::radiusImage(), and mx::improc::radprof().

◆ radprofim() [2/2]

template<typename radprofT , typename eigenImT1 , typename eigenImT2 , typename eigenImT3 >
void mx::improc::radprofim ( radprofT &  radprofIm,
eigenImT1 &  im,
const eigenImT2 &  rad,
const eigenImT3 *  mask,
bool  subtract,
bool  mean = false 
)

Form a radial profile image, and optionally subtract it from the input.

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

Template Parameters
radprofTthe eigen array type of the output
eigenImT1the eigen array type of the input image
eigenImT2the eigen array type of the radius image
eigenImT3the eigen array type of the mask image
Parameters
[out]radprofImthe radial profile image. This will be resized.
im[in the image to form the profile of.
[in]radan array of radius values for each pixel
[in]mask[optional 1/0 mask, only pixels with a value of 1 are included in the profile. Can be nullptr.
[in]subtractif true, then on ouput im will have had its radial profile subtracted.
[in]mean[optional] set to true to use the mean. If false (default) the median is used.

Definition at line 1000 of file imageFilters.hpp.

References mx::astro::constants::c(), and mx::improc::radprof().

Referenced by mx::improc::HCIobservation< _realT >::preProcess().