|
OPERA
1.0
Open source echelle spectrograph reduction pipeline
|

Go to the source code of this file.
Functions | |
| void | operaLMFitPolynomial (unsigned m_dat, double *x, double *y, int n_par, double par[], double *chi2, int verbose) |
| void | operaLMFitGaussian (unsigned m_dat, double *x, double *y, double *a, double *x0, double *sig, double *chi2, int verbose) |
| This function performs Gaussian Fitting using the Levenberg-Marquardt method. | |
| void | operaLMFit2DPolynomial (unsigned m_dat, double *x, double *y, double *fxy, int n_par, double par[], double *chi2, int verbose) |
| void | operaLMFit2DGaussian (unsigned m_dat, double *x, double *y, double *fxy, double *a, double *x0, double *y0, double *sigx, double *sigy, double *chi2, int verbose) |
| This function performs 2D Gaussian Fitting using the Levenberg-Marquardt method. | |
| void | operaFitSpline (unsigned nin, float *xin, float *yin, unsigned nout, float *xout, float *yout) |
| This function performs interpolation of an input array using a sufficiently smooth piecewise-polynomial function (cubic spline) | |
| void | operaFit2DSpline (unsigned nxin, float *xin, unsigned nyin, float *yin, double *fxyin, unsigned nxout, float *xout, unsigned nyout, float *yout, float *fxyout) |
| This function performs interpolation of an input 2D-array using a sufficiently smooth piecewise-polynomial function (cubic spline) | |
| void | spline (float x[], float y[], int n, float yp1, float ypn, float y2[]) |
| void | splint (float xa[], float ya[], float y2a[], int n, float x, float *y) |
| void | splin2 (float x1a[], float x2a[], float **ya, float **y2a, int m, int n, float x1, float x2, float *y) |
| void | splie2 (float x1a[], float x2a[], float **ya, int m, int n, float **y2a) |
| void | operaMedfit (float xin[], float yin[], int ndata, float *a, float *b, float *abdev) |
| This function performs robust linear fit: f(x) = a + b*x. | |
| float | rofunc (float b) |
| This function ... | |
| float | select_nr (unsigned long k, unsigned long n, float arr[]) |
| This function ... | |
| float ** | matrix (long nrl, long nrh, long ncl, long nch) |
| void | free_matrix (float **m, long nrl, long nrh, long ncl, long nch) |
| float * | vector (long nl, long nh) |
| This function allocates a float vector with subscript range v[nl..nh]. | |
| void | free_vector (float *v, long nl, long nh) |
| This function frees a float vector allocated with vector(). | |
| void | nrerror (char error_text[]) |
| void free_matrix | ( | float ** | m, |
| long | nrl, | ||
| long | nrh, | ||
| long | ncl, | ||
| long | nch | ||
| ) |
| void free_vector | ( | float * | v, |
| long | nl, | ||
| long | nh | ||
| ) |
This function frees a float vector allocated with vector().
fvoid free_vector(float *v, long nl, long nh)
| v | is a double pointer that .., |
| nl | is a long that .., |
| nh | is a long that .., |
| float** matrix | ( | long | nrl, |
| long | nrh, | ||
| long | ncl, | ||
| long | nch | ||
| ) |

| void nrerror | ( | char | error_text[] | ) |
| void operaFit2DSpline | ( | unsigned | nxin, |
| float * | xin, | ||
| unsigned | nyin, | ||
| float * | yin, | ||
| double * | fxyin, | ||
| unsigned | nxout, | ||
| float * | xout, | ||
| unsigned | nyout, | ||
| float * | yout, | ||
| float * | fxyout | ||
| ) |
This function performs interpolation of an input 2D-array using a sufficiently smooth piecewise-polynomial function (cubic spline)
void operaFitSpline(unsigned nin, float *xin,float *yin, unsigned nout, float *xout, float *yout)
| nxin | is an unsigned for the number of x input data points |
| xin | is a float array for the input x data points |
| nyin | is an unsigned for the number of y input data points |
| yin | is a float array for the input y data points |
| fxyin | is a float array for the input fxy data points |
| nxout | is an unsigned for the number of x output data points. |
| xout | is a float array for the output x data points, which should be provided. |
| nyout | is an unsigned for the number of y output data points. |
| yout | is a float array for the output y data points, which should be provided. |
| fxyout | is a float array for the output interpolated fxy data points, which is calculated |

| void operaFitSpline | ( | unsigned | nin, |
| float * | xin, | ||
| float * | yin, | ||
| unsigned | nout, | ||
| float * | xout, | ||
| float * | yout | ||
| ) |
This function performs interpolation of an input array using a sufficiently smooth piecewise-polynomial function (cubic spline)
void operaFitSpline(unsigned nin, float *xin,float *yin, unsigned nout, float *xout, float *yout)
| nin | is an unsigned for the number of input data points |
| xin | is a float array for the input x data points |
| yin | is a float array for the input y data points |
| nout | is an unsigned for the number of output data points |
| xout | is a float array for the output x data points, which should be provided. |
| yout | is a float array for the output interpolated y data points, which is calculated |

| void operaLMFit2DGaussian | ( | unsigned | m_dat, |
| double * | x, | ||
| double * | y, | ||
| double * | fxy, | ||
| double * | a, | ||
| double * | x0, | ||
| double * | y0, | ||
| double * | sigx, | ||
| double * | sigy, | ||
| double * | chi2, | ||
| int | verbose | ||
| ) |
This function performs 2D Gaussian Fitting using the Levenberg-Marquardt method.
| m_dat | is an unsigned for the number of data points |
| x | is a double pointer with x data values |
| y | is a double pointer with y data values |
| a | is a double pointer for the amplitude of the Gaussian |
| x0 | is a double pointer for the x-center of the Gaussian |
| y0 | is a double pointer for the y-center of the Gaussian |
| sigx | is a double pointer for the spread of the Gaussian in the x-direction |
| sigy | is a double pointer for the spread of the Gaussian in the y-direction |
| chi2 | is a double pointer that returns the reduced chi-square of the fit |
| verbose | is an int that controls print option: 1=on, 0=off |

| void operaLMFit2DPolynomial | ( | unsigned | m_dat, |
| double * | x, | ||
| double * | y, | ||
| double * | fxy, | ||
| int | n_par, | ||
| double | par[], | ||
| double * | chi2, | ||
| int | verbose | ||
| ) |
| void operaLMFitGaussian | ( | unsigned | m_dat, |
| double * | x, | ||
| double * | y, | ||
| double * | a, | ||
| double * | x0, | ||
| double * | sig, | ||
| double * | chi2, | ||
| int | verbose | ||
| ) |
This function performs Gaussian Fitting using the Levenberg-Marquardt method.
| m_dat | is an unsigned for the number of data points |
| x | is a double pointer with x data values |
| y | is a double pointer with y data values |
| a | is a double pointer for the amplitude of the Gaussian |
| x0 | is a double pointer for the center of the Gaussian |
| sig | is a double pointer for the spread of the Gaussian |
| chi2 | is a double pointer that returns the reduced chi-square of the fit |
| verbose | is an int that controls print option: 1=on, 0=off |

| void operaLMFitPolynomial | ( | unsigned | m_dat, |
| double * | x, | ||
| double * | y, | ||
| int | n_par, | ||
| double | par[], | ||
| double * | chi2, | ||
| int | verbose | ||
| ) |
| void operaMedfit | ( | float | xin[], |
| float | yin[], | ||
| int | ndata, | ||
| float * | a, | ||
| float * | b, | ||
| float * | abdev | ||
| ) |
This function performs robust linear fit: f(x) = a + b*x.
void operaMedfit(float xin[], float yin[], int ndata, float *a, float *b, float *abdev)
| xin | is a float array with data values |
| yin | is a float array with data values |
| ndata | is an int for the number of data points |
| a | is a double pointer for the linear coefficient |
| b | is a double pointer for the angular coefficient |
| abdev | is a double pointer for the absolute deviation (~chi-square) |

| float rofunc | ( | float | b | ) |
This function ...
float rofunc(float b)
| b | is a double that .., |

| float select_nr | ( | unsigned long | k, |
| unsigned long | n, | ||
| float | arr[] | ||
| ) |
This function ...
float select_nr(unsigned long k, unsigned long n, float arr[])
| k | is an unsigned long that .., |
| n | is an unsigned long that .., |
| arr | is a double pointer that .., |
| void splie2 | ( | float | x1a[], |
| float | x2a[], | ||
| float ** | ya, | ||
| int | m, | ||
| int | n, | ||
| float ** | y2a | ||
| ) |

| void splin2 | ( | float | x1a[], |
| float | x2a[], | ||
| float ** | ya, | ||
| float ** | y2a, | ||
| int | m, | ||
| int | n, | ||
| float | x1, | ||
| float | x2, | ||
| float * | y | ||
| ) |

| void spline | ( | float | x[], |
| float | y[], | ||
| int | n, | ||
| float | yp1, | ||
| float | ypn, | ||
| float | y2[] | ||
| ) |

| void splint | ( | float | xa[], |
| float | ya[], | ||
| float | y2a[], | ||
| int | n, | ||
| float | x, | ||
| float * | y | ||
| ) |

| float* vector | ( | long | nl, |
| long | nh | ||
| ) |
This function allocates a float vector with subscript range v[nl..nh].
float *vector(long nl, long nh)
| nl | is a long that .., |
| nh | is a long that .., |