hispecdrp.primitives.jump_detection.jump_detection_difference

jump_detection_difference(ramp_data, dq_raw, dq, rdnoise=None, gain=None, rejection_threshold=4.0, max_cores=1)[source]

Simple jump detection for a 3D array of up the ramp data. Modifies the input dq array (in-place) to flag where jumps are detected.

Parameters:
  • ramp_data (np.ndarray) – 3D array of the UTR data with shape (Nreads, Ny, Nx).

  • dq_raw (np.ndarray) – Input data quality flags for the UTR data with shape (Nreads, Ny, Nx).

  • dq (np.ndarray) – Input data quality flags with shape (Ny, Nx).

  • rdnoise (np.ndarray or None, optional) – Input read noise array with shape (Ny, Nx). Defaults to 0.

  • gain (np.ndarray or None, optional) – Input gain array with shape (Ny, Nx). Defaults to 1.

  • rejection_threshold (float, optional) – Sigma threshold for jump detection. Default is 4.0.

  • max_cores (int, optional) – Maximum number of CPU cores to use for parallel processing (default: 1).