Barak 0.3.2 documentation

barak.spec.cr_reject

«  barak.spec.combine   ::   Contents   ::   barak.spec.cr_reject2  »

barak.spec.cr_reject

barak.spec.cr_reject(flux, error, nsigma=15.0, npix=2, verbose=False)[source]

Given flux and errors, rejects cosmic-ray type or dead pixels. These are defined as pixels that are more than nsigma*sigma above or below the median of the npixEL pixels on either side.

Returns newflux,newerror where the rejected pixels have been replaced by the median value of npix to either side, and the error has been set to NaN.

The default values work ok for S/N~20, Resolution=500 spectra.

«  barak.spec.combine   ::   Contents   ::   barak.spec.cr_reject2  »