Distortion Class Reference

Public Types

Public Member Functions



Static Public Attributes

Protected Attributes

Friends


Detailed Description

this class encapsulates all the knowledge about the geometric distortion pattern of the VIRUS spectrograph. it maps (wavelength, fiber) <-> (x_ccd,y_ccd). it contains routines to fit a solution and to access the solution and its inverse.

Together with FiberModel and PsfModel, this forms a complete model of the VIRUS spectrograph.


Member Typedef Documentation

typedef double Distortion::coeff_t

Constructor & Destructor Documentation

Distortion::Distortion (  ) 
Distortion::Distortion ( const std::string &  filename  ) 

References init_from_file().

Distortion::Distortion ( const Distortion other  ) 
virtual Distortion::~Distortion (  )  [inline, virtual]

Member Function Documentation

void Distortion::init_from_file ( const std::string &  filename  ) 
void Distortion::set_niter ( const int  i = 1  )  [inline]

References fit_niter_.

Referenced by fit_initial_dist(), and main().

void Distortion::set_reference ( const MArray< float, 1 > &  w,
const MArray< float, 1 > &  f,
const float  wave 
)

set reference w,f for each fiber for a given single wavelength (for high order offsets from the smooth solution)

References reference_f_, reference_w_, reference_wavelength_, wave_offsets_, and x_offsets_.

Referenced by fit_initial_dist(), and main().

void Distortion::set_reference_f ( const MArray< float, 1 > &  f  ) 

References reference_f_.

Referenced by main(), and refit_models().

void Distortion::calculate_offsets ( const MArray< DistDataTuple, 2 > &  D  ) 
void Distortion::apply_offsets ( MArray< DistDataTuple, 2 > &  D  ) 

References wave_offsets_, and x_offsets_.

Referenced by fit_with_arc().

float Distortion::get_reference_f ( int  fibernum  )  const [inline]
float Distortion::get_reference_wavelength (  )  const [inline]
MArray< float, 1 > Distortion::get_reference_f (  )  const

References reference_f_.

MArray< float, 1 > Distortion::get_reference_w (  )  const

References reference_w_.

void Distortion::get_wavelength_boundaries ( int  px,
int  py,
float *  wl,
float *  wu 
) const
void Distortion::get_fiber_boundaries ( int  px,
int  py,
float *  fl,
float *  fu 
) const

References map_xy_fiber().

void Distortion::get_pixel_boundaries ( int  px,
int  py,
float *  wl,
float *  wu,
float *  fl,
float *  fu 
) const
int Distortion::get_numfibers (  )  const [inline]
float Distortion::get_position_angle ( const float  w,
const float  f 
) const

return the position angle (the direction along a fiber) at postion {w,f}. the angle is returned in degrees counterclockwise

References map_wf_x(), and map_wf_y().

Referenced by Measure::fit_psf2D(), and PsfModel::get_psf().

TPar Distortion::get_w_coefficients ( void   )  const [inline]

get arrays of coefficients

References wave_par_.

TPar Distortion::get_f_coefficients ( void   )  const [inline]

References fiber_par_.

TPar Distortion::get_x_coefficients ( void   )  const [inline]

References x_par_.

TPar Distortion::get_y_coefficients ( void   )  const [inline]

References y_par_.

TPar Distortion::get_fy_coefficients ( void   )  const [inline]

References fy_par_.

float Distortion::map_xy_wavelength ( float  x,
float  y 
) const
float Distortion::map_xy_fiber ( float  x,
float  y 
) const
float Distortion::map_xf_y ( float  x,
float  f 
) const
float Distortion::map_wf_x ( float  w,
float  f 
) const
float Distortion::map_wf_y ( float  w,
float  f 
) const
float Distortion::map_xy_yprime ( float  x,
float  y 
) const
int Distortion::map_xy_fibernum ( float  x,
float  y 
) const
float Distortion::map_xy_wavelength_fast ( float  x,
float  y,
float *  dw 
) const
float Distortion::map_xy_fiber_fast ( float  x,
float  y,
float *  df 
) const
float Distortion::map_forward_x ( const float  x,
const float  y 
) const [inline]

interface compatible with resampler transform objects see resmapler.h / transform.h

References map_xy_wavelength().

Referenced by get_forward_J().

float Distortion::map_forward_y ( const float  x,
const float  y 
) const [inline]

References map_xy_fiber().

Referenced by get_forward_J().

float Distortion::get_forward_J ( const float  x,
const float  y,
const float  dx,
const float  dy 
) const

References map_forward_x(), and map_forward_y().

float Distortion::map_inverse_x ( const float  u,
const float  v 
) const [inline]

References map_wf_x().

Referenced by get_inverse_J().

float Distortion::map_inverse_y ( const float  u,
const float  v 
) const [inline]

References map_wf_y().

Referenced by get_inverse_J().

float Distortion::get_inverse_J ( const float  u,
const float  v,
const float  du,
const float  dv 
) const

References map_inverse_x(), and map_inverse_y().

void Distortion::write_fits_map ( const string &  basename,
int  x1,
int  x2,
int  y1,
int  y2 
) const
void Distortion::fit_wavelength ( MArray< coeff_t, 1 > &  x,
MArray< coeff_t, 1 > &  y,
MArray< coeff_t, 1 > &  wavelengths,
MArray< coeff_t, 1 > &  w_errors 
)
void Distortion::fit_fiberpos ( MArray< coeff_t, 1 > &  x,
MArray< coeff_t, 1 > &  y,
MArray< coeff_t, 1 > &  fiberpos,
MArray< coeff_t, 1 > &  f_errors 
)
void Distortion::fit_x ( MArray< coeff_t, 1 > &  w,
MArray< coeff_t, 1 > &  f,
MArray< coeff_t, 1 > &  x,
MArray< coeff_t, 1 > &  x_errors 
)
void Distortion::fit_y ( MArray< coeff_t, 1 > &  w,
MArray< coeff_t, 1 > &  f,
MArray< coeff_t, 1 > &  y,
MArray< coeff_t, 1 > &  y_errors 
)
void Distortion::fit_fy ( MArray< coeff_t, 1 > &  x,
MArray< coeff_t, 1 > &  f,
MArray< coeff_t, 1 > &  y,
MArray< coeff_t, 1 > &  y_errors 
)
void Distortion::fit_yprime ( MArray< coeff_t, 1 > &  x,
MArray< coeff_t, 1 > &  y,
MArray< coeff_t, 1 > &  yprime,
MArray< coeff_t, 1 > &  yprime_errors 
)
void Distortion::print_w_coefficients (  ) 
void Distortion::print_f_coefficients (  ) 
void Distortion::print_x_coefficients (  ) 
void Distortion::print_y_coefficients (  ) 
void Distortion::print_fy_coefficients (  ) 
void Distortion::print_yprime_coefficients (  ) 

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const Distortion d 
) [friend]
std::istream& operator>> ( std::istream &  is,
Distortion d 
) [friend]

Field Documentation

string Distortion::version = "$Id: distortion.cpp 1075 2015-10-17 18:44:29Z snigula $" [static]

Referenced by main().

MArray<float,1> Distortion::reference_w_ [protected]
MArray<float,1> Distortion::reference_f_ [protected]
TPar Distortion::x_par_ [protected]
TPar Distortion::y_par_ [protected]
MArray<float,1> Distortion::x_offsets_ [protected]
MArray<float,1> Distortion::wave_offsets_ [protected]
int Distortion::fit_niter_ [protected]

Generated on 4 Nov 2015 for CURE by  doxygen 1.6.1