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

calib/source/remcosmic.c File Reference

Main file for remcosmic. More...

Go to the source code of this file.

Functions

void spatial_filter_med_cube (TIGERfile *incube, TIGERfile *medcube, int ring, int iter)
 Spatial median-filtering.

void spectro_spatial_filter (TIGERfile *incube, TIGERfile *medcube, TIGERfile *rescube, int radius, int iter)
 Spectro-spatial filtering on cube.

int Nuke_cosmic (SPECTRUM *signal, SPECTRUM *noise, SPECTRUM *medspec, SPECTRUM *medvar, SPECTRUM *resspec, float sigclip, float threshold, int pixels)
 Cosmic nuker!

int Remove_cosmic (TIGERfile *incube, TIGERfile *medcube, TIGERfile *rescube, float sigclip, float threshold, int pixels, int iter)
 Remove cosmics from datacube.

int main (int argc, char **argv)

Variables

int const  HITVAR = -1


Detailed Description

Main file for remcosmic.

Copyright:
(c) 2004 CRAL-IPNL
Date:
Date
2005/09/15 21:43:14
Author:
Yannick COPIN <y.copin@ipnl.in2p3.fr>

Author
ycopin
Version:
Adapted from remcosmic_SAU v1.2

Revision
1.11
Id
remcosmic.c,v 1.11 2005/09/15 21:43:14 ycopin Exp

Definition in file remcosmic.c.


Function Documentation

void spatial_filter_med_cube TIGERfile *  incube,
TIGERfile *  medcube,
int  ring,
int  iter
 

Spatial median-filtering.

Parameters:
incube Input datacube
medcube Spatial-filtered datacube
ring Spatial median-filter radius [lenssize_pix]
iter Current iteration
Note:
Previously called Search_Neighbour_Median

Bug:
Unallocated array index in Sauron version

Todo:
Compute norm of each spectra only once, instead of multiple times in the neighbor loop.

Clarify this spatial median filtering normalization issue when the spectrum norm si close to 0 or even <0. For the moment, the dirty trick is to consider positive values only...

Definition at line 47 of file remcosmic.c.

References LENSIZE3, and spectro_spatial_filter().

Here is the call graph for this function:

void spectro_spatial_filter TIGERfile *  incube,
TIGERfile *  medcube,
TIGERfile *  rescube,
int  radius,
int  iter
 

Spectro-spatial filtering on cube.

Residuals = (spectrum - spatial_median) - spectral_median(spec. - spat._med)

Parameters:
incube Input cube
medcube Spatially median-filtered cube
rescube Residual cube
radius Spectral median-filter radius
iter Current iteration
Note:
Previously called Apply_median

Definition at line 186 of file remcosmic.c.

Referenced by spatial_filter_med_cube().

int Nuke_cosmic SPECTRUM *  signal,
SPECTRUM *  noise,
SPECTRUM *  medspec,
SPECTRUM *  medvar,
SPECTRUM *  resspec,
float  sigclip,
float  threshold,
int  pixels
 

Cosmic nuker!

Parameters:
signal Input/output spectrum
noise Input noise (or NULL)
medspec Spatial median spectrum
medvar Spatial median variance
resspec Residual spectrum
sigclip Detection threshold sigma-clipping
threshold Relative threshold of detection
pixels Spoiled pixels on each side of cosmic
Returns:
Number of cosmics detected and eliminated

Bug:
In previous versions, the 1st pixel could not be flaggued as neighbor of a cosmic.

Todo:
Clarify the second cosmic-detection criterion...

Definition at line 252 of file remcosmic.c.

int Remove_cosmic TIGERfile *  incube,
TIGERfile *  medcube,
TIGERfile *  rescube,
float  sigclip,
float  threshold,
int  pixels,
int  iter
 

Remove cosmics from datacube.

Parameters:
incube Input/output datacube
medcube Spatial median-filtered datacube
rescube Residual datacube
sigclip Detection threshold sigma-clipping
threshold Relative threshold of detection
pixels Spoiled pixels on each side of cosmic
iter Current iteration
Returns:
Number of cosmics detected and eliminated

Definition at line 320 of file remcosmic.c.

int main int  argc,
char **  argv
 

Definition at line 405 of file remcosmic.c.


Variable Documentation

int const HITVAR = -1 [static]
 

Variance of pixels spoiled by cosmics (see interpolate_noise)

Definition at line 23 of file remcosmic.c.


Generated on Wed Oct 26 23:59:43 2005 for Snifs by doxygen 1.3.5