#include <pixel_array.h>
Inheritance diagram for Arroyo::pixel_array< T >:
Public Member Functions | |
| pixel_array () | |
| pixel_array (const pixel_array< T > &pixarr) | |
| template<class U> | |
| pixel_array (const pixel_array< U > &pixarr, const vector< long > &pixel_limits) | |
| pixel_array (const vector< long > &in_axes, const T *data=NULL, const float *wts=NULL) | |
| ~pixel_array () | |
| pixel_array< T > & | operator= (const pixel_array< T > &pixarr) |
| virtual void | read (const iofits &iof) |
| virtual void | write (iofits &iof) const |
| void | write_to_ppm (double min, double max, bool logscale, bool colorbar, colormap *cmap, const char *filename, long min_dimen=-1) const |
| int | total_space () const |
| bool | weights_allocated () const |
| vector< long > | get_axes () const |
| template<class U> | |
| void | copyfrom (const pixel_array< U > &pixarr) |
| void | print_axes (ostream &os) const |
| T | data (long n) const |
| void | set_data (long n, T val) const |
| float | wt (long elem) const |
| void | min_and_max (double &min, double &max) const |
| void | min_and_max (double &min, vector< int > &minpixel, double &max, vector< int > &maxpixel) const |
| void | min_and_max (double &min, vector< int > &minpixel, double &max, vector< int > &maxpixel, vector< int > axis_0_limits, vector< int > axis_1_limits) const |
| void | flip_x () |
| void | flip_y () |
| void | flip_xy () |
| void | flip_45 () |
| void | pad_array (int npad, double value=0) |
| void | clip_array (int nclip) |
| void | shift_by_fft (double dx, double dy) |
| void | rotate_by_fft (double angle, bool window=true) |
| void | rotate_and_shift_by_fft (double dx, double dy, double angle, bool window=true) |
| void | owen_makedon_rotate_and_shift_by_fft (double dx, double dy, double angle) |
| pixel_array< T > | cross_correlate (const pixel_array< T > &pixarr) const |
| void | offset (const pixel_array< T > &pixarr, vector< double > &offsets, long range=-1) const |
| virtual pixel_array< T > & | operator+= (const double &fac) |
| virtual pixel_array< T > & | operator-= (const double &fac) |
| virtual pixel_array< T > & | operator *= (const double &fac) |
| virtual pixel_array< T > & | operator/= (const double &fac) |
Static Public Attributes | |
| int | verbose_level = 0 |
| Verbose level. | |
Protected Member Functions | |
| void | set_axes (const vector< long > &in_axes) |
| void | allocate_weights (double wt) |
| void | deallocate_weights () |
| double | normalize_by_wts () |
| void | decimate (int nadd) |
| template<class U> | |
| void | flag_zero_wts (const pixel_array< U > &pixarr) |
| void | mask () |
| template<class U> | |
| void | mask (const pixel_array< U > *pixarr) |
| pixel_array (const iofits &iof) | |
Protected Attributes | |
| vector< long > | axes |
| axes of underlying array | |
| T * | pixeldata |
| pointer to the data | |
| float * | pixelwts |
| pointer to the weights | |
Friends | |
| template<class U, class V> | |
| pixel_array< U > & | operator+= (pixel_array< U > &lhs, const pixel_array< V > &rhs) |
| template<class U, class V> | |
| pixel_array< U > & | operator-= (pixel_array< U > &lhs, const pixel_array< V > &rhs) |
| template<class U, class V> | |
| pixel_array< U > & | operator *= (pixel_array< U > &lhs, const pixel_array< V > &rhs) |
| template<class U, class V> | |
| pixel_array< U > & | operator/= (pixel_array< U > &lhs, const pixel_array< V > &rhs) |
| bool | operator== (const pixel_array< T > &p1, const pixel_array< T > &p2) |
|
||||||||||
|
Construct from iofits object |
|
|||||||||
|
Null constructor |
|
||||||||||
|
Copy constructor template<class U> - there is not yet an operator = for different template types |
|
||||||||||||||||||||
|
Construct an instance with pixel limits given by pixel_limits These limits must be contained by pixarr's arrays The array pixel_limits has 4 elements: xmin, xmax, ymin, ymax So far this has only been coded for 2d pixel_arrays |
|
||||||||||||||||||||
|
Construct from arrays If wts == NULL, weights will not be allocated If data == NULL && wts == NULL data will be allocated and initialized to zero |
|
|||||||||
|
Destructor |
|
||||||||||
|
Allocate weights. If weights have already been allocated, they are reinitialized to wt If pixeldata == NULL, pixelwts is set to NULL |
|
||||||||||
|
Clip each edge of the array by nclip pixels |
|
||||||||||||||
|
Function to copy pixel array This function performs template conversions through implicit casts. |
|
||||||||||
|
Function to cross-correlate with another pixel_array Cross correlation performed via fft |
|
||||||||||
|
Get nth data element The data is indexed as n = i*axes[0]+j, where 0 <= i < axes[1] 0 <= j < axes[0] |
|
|||||||||
|
Deallocate weights |
|
||||||||||
|
Function to bin together n amplitudes So far this has only been coded for 2d pixel_arrays Reimplemented in Arroyo::pixel_phase_array< T >, and Arroyo::pixel_phase_array< precision >. |
|
||||||||||||||
|
Function to flag weights that are zero in arg |
|
|||||||||
|
Flip data about 45 degree line |
|
|||||||||
|
Flip data about x axis |
|
|||||||||
|
Flip data about x and y axis |
|
|||||||||
|
Flip data about y axis |
|
||||||||||
|
Function to set the axes Reimplemented in Arroyo::refractive_atmospheric_layer< T >, and Arroyo::structure_function. |
|
||||||||||||||
|
Function to apply a mask |
|
|||||||||
|
Function to make this pixel_array into a mask of 1s and 0s based on the value of the pixeldata |
|
||||||||||||||||||||||||||||||||
|
Find min and max within limits |
|
||||||||||||||||||||||||
|
Find min and max of pixel array |
|
||||||||||||||||
|
Find min and max of pixel array |
|
|||||||||
|
Function to normalize data by weights |
|
||||||||||||||||||||
|
Function to fit the offset between the two pixel arrays. The computation is performed using a shift by fft This function returns the number of pixels you have to shift "this" by in order to optimally align it with "pixarr" |
|
||||||||||
|
Operator *= for doubles |
|
||||||||||
|
Operator += for doubles |
|
||||||||||
|
Operator -= for doubles |
|
||||||||||
|
Operator /= for doubles |
|
||||||||||
|
Operator = |
|
||||||||||||||||||||
|
Implementation of the rotate_and_shift_by_fft function, based on an incomprehensible technical report by owen and makedon. |
|
||||||||||||||||
|
Pad each edge of the array by npad pixels and initialize to the specified value |
|
||||||||||
|
Function to print the axes |
|
||||||||||
|
Function to read data from iofits Reimplemented in Arroyo::refractive_atmospheric_layer< T >, and Arroyo::structure_function. |
|
||||||||||||||||||||||||
|
Rotate pixel_array by an angle and shift by dx and dy The resulting pixel array may be larger than the original, so as to be able to include the corners that have rotated outside the original array bounds. This function does not yet support non-zero shifts |
|
||||||||||||||||
|
Rotate pixel_array by an angle The resulting pixel array may be larger than the original, so as to be able to include the corners that have rotated outside the original array bounds. Reimplemented in Arroyo::refractive_atmospheric_layer< T >. |
|
||||||||||
|
Reallocate memory for this pixel_array pixeldata is allocated with in_axes elements and initialized to zero if pixelwts is null it remains so, otherwise it is allocated and initialized to zero Reimplemented in Arroyo::refractive_atmospheric_layer< T >, and Arroyo::structure_function. |
|
||||||||||||||||
|
Set nth data element to val The data is indexed as n = i*axes[0]+j, where 0 <= i < axes[1] 0 <= j < axes[0] |
|
||||||||||||||||
|
Shift a pixel_array by dx and dy |
|
|||||||||
|
Function to compute total number of elements in array |
|
|||||||||
|
Function to report whether weights are allocated |
|
||||||||||
|
Function to write data to iofits Reimplemented in Arroyo::refractive_atmospheric_layer< T >, and Arroyo::structure_function. |
|
||||||||||||||||||||||||||||||||||||
|
Function to write data to a ppm file |
|
||||||||||
|
Function to return weight element |
|
||||||||||||||||||||
|
Friend declaration for operator *= for pixel_arrays |
|
||||||||||||||||||||
|
Friend declaration for operator += for pixel_arrays |
|
||||||||||||||||||||
|
Friend declaration for operator -= for pixel_arrays |
|
||||||||||||||||||||
|
Friend declaration for operator /= for pixel_arrays |
|
||||||||||||||||
|
Friend operator == for pixel_array |
|
|||||
|
axes of underlying array
|
|
|||||
|
pointer to the data
|
|
|||||
|
pointer to the weights
|
|
|||||
|
Verbose level.
Reimplemented in Arroyo::Shack_Hartmann_centroids. |
1.3.9.1