#include <diffractive_wavefront.h>
Inheritance diagram for Arroyo::diffractive_wavefront< T >:

Public Member Functions | |
| diffractive_wavefront () | |
| diffractive_wavefront (const diffractive_wavefront< T > &dwf) | |
| diffractive_wavefront (const char *filename) | |
| diffractive_wavefront (const iofits &iof) | |
| diffractive_wavefront (const diffractive_wavefront_header< T > &dwfh, T *data=NULL, bool rl_img=true, bool intrlvd=true) | |
| ~diffractive_wavefront () | |
| diffractive_wavefront & | operator= (const diffractive_wavefront< T > &dwf) |
| void | resize (const vector< long > &axes) |
| void | mask () |
| template<class U> | |
| void | install (const pixel_amp_array< U > &pixamparr) |
| template<class U> | |
| void | install (const pixel_phase_array< U > &pixpharr) |
| pixel_amp_array< T > | extract_amps () const |
| pixel_phase_array< T > | extract_phases () const |
| void | wrap_phases () |
| void | read (const char *filename) |
| void | read (const iofits &iof) |
| void | write (const char *filename) const |
| void | write (iofits &iof) const |
| void | write_amps_to_ppm (double min, double max, bool logscale, bool colorbar, colormap *cmap, const char *filename, long min_dimen=-1) const |
| void | write_phases_to_ppm (double min, double max, bool colorbar, colormap *cmap, const char *filename, long min_dimen=-1) const |
| void | print (ostream &os, const char *prefix) const |
| std::complex< T > | data (int n) const |
| void | set_data (int n, std::complex< T > &dat) |
| void | set_propagation_direction (const three_vector &prop_dir) |
| void | set_wavefront_curvature (double curvature) |
| void | exact_propagator (double distance, double final_pixel_scale=-1, vector< long > final_axes=vector< long >()) |
| void | geometric_propagator (double distance) |
| void | near_field_angular_propagator (double distance) |
| void | near_field_fresnel_propagator (double distance) |
| void | far_field_fresnel_propagator (double distance) |
| void | far_field_fraunhoffer_propagator (double distance) |
| void | far_field_fresnel_goertzel_reinsch_propagator (double distance, double final_pixel_scale, vector< long > final_axes) |
| void | far_field_fraunhoffer_goertzel_reinsch_propagator (double distance, double final_pixel_scale, vector< long > final_axes) |
| void | finite_difference_method_propagator (double distance) |
| void | rotate (double angle) |
| double | total_power () const |
| template<class U> | |
| void | pad_array (int npad, std::complex< U > value) |
| void | clip_array (int nclip) |
| template<class U> | |
| diffractive_wavefront< T > & | operator+= (std::complex< U > c) |
| template<class U> | |
| diffractive_wavefront< T > & | operator-= (std::complex< U > c) |
| template<class U> | |
| diffractive_wavefront< T > & | operator *= (std::complex< U > c) |
| template<class U> | |
| diffractive_wavefront< T > & | operator/= (std::complex< U > c) |
Protected Member Functions | |
| void | real_imag_conversion () const |
| void | amp_phase_conversion () const |
| void | interleaved_conversion () const |
| void | non_interleaved_conversion () const |
Protected Attributes | |
| T * | wfdata |
| The array of complex elements. | |
| bool | real_imag |
| A flag to indicate whether data is real-imag or amp-phase. | |
| bool | interleaved |
| A flag to indicate whether data is interleaved. | |
Friends | |
| class | one_to_one_optic |
| class | one_to_many_optic |
| template<class U, class V> | |
| diffractive_wavefront< U > & | operator+= (diffractive_wavefront< U > &lhs_dwf, const diffractive_wavefront< V > &rhs_dwf) |
| template<class U, class V> | |
| diffractive_wavefront< U > & | operator-= (diffractive_wavefront< U > &lhs_dwf, const diffractive_wavefront< V > &rhs_dwf) |
| template<class U, class V> | |
| diffractive_wavefront< U > & | operator *= (diffractive_wavefront< U > &lhs_dwf, const diffractive_wavefront< V > &rhs_dwf) |
| template<class U, class V> | |
| diffractive_wavefront< U > & | operator/= (diffractive_wavefront< U > &lhs_dwf, const diffractive_wavefront< V > &rhs_dwf) |
| bool | operator== (const diffractive_wavefront< T > &dwf1, const diffractive_wavefront< T > &dwf2) |
|
|||||||||
|
Null constructor |
|
||||||||||
|
Copy constructor |
|
||||||||||
|
Construct from a file |
|
||||||||||
|
Construct from an iofits object |
|
||||||||||||||||||||||||
|
Construct from the bits |
|
|||||||||
|
Null destructor |
|
|||||||||
|
Convert array to amp/phase storage. This conversion is idempotent. |
|
||||||||||
|
Clip each edge of the array by nclip pixels |
|
||||||||||
|
Return nth data element as a complex number. The data is indexed as n - i*axes[0]+j, where 0 <= i < axes[1] 0 <= j < axes[0] |
|
||||||||||||||||||||
|
Propagate without approximation by direct computation of the Rayleigh-Sommerfeld diffraction formula This propagator permits a change in the dimensionality and pixel scale of the final array. These parameters may be reset using the default arguments, whose default values leave these parameters unchanged. Time scale: for NxN array, this requires N^{4} operations Arguments: distance is in meters optional final_pixel_scale must be positive definite optional axes must have 2 dimensions with positive definite values. These values may be even or odd. |
|
|||||||||
|
Extract amplitudes from the diffractive_wavefront |
|
|||||||||
|
Extract phases from the diffractive_wavefront |
|
||||||||||||||||||||
|
Propagate using far field fraunhoffer propagator and the Goertzel-Reinsch algorithm This propagator permits a change in the dimensionality and pixel scale of the final array. Time scale: Unknown Arguments Distance is in meters Optional final_pixel_scale is in meters per pixel Optional axes must have 2 dimensions with positive definite values. These values may be even or odd. |
|
||||||||||
|
Propagate using far field fraunhoffer propagator This function is an approximate form for the far_field_fresnel_propagator Time scale: Requires 1 fft Arguments Distance is in meters |
|
||||||||||||||||||||
|
Propagate using far field fresnel propagator and the Goertzel-Reinsch algorithm This propagator permits a change in the dimensionality and pixel scale of the final array. Time scale: unknown Arguments Distance is in meters Optional final_pixel_scale is in meters per pixel Optional axes must have 2 dimensions with positive definite values. These values may be even or odd. |
|
||||||||||
|
Propagate using far field frenel propagator (the paraxial approximation) Time scale: Requires 1 fft Arguments: Distance is in meters |
|
||||||||||
|
Propagate using finite difference method Arguments: Distance is in meters |
|
||||||||||
|
Propagate the wavefront geometrically. The effect of this propagator is to translate the wavefront along the z axis of its three frame by the distance provided. |
|
||||||||||||||
|
Install phases from a pixel_phase_array |
|
||||||||||||||
|
Install amplitudes from a pixel_amp_array |
|
|||||||||
|
Convert array to interleaved storage That is, when real_imag == TRUE, we have real[0],imag[0],real[1],imag[1]... and when real_imag == FALSE, we have amp[0],phase[0],amp[1],phase[1]... This conversion is idempotent. |
|
|||||||||
|
Perform a pixel by pixel check, zeroing the wavefront phases if the corresponding wavefront amplitudes are zero. |
|
||||||||||
|
Propagate using angular spectrum This function will later handle verging beams using GLAD's formulation Time scale: Requires 2 ffts Arguments: Distance is in meters |
|
||||||||||
|
Propagate using near field fresnel propagator (the paraxial approximation for the angular spectrum) This function is an approximate form for the near_field_angular_propagator This function will later handle verging beams using GLAD's formulation Time scale: Requires 2 ffts Arguments: Distance is in meters |
|
|||||||||
|
Convert array to contiguous storage. That is, when real_imag == TRUE, we have real[0],...real[N-1],imag[0]...imag[N-1] and when real_imag == FALSE, we have amp[0],...amp[N-1],phase[0]...phase[N-1] This conversion is idempotent. |
|
||||||||||||||
|
Operator *= for doubles |
|
||||||||||||||
|
Operator += for doubles |
|
||||||||||||||
|
Operator -= for doubles |
|
||||||||||||||
|
Operator /= for doubles |
|
||||||||||
|
Operator = |
|
||||||||||||||||||||
|
Pad each edge of the array by npad pixels and initialize to the specified value |
|
||||||||||||||||
|
Print information about the diffractive_wavefront Implements Arroyo::wavefront. |
|
||||||||||
|
Read diffractive_wavefront from an iofits object Implements Arroyo::wavefront. |
|
||||||||||
|
Read diffractive_wavefront from a file Implements Arroyo::wavefront. |
|
|||||||||
|
Convert array to real/imag storage. This conversion is idempotent. |
|
||||||||||
|
Resize the array of data |
|
||||||||||
|
Rotate array by angle Arguments: Angle is in radians |
|
||||||||||||||||
|
Set nth data element to a complex number The data is indexed as n - i*axes[0]+j, where 0 <= i < axes[1] 0 <= j < axes[0] |
|
||||||||||
|
Set the propagation direction to lie along the direction prop_dir. This member function modifies the phase of the wavefront to account for the change in direction. |
|
||||||||||
|
Sets wavefront curvature in the header and removes this curvature from the phase |
|
|||||||||
|
Return total power in the image |
|
|||||||||
|
Wrap phases in the diffractive_wavefront into the interval [-M_PI,M_PI) |
|
||||||||||
|
Write diffractive_wavefront to an iofits object In general, details of the fits file format should be invisible to the library user. However, for diffractive wavefronts it is useful to know that you can display the amplitudes using ds9 filename and the phases using ds9 filename[1] Implements Arroyo::wavefront. |
|
||||||||||
|
Write diffractive_wavefront to a file In general, details of the fits file format should be invisible to the library user. However, for diffractive wavefronts it is useful to know that you can display the amplitudes using ds9 filename and the phases using ds9 filename[1] Amplitudes mean the amplitude of the complex phasor - not the amplitude squared. Implements Arroyo::wavefront. |
|
||||||||||||||||||||||||||||||||||||
|
Write diffractive_wavefront amplitudes to a ppm file. The data is discretized into 255 levels per RGB color in this operation, using the colormap provided. If the amplitudes fall outside the range [min, max], this function throws an error. The format of a ppm file may be found at www.dcs.ed.ac.uk/home/mxr/gfx/ This function is meant to facilitate the creation of mpegs using ppmtompeg. |
|
||||||||||||||||||||||||||||||||
|
Write diffractive_wavefront phases to a ppm file. The data is discretized into 255 levels per RGB color in this operation, using the colormap provided. If the phases fall outside the range [min, max], this function throws an error. The format of a ppm file may be found at www.dcs.ed.ac.uk/home/mxr/gfx/ This function is meant to facilitate the creation of mpegs using ppmtompeg. |
|
|||||
|
The optics are going to transform the diffractive_wavefront, and any practical, efficient implementation requires access to the protected wfdata array. So we make the base class of the optic inheritance hierarchy a friend of diffractive_wavefront, and then write protected member functions in optic that return protected data from diffractive_wavefront. |
|
|||||
|
The optics are going to transform the diffractive_wavefront, and any practical, efficient implementation requires access to the protected wfdata array. So we make the base class of the optic inheritance hierarchy a friend of diffractive_wavefront, and then write protected member functions in optic that return protected data from diffractive_wavefront. |
|
||||||||||||||||||||
|
Friend declaration for operator *= for diffractive_wavefronts |
|
||||||||||||||||||||
|
Friend declaration for operator += for diffractive_wavefronts |
|
||||||||||||||||||||
|
Friend declaration for operator -= for diffractive_wavefronts |
|
||||||||||||||||||||
|
Friend declaration for operator /= for diffractive_wavefronts |
|
||||||||||||||||
|
Friend operator == for diffractive_wavefronts |
|
|||||
|
A flag to indicate whether data is interleaved.
|
|
|||||
|
A flag to indicate whether data is real-imag or amp-phase. The following functions non-destructively modify the order and representation of the data. These conversions help to modify the data so that it may be transformed efficiently by different fft libraries and may be modified by optics. e.g. FFTW requires interleaved real-imag, while Intel MKL requires non-interleaved real-imag |
|
|||||
|
The array of complex elements.
|
1.3.9.1