Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

extract/lib/proc_extract.c File Reference

Extraction related procedures. More...

Go to the source code of this file.

Functions

int good_neighbor (float *ylo, float *yup, int *neighbors, float y)
 Find the good neighbor among 2 candidates.

int good_neighbor_spectrum (SpectrumCCD spectra[], int neighbors[], float y)
 Find the good neighbor among 2 candidates.

void interpolate_y2lbda (int n, double y[], double signal[], double variance[], int yofl_deg, float yofl_coeffs[], SPECTRUM *spectrum, SPECTRUM *noise)
 Interpolate CCD spectrum to cube spectrum.


Detailed Description

Extraction related procedures.

Copyright:
(c) 2004 IPNL
Date:
Tue Aug 2 10:52:46 2005
Author:
Yannick Copin <y.copin@ipnl.in2p3.fr>

Author
ycopin
Version:
Revision
1.3
Id
proc_extract.c,v 1.3 2005/08/02 14:41:42 ycopin Exp

Definition in file proc_extract.c.


Function Documentation

int good_neighbor float *  ylo,
float *  yup,
int *  neighbors,
float  y
 

Find the good neighbor among 2 candidates.

Parameters:
ylo 
yup Total spectral extensions
neighbors Candidates index array
y Current position
Returns:
Good neighbor index

Definition at line 37 of file proc_extract.c.

int good_neighbor_spectrum SpectrumCCD  spectra[],
int  neighbors[],
float  y
 

Find the good neighbor among 2 candidates.

Parameters:
spectra Array of CCD spectra
neighbors Candidates index array
y Current position
Returns:
Good neighbor index
Note:
Object-oriented version of good_neighbor.

Definition at line 72 of file proc_extract.c.

References SpectrumCCD::total.

Referenced by main().

void interpolate_y2lbda int  n,
double  y[],
double  signal[],
double  variance[],
int  yofl_deg,
float  yofl_coeffs[],
SPECTRUM *  spectrum,
SPECTRUM *  noise
 

Interpolate CCD spectrum to cube spectrum.

Parameters:
n Size of the CCD arrays
y CCD-position array (in decreasing order: from top to bottom, ie from blue to red)
signal Extracted signal array
variance Extracted variance array (or NULL)
yofl_deg Degree of the y(lambda) polynomial
yofl_coeffs Coeffs of the y(lambda) polynomial
spectrum Initialized signal lambda-spectrum
noise Initialized variance lambda-spectrum (or NULL)
Variance interpolation
It is not clear how to interpolate the variance spectrum. Let's say the signal is linearly interpolated: $s = \alpha s_1 + \beta s_2$. Logically, one should then write for the variance: $v = \alpha^2 v_1 + \beta^2 v_2$. But this discards the covariance introduced between v_1 and v_2. On the other hand, one could simply linearly interpolate the variance: $v = \alpha v_1 + \beta v_2$, which is not statistically correct, but might be a better 'physical' approximation. This is the approach adopted here.

Definition at line 122 of file proc_extract.c.

Referenced by main().


Generated on Thu Oct 27 00:00:05 2005 for Snifs by doxygen 1.3.5