{
  "$schema": "https://ambiqai.github.io/helia-ui/schema/reference-model-1.json",
  "generatedFrom": {
    "sourceCommit": "8aacb2ca3e394a6a2c1314a9cdb9b0853d066efd",
    "tool": "pyref",
    "version": "1.7.3"
  },
  "language": "python",
  "modules": [
    {
      "description": "## ECG cleaning methods.",
      "name": "clean",
      "path": "physiokit.ecg.clean",
      "submodules": [],
      "summary": "ECG cleaning methods.",
      "symbols": [
        {
          "description": "Clean ECG signal by applying biquad filter.\n\nBy default, a 3rd order Butterworth bandpass filter from 0.5 to 30 Hz is applied.",
          "examples": [],
          "id": "physiokit.ecg.clean.clean",
          "kind": "function",
          "language": "python",
          "members": [],
          "name": "clean",
          "params": [
            {
              "description": "ECG signal.",
              "name": "data",
              "type": "npt.NDArray"
            },
            {
              "default": "0.5",
              "description": "Lower cutoff in Hz. Defaults to 0.5 Hz.",
              "name": "lowcut",
              "type": "float"
            },
            {
              "default": "30",
              "description": "Upper cutoff in Hz. Defaults to 30 Hz.",
              "name": "highcut",
              "type": "float"
            },
            {
              "default": "1000",
              "description": "Sampling rate in Hz. Defaults to 1000 Hz.",
              "name": "sample_rate",
              "type": "float"
            },
            {
              "default": "3",
              "description": "Filter order. Defaults to 3 (3rd order Butterworth filter).",
              "name": "order",
              "type": "int"
            },
            {
              "default": "-1",
              "description": "Axis to apply against. Defaults to -1.",
              "name": "axis",
              "type": "int"
            },
            {
              "default": "True",
              "description": "Apply filter forward and backward. Defaults to True.",
              "name": "forward_backward",
              "type": "bool"
            }
          ],
          "raises": [],
          "returns": [
            {
              "description": "npt.NDArray: Cleaned ECG signal.",
              "type": "npt.NDArray"
            }
          ],
          "signature": "clean(\n    data: npt.NDArray,\n    lowcut: float = 0.5,\n    highcut: float = 30,\n    sample_rate: float = 1000,\n    order: int = 3,\n    axis: int = -1,\n    forward_backward: bool = True,\n) -> npt.NDArray",
          "source": {
            "line": 9,
            "path": "physiokit/ecg/clean.py",
            "url": "https://github.com/AmbiqAI/physiokit/blob/8aacb2ca3e394a6a2c1314a9cdb9b0853d066efd/physiokit/ecg/clean.py#L9"
          },
          "summary": "Clean ECG signal by applying biquad filter."
        },
        {
          "description": "Mask out RR intervals that fall outside bounds.",
          "examples": [],
          "id": "physiokit.ecg.clean.square_filter_mask",
          "kind": "function",
          "language": "python",
          "members": [],
          "name": "square_filter_mask",
          "params": [
            {
              "description": "RR-interval list in ms.",
              "name": "rr_ints",
              "type": "npt.NDArray"
            },
            {
              "default": "300",
              "description": "Lower cutoff limit. Defaults to 300 ms.",
              "name": "lowcut",
              "type": "float"
            },
            {
              "default": "900",
              "description": "Upper cutoff limit. Defaults to 900 ms.",
              "name": "highcut",
              "type": "float"
            }
          ],
          "raises": [],
          "returns": [
            {
              "description": "npt.NDArray: RR rejection mask 0=accept, 1=reject.",
              "type": "npt.NDArray"
            }
          ],
          "signature": "square_filter_mask(rr_ints: npt.NDArray, lowcut: float = 300, highcut: float = 900) -> npt.NDArray",
          "source": {
            "line": 49,
            "path": "physiokit/ecg/clean.py",
            "url": "https://github.com/AmbiqAI/physiokit/blob/8aacb2ca3e394a6a2c1314a9cdb9b0853d066efd/physiokit/ecg/clean.py#L49"
          },
          "summary": "Mask out RR intervals that fall outside bounds."
        }
      ]
    }
  ],
  "name": "physiokit"
}
