flag_resampled_crs

stcal.outlier_detection.utils.flag_resampled_crs(sci_data, sci_err, blot_data, snr1, snr2, scale1, scale2, backg)[source]

Detect outliers (CRs) using resampled reference data.

Parameters:
  • sci_data (numpy.ndarray) – “Science” data possibly containing outliers

  • sci_err (numpy.ndarray) – Error estimates for sci_data

  • blot_data (numpy.ndarray) – Reference data used to detect outliers.

  • snr1 (float) – Signal-to-noise ratio threshold used prior to smoothing.

  • snr2 (float) – Signal-to-noise ratio threshold used after smoothing.

  • scale1 (float) – Scale used prior to smoothing.

  • scale2 (float) – Scale used after smoothing.

  • backg (float) – Scalar background to subtract from the difference.

Returns:

cr_mask – boolean array where outliers (CRs) are true

Return type:

numpy.ndarray