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)


Detailed Description

Main file for remcosmic.

Copyright:
(c) 2004 CRAL-IPNL
Date:
Date
2004/11/10 17:45:17
Author:
Yannick COPIN <y.copin@ipnl.in2p3.fr>

Author
ycopin
Version:
Adapted from remcosmic_SAU v1.2

Revision
1.7
Id
remcosmic.c,v 1.7 2004/11/10 17:45:17 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 Median-filter radius [lenssize_pix]
iter Current iteration
Note:
Previously called Search_Neighbour_Median

Bug:
Unallocated array index in Sauron version

Definition at line 40 of file remcosmic.c.

References LENSIZE3, and spectro_spatial_filter().

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 162 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.

Definition at line 226 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 294 of file remcosmic.c.

int main int  argc,
char **  argv
 

Bug:
Do not check FCLASS yet: the preprocess does not propagate FCLASS on B-channel

Definition at line 351 of file remcosmic.c.


Generated on Tue Nov 23 18:04:20 2004 for Snifs by doxygen 1.3.3