sinfo_new_clean_mean() |
his routine computes the clean mean of a given data
- Parameters:
-
| array,: | data array to average |
| n_elements,: | number of elements of the data array |
| throwaway_low,: | percentage of low value elements to be thrown away before averaging |
| throwaway_high,: | percentage of high value elements to be thrown away before averaging |
- Returns:
- the clean mean of a data array FLT_MAX in case of error this routine computes the clean mean of a given data array that means the array is first sorted and a given percentage of the lowest and the highest values is not considered for averaging
|
float | sinfo_new_clean_mean (float *array, int n_elements, float throwaway_low, float throwaway_high) |
sinfo_new_median() |
sorts an array into ascending numerical order
- Parameters:
-
| array | array of pixelvalues starting at index 0, |
| n | number of array elements |
- Returns:
- median of pixelvalues sorts an array into ascending numerical order by using sinfo_pixel_qsort(), and derives the sinfo_median depending on an odd or even number of array elements
|
pixelvalue | sinfo_new_median (pixelvalue *array, int n) |
sinfo_new_lsqfit_c() |
Least square fit of a function to a set of data points
- Parameters:
-
| xdat,: | position, coordinates of data points. xdat is 2 dimensional: XDAT ( XDIM, NDAT ) |
| xdim,: | dimension of fit |
| ydat,: | data points |
| wdat,: | weights for data points |
| ndat,: | number of data points |
| fpar,: | on input contains initial estimates of the parameters for non-linear fits, on output the fitted parameters. |
| epar,: | contains estimates of the errors in fitted parameters |
| mpar,: | logical mask telling which parameters are free (non-zero) and which parameters are fixed (0) |
| npar,: | number of function parameters ( free + fixed ) |
| tol,: | relative tolerance. sinfo_lsqfit stops when successive iterations fail to produce a decrement in reduced chi-squared less than tol. If tol is less than the minimum tolerance possible, tol will be set to this value. This means that maximum accuracy can be obtained by setting tol = 0.0. |
| its,: | maximum number of iterations |
| lab,: | mixing parameter, lab determines the initial weight of steepest descent method relative to the Taylor method lab should be a small value (i.e. 0.01). lab can only be zero when the partial derivatives are independent of the parameters. In fact in this case lab should be exactly equal to zero. |
- Returns:
- returns number of iterations needed to achieve convergence according to tol. When this number is negative, the fitting was not continued because a fatal error occurred: # -1 too many free parameters, maximum is 32 # -2 no free parameters # -3 not enough degrees of freedom # -4 maximum number of iterations too small to obtain # a solution which satisfies tol. # -5 diagonal of sinfo_matrix contains elements which are zero # -6 determinant of the coefficient sinfo_matrix is zero # -7 square root of a negative number this is a routine for making a least-squares fit of a function to a set of data points. The method used is described in: Marquardt, J.Soc.Ind.Appl.Math. 11. 431 (1963). This method is a mixture of the steepest descent method and the Taylor method.
|
int | sinfo_new_lsqfit_c (float *xdat, int *xdim, float *ydat, float *wdat, int *ndat, float *fpar, float *epar, int *mpar, int *npar, float *tol, int *its, float *lab) |
sinfo_new_convert_ZEROs_to_0_for_images() |
this function converts any ZEROs in an image to 0
- Parameters:
-
- Returns:
- nothing
|
void | sinfo_new_convert_ZEROs_to_0_for_images (cpl_image *im) |
sinfo_new_convert_ZEROs_to_0_for_cubes() |
this function converts any ZEROs in a cube to 0
- Parameters:
-
| cube | input cube |
| z_min | |
| z_max | |
| nothing | |
|
void | sinfo_new_convert_ZEROs_to_0_for_cubes (cpl_imagelist *cube) |
sinfo_new_convert_ZEROs_to_0_for_cubes_range() |
this function converts any ZEROs in a cube to 0
- Parameters:
-
| cube | input cube |
| z_min | |
| z_max | |
- Returns:
- nothing
|
void | sinfo_new_convert_ZEROs_to_0_for_cubes_range (cpl_imagelist *cube, const int z_min, const int z_max) |
sinfo_new_convert_0_to_ZEROs_for_images() |
this function converts any 0 in an image to ZEROs
- Parameters:
-
- Returns:
- nothing
|
void | sinfo_new_convert_0_to_ZEROs_for_images (cpl_image *im) |
new_convert_0_to_ZEROs_for_cubes() |
his function converts any 0 in a cube to ZERO
- Parameters:
-
| cube | input cube |
| z_min | min z to be considered |
| z_max | max z to be considered |
- Returns:
- nothing
|
void | sinfo_new_convert_0_to_ZERO_for_cubes (cpl_imagelist *cube) |
void | sinfo_new_convert_0_to_ZERO_for_cubes_range (cpl_imagelist *cube, const int z_min, const int z_max) |
new_invert_image() |
this function multiplies each image value by -1
- Parameters:
-
- Returns:
- inverted input image (overwritten)
|
void | sinfo_new_invert (cpl_image *im) |
sinfo_new_nint() |
this routine determines the nearest integer to a specified real value
- Parameters:
-
- Returns:
- nearest integer to specified real value
|
int | sinfo_new_nint (double x) |
sinfo_new_xcorrel () |
simple cross-correlation of two 1d-signals without FFT
- Parameters:
-
| line_i,: | the reference signal |
| width_i,: | number of samples in reference signal |
| line_t,: | candidate signal to compare |
| width_t,: | number of samples in candidate signal |
| half_search,: | half-size of the search domain |
| delta,: | output sinfo_correlation offset. |
| maxpos,: | position index of the maximum of the output array |
| xcorr_max,: | maximum value of the output array |
- Returns:
- correlation function, must be freed.
|
double * | sinfo_new_xcorrel (float *line_i, int width_i, float *line_t, int width_t, int half_search, int *delta, int *maxpos, double *xcorr_max) |
double | sinfo_nev_ille (double x[], double f[], int n, double z, int *flag) |
float | sinfo_new_nev_ille (float x[], float f[], int n, float z, int *flag) |
#define | STEP_MIN (-half_search) |
#define | STEP_MAX (half_search) |
sinfo_myfit() |
fits a straight line to a set of x, y data points by minimizing chi-square.
- Parameters:
-
| x | |
| y | set of data points, |
| ndata | number of data points |
| sig | individual standard deviations, |
| mwt | |
| a | |
| b | |
| siga | |
| sigb | |
| sinfo_chi2 | chi square |
| q | goodness of fit probability |
- Returns:
- void
- See also:
- Numeric. Rec. page 665
|
void | sinfo_my_fit (float x[], float y[], int ndata, float sig[], int mwt, float *a, float *b, float *siga, float *sigb, float *chi2, float *q) |
sinfo_new_correlation() |
this routine computes the cross correlation between two data arrays of the same size and returns the integer shift between both arrays
- Parameters:
-
| data1,: | first data array |
| data2,: | second data array |
| ndata,: | number of data elements in the arrays, |
- Note:
- both arrays must have the same number of elements.
- Returns:
- integer shift of the second array with respect to the first array. 2^32/2 if something went wrong.
|
int | sinfo_new_correlation (float *data1, float *data2, int ndata) |