Operations on spectra

sinfo_stectrum_ima2table

convert an image in a table spectrum

Parameters:
spc input image spectrum
filename input filename
tbl output table


int sinfo_stectrum_ima2table (const cpl_image *spc, const char *filename, cpl_table **tbl)
 convert an image in a table spectrum

sinfo_new_vector()

allocates memory for a new sinfo_vector

Parameters:
n_elements number of sinfo_vector elements
Returns:
Vector


Vector * sinfo_new_vector (ulong32 n_elements)

sinfo_free_svector()

frees memory of a sinfo_vector

Parameters:
sinfo_vector to destroy
Returns:
nothing


void sinfo_free_svector (Vector **svector)

sinfo_new_destroy_vector()

frees memory of a sinfo_vector

Parameters:
sinfo_vector to destroy
Returns:
nothing


void sinfo_new_destroy_vector (Vector *sinfo_vector)

sinfo_new_vector_to_image()

converts a spectral sinfo_vector to a fits image

Parameters:
spectral sinfo_vector that should be converted to a fits image
Returns:
image with lx = 1 and ly = length of sinfo_vector
Note:
sinfo_vector object spectrum is destroyed


cpl_image * sinfo_new_vector_to_image (Vector *spectrum)

sinfo_new_image_to_vector()

converts a fits image to a spectral sinfo_vector

Parameters:
1-D Fits image that should be converted to a spectral sinfo_vector
Returns:
spectral sinfo_vector with length ly
Note:
input image is destroyed


Vector * sinfo_new_image_to_vector (cpl_image *spectrum)

sinfo_new_extract_spectrum_from_resampled_flat()

extracts a spectrum from an image image

Parameters:
resflat,: resampled halogen lamp frame, bad pixel corrected
loreject,@param hireject: percentage of extreme low and high intensity values to be rejected from averaging
Returns:
fits image that contains the final halogen lamp spectrum builds one spectrum in a fits image out of a resampled flatfield frame by taking a clean mean along the spatial pixels


cpl_image * sinfo_new_extract_spectrum_from_resampled_flat (cpl_image *resflat, float loreject, float hireject)

sinfo_new_multiply_image_with_spectrum()

multiplies a resampled image with a resampled spectrum in the same spectral range

Parameters:
image,: resampled image
spectrum,: resampled spectrum in image format
Returns:
resulting image multiplys a resampled image with a resampled spectrum (calibrated halogen lamp spectrum) in the same spectral range that means all image columns are multiplied with the same spectrum


cpl_image * sinfo_new_multiply_image_with_spectrum (cpl_image *image, cpl_image *spectrum)

sinfo_new_optimal_extraction_from_cube()

does the optimal extraction of a standard star spectrum

Parameters:
cube,: input data cube
llx,@param lly: lower left sinfo_edge points of the 2d Gaussian fitting box
halfbox_x,@param halfbox_y: half width of a box inside which a 2D-Gaussian fit is carried out
fwhm_factor,: factor applied to the found fwhms of a 2D-Gaussian fit, defines the radius of the aperture inside which the spectral extraction is carried out (default: 0.6).
backvariance,: (readnoise^2 + sinfo_dark current variance) needed to determine the noise variance of the background. Must be given in counts/sec.
sky,: estimated sky variance in counts/sec
gain,: conversion factor electrons/count
exptime,: total exposure time
Returns:
resulting spectrum stored in a 1D-image does the optimal extraction of a standard star spectrum according to the equation: S = sum { (P^2 / V) * (I - B) / P } / sum{ P^2 / V } S: spectral flux at a particular wavelength P: normalized PSF (determined by a 2D-Gaussian fit) I: pixel value B: background pixel value determined by the background parameter of the 2D-Gaussian fit V: estimated variance of a pixel: V = [R^2 + D + sky + I,c/exptime]/gain where R is the read noise, and D the sinfo_dark current variance. backvariance is R^2 + D in counts/sec. I,c is the source intensity in counts
Note:
: sigma,e[e-] = gain[e/count] * sigma,c [counts] = sqrt(I,e) = sqrt(gain*I,c) => V,c = sigma,c^2 = sigma,e^2/gain^2 => sigma,c = sqrt(I,c/gain) => V,c = I,c/gain


cpl_image * sinfo_new_optimal_extraction_from_cube (cpl_imagelist *cube, int llx, int lly, int halfbox_x, int halfbox_y, float fwhm_factor, float backvariance, float sky, float gain, float exptime, const char *name, cpl_table **spectrum, int qc_info, int *check2)

sinfo_new_extract_sky_from_cube()

extracts a sky spectrum from a data cube

Parameters:
cube,: reduced cube from sky spider observation
loReject,@param hiReject: fraction (percentage) of the extreme high and low sky spectrum values that are rejected before averaging the found sky spectra.
position,: end pixel positions of the straight line in the image dividing the sky from the object pixels.
tolerance,: pixel tolerance which are not considered and subtracted from the diagonal line to be sure to get a clean sky, default: 2
posindicator,: indicates in which sinfo_edge of the field of view the sky is projected. output of spiffi_get_spiderposindex() in fitshead.c
Returns:
resulting averaged sky spectrum extracts a sky spectrum from a reduced sky spider observation, that means from a data cube. Therefore, the position of the sky within the field of view must be first read from the fits header. A pixel tolerance is subtracted. The found sky spectra are averaged by rejecting the extreme high and low values.


Vector * sinfo_new_extract_sky_from_cube (cpl_imagelist *cube, float loReject, float hiReject, int *position, int tolerance, int posindicator)

sinfo_new_sum_rectangle_of_cube_spectra()

summing routine for a reduced data to get a better spectral S/N only for a rectangular aperture

Parameters:
cube,: 1 allocated cube,
llx,@param lly,
urx,@param ury: lower left and upper right position of rectangle in x-y plane , image coordinates 0...
Returns:
result spectrum sinfo_vector


Vector * sinfo_new_sum_rectangle_of_cube_spectra (cpl_imagelist *cube, int llx, int lly, int urx, int ury)

sinfo_new_sum_circle_of_cube_spectra()

summing routine for a reduced data to get a better spectral S/N only for a circular aperture.

Parameters:
cube,: 1 allocated cube,
centerx,@param centery: center pixel of circular aperture in image coordinates
radius,: integer radius of circular aperture
Returns:
result spectrum sinfo_vector


Vector * sinfo_new_sum_circle_of_cube_spectra (cpl_imagelist *cube, int centerx, int centery, int radius)

sinfo_new_mean_rectangle_of_cube_spectra()

averaging routine for a reduced data to get a better spectral S/N only for a rectangular aperture.

Parameters:
cube,: 1 allocated cube,
llx,@param lly,
urx,@param ury: lower left and upper right position of rectangle in x-y plane , image coordinates 0...
Returns:
result spectrum sinfo_vector


Vector * sinfo_new_mean_rectangle_of_cube_spectra (cpl_imagelist *cube, int llx, int lly, int urx, int ury)

sinfo_new_mean_circle_of_cube_spectra()

averaging routine for a reduced data to get a better spectral S/N only for a circular aperture.

Parameters:
cube,: 1 allocated cube,
centerx,@param centery: center pixel of circular aperture in image coordinates
radius,: integer radius of circular aperture
Returns:
result spectrum sinfo_vector


Vector * sinfo_new_mean_circle_of_cube_spectra (cpl_imagelist *cube, int centerx, int centery, int radius)

sinfo_new_blackbody_spectrum()

computes a blackbody spectral intensity distribution (W/(m^2 lambda ster))

Parameters:
templateSpec,: spectrum of a standard star (1-d image with fits header)
temp,: blackbody temperature in Kelvin (standard Star temp),
Returns:
resulting spectrum sinfo_vector


Vector * sinfo_new_blackbody_spectrum (char *templateSpec, double temp)

sinfo_new_median_rectangle_of_cube_spectra()

sinfo_median routine for a reduced data to get a better spectral S/N only for a rectangular aperture.

Parameters:
cube,: 1 allocated cube,
llx,@param lly,
urx,@param ury: lower left and upper right position of rectangle in x-y plane , image coordinates 0...
Returns:
result spectrum sinfo_vector


Vector * sinfo_new_median_rectangle_of_cube_spectra (cpl_imagelist *cube, int llx, int lly, int urx, int ury)

sinfo_new_median_circle_of_cube_spectra()

sinfo_median routine for a reduced data to get a better spectral S/N only for a circular aperture.

Parameters:
cube,: 1 allocated cube,
centerx,@param centery: center pixel of circular aperture in image coordinates
radius,: integer radius of circular aperture
Returns:
result spectrum sinfo_vector


Vector * sinfo_new_median_circle_of_cube_spectra (cpl_imagelist *cube, int centerx, int centery, int radius)

sinfo_new_cleanmean_rectangle_of_cube_spectra()

clean averaging routine for a reduced data to get a better spectral S/N only for a rectangular aperture.

Parameters:
cube,: 1 allocated cube,
llx,@param lly,
urx,@param ury: lower left and upper right position of rectangle in x-y plane , image coordinates 0...
Returns:
result spectrum sinfo_vector


Vector * sinfo_new_cleanmean_rectangle_of_cube_spectra (cpl_imagelist *cube, int llx, int lly, int urx, int ury, float lo_reject, float hi_reject)

sinfo_new_cleanmean_circle_of_cube_spectra()

clean averaging routine for a reduced data to get a better spectral S/N only for a circular aperture.

Parameters:
cube,: 1 allocated cube,
centerx,@param centery: center pixel of circular aperture in image coordinates
radius,: integer radius of circular aperture
Returns:
result spectrum sinfo_vector


Vector * sinfo_new_cleanmean_circle_of_cube_spectra (cpl_imagelist *cube, int centerx, int centery, int radius, float lo_reject, float hi_reject)

sinfo_new_shift_array()

shifts an array by a sub-pixel shift value using a tanh interpolation kernel

Parameters:
input,: input array,
n_elements,: number of elements in input array
shift,: sub-pixel shift value (must be < 1.)
ker,: interpolation kernel
Returns:
resulting float array


float * sinfo_new_shift_array (float *input, int n_elements, float shift, double *ker)

sinfo_new_div_image_by_spectrum()

divides a resampled image with a resampled spectrum in the same spectral range

Parameters:
image,: resampled image
spectrum,: resampled spectrum in image format
Returns:
resulting image divides a resampled image with a resampled spectrum in the same spectral range that means all image columns are multiplied with the same spectrum


cpl_image * sinfo_new_div_image_by_spectrum (cpl_image *image, cpl_image *spectrum)
Vector * sinfo_new_clean_mean_circle_of_cube_spectra (cpl_imagelist *cube, int centerx, int centery, int radius, float lo_reject, float hi_reject)
Vector * sinfo_new_clean_mean_rectangle_of_cube_spectra (cpl_imagelist *cube, int llx, int lly, int urx, int ury, float lo_reject, float hi_reject)

Detailed Description

TBD


Function Documentation

int sinfo_stectrum_ima2table ( const cpl_image *  spc,
const char *  filename,
cpl_table **  tbl 
)

convert an image in a table spectrum

Parameters:
spc input image spectrum
filename input filename
tbl output table

Definition at line 224 of file sinfo_spectrum_ops.c.

References sinfo_msg_error, sinfo_pfits_get_cdelt1(), sinfo_pfits_get_cdelt2(), sinfo_pfits_get_crval1(), and sinfo_pfits_get_crval2().

Referenced by sinfo_utl_cube2spectrum().


Generated on 8 Mar 2011 for SINFONI Pipeline Reference Manual by  doxygen 1.6.1