Skip to content
Back to skills

Correlated Double Sampling

ASecurity

Subtract paired reference frames from signal frames to cancel readout noise and common-mode bias

  • 61 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 12, 2026
developmentpython

Security analysis

A100/100

Scanned September 12, 2026

npx -y skills add wenmin-wu/ds-skills --skill correlated-double-sampling --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Correlated Double Sampling?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Correlated Double Sampling
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/wenmin-wu-correlated-double-sampling/badge)](https://www.skillsdirectory.com/skills/wenmin-wu-correlated-double-sampling)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: timeseries-correlated-double-sampling
description: Subtract paired reference frames from signal frames to cancel readout noise and common-mode bias
domain: timeseries
---

# Correlated Double Sampling (CDS)

## Overview

For sensors with paired read/reset cycles, subtract even frames from odd frames (or vice versa) to cancel common-mode noise (kTC noise, bias drift, readout offsets). Halves the frame count but dramatically improves SNR. Common in astronomical detectors, IR sensors, and scientific imaging.

## Quick Start

```python
import numpy as np

def correlated_double_sampling(signal):
    """Subtract even (reset) frames from odd (read) frames.
    
    Args:
        signal: (..., T, ...) with T frames in read/reset pairs
    Returns:
        (..., T//2, ...) CDS-processed signal
    """
    return signal[..., 1::2, :] - signal[..., ::2, :]

# Often followed by temporal binning
def cds_and_bin(signal, bin_size=10):
    cds = correlated_double_sampling(signal)
    n_bins = cds.shape[-2] // bin_size
    binned = np.zeros((*cds.shape[:-2], n_bins, *cds.shape[-1:]))
    for i in range(n_bins):
        binned[..., i, :] = cds[..., i*bin_size:(i+1)*bin_size, :].mean(axis=-2)
    return binned
```

## Key Decisions

- **Odd - even**: convention depends on sensor — check if read or reset comes first
- **Pair binning after CDS**: sum/mean consecutive CDS frames to further reduce noise by √N
- **Spatial mean before CDS**: for 2D detectors, average spatial pixels first if only temporal signal matters

## References

- Source: [ariel-only-correlation](https://www.kaggle.com/code/sergeifironov/ariel-only-correlation)
- Competition: NeurIPS - Ariel Data Challenge 2024

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…