{
  "method": "MEMD",
  "slug": "memd",
  "title": "MEMD: project multichannel data to estimate a joint envelope mean",
  "summary": "MEMD uses many projection directions to construct a multivariate local mean. Its sifting preserves aligned mode slices across the input channels.",
  "steps": [
    {
      "title": "Project the data",
      "text": "Use Hammersley-based unit directions and locate extrema of each scalar projection."
    },
    {
      "title": "Construct vector envelopes",
      "text": "At the projection extrema times, interpolate the original vector samples and average valid envelopes."
    },
    {
      "title": "Sift jointly",
      "text": "Subtract the direction-averaged vector mean and repeat the multivariate stopping test."
    },
    {
      "title": "Extract aligned modes",
      "text": "Remove the accepted multichannel IMF, continue on the vector residue, and keep the final residue."
    }
  ],
  "parameters": [
    {
      "name": "n_dir (upstream trace)",
      "effect": "This bounded PySDKit demonstration uses 16 projection directions; the DeTime wrapper does not expose this as a documented public control."
    },
    {
      "name": "Stopping rule (upstream trace)",
      "effect": "Uses PySDKit's default Rilling-style test with a safety cap of 50 sifts."
    },
    {
      "name": "primary_period / explicit mode groups",
      "effect": "Used by DeTime after upstream extraction, independently of the projection directions."
    }
  ],
  "cautions": [
    "This PySDKit backend requires at least three channels for MEMD; the example uses three aligned channels.",
    "Projection count, envelope boundaries, and stopping rules affect the result.",
    "Aligned IMF indexes do not establish physiological or other physical source identity."
  ],
  "references": [
    {
      "title": "PySDKit MEMD API and implementation",
      "url": "https://pysdkit.readthedocs.io/en/stable/API/pysdkit._emd.html"
    },
    {
      "title": "Rehman and Mandic: Multivariate empirical mode decomposition",
      "url": "https://doi.org/10.1098/rspa.2009.0502"
    }
  ],
  "trace_kind": "upstream numerical stages and execution trace",
  "trace_note": "Computed with PySDKit 0.5.0: its direction, extrema, and boundary helpers supply the vector envelopes; actual first-IMF sifting calls are recorded. The reduced direction count is a teaching setting, not a benchmark setting.",
  "input_note": "Deterministic synthetic teaching signal; not a benchmark.",
  "example_config": {
    "method": "MEMD",
    "params": {
      "primary_period": 24
    },
    "backend": "python"
  },
  "checks": {
    "unit_direction_error": 1.1102230246251565e-16,
    "mean_matches_upstream_helper": 0.0,
    "first_recorded_mean_error": 0.0,
    "sum_of_returned_slices_error": 2.220446049250313e-16,
    "recorded_first_imf_sifts": 4
  },
  "source_files": [
    "src/detime/methods/memd.py",
    "src/detime/methods/mvmd.py"
  ],
  "frames": 32,
  "duration_ms": 12050,
  "poster_frame": 15,
  "width": 1280,
  "height": 820,
  "artifacts": {
    "gif": {
      "file": "memd.gif",
      "bytes": 707599,
      "sha256": "78c317ebdd8a6ce44a1014970253d38baf442b257eccb30a8c878e57e20014de"
    },
    "poster": {
      "file": "memd.png",
      "bytes": 179901,
      "sha256": "2b6d7eecdb41bd7002baa3fa78ab47c55c661cd62dc383e91f1d6d6d7038e93b"
    },
    "data": {
      "file": "memd.npz",
      "bytes": 209903,
      "sha256": "4665f659b06832f24f79cf40b228d5a882b481d960dfc4e330161d5d3ae20689"
    }
  },
  "source_arrays": {
    "time": [
      144
    ],
    "input_channels": [
      144,
      3
    ],
    "directions": [
      16,
      3
    ],
    "projections": [
      144,
      16
    ],
    "valid_direction_ids": [
      16
    ],
    "vector_envelopes": [
      16,
      2,
      144,
      3
    ],
    "running_vector_means": [
      16,
      144,
      3
    ],
    "first_imf_sifts": [
      4,
      2,
      144,
      3
    ],
    "returned_imfs": [
      4,
      144,
      3
    ]
  },
  "render_provenance": {
    "python_version": "3.11.3",
    "dependencies": {
      "numpy": "2.4.6",
      "scipy": "1.17.1",
      "statsmodels": "0.15.0",
      "matplotlib": "3.11.2",
      "Pillow": "13.0.0",
      "PyWavelets": "1.9.0",
      "EMD-signal": "1.10.0",
      "vmdpy": "0.2",
      "PySDKit": "0.5.0"
    },
    "source_hashes": {
      "scripts/generate_method_animations.py": "f62989af55a7e48495c24afcfee31751d3785e5f78bb4b900bef23a429deaa84",
      "scripts/method_animations/adaptive.py": "7d728d88b4ba1a8dd82890c7a6b017d542728b50dc477c281e9bbfcbae164a1d",
      "scripts/method_animations/common.py": "73ad7e8b4e5b67f87d13e59adab2c93e983fe1aaf06ee627d22cb7c7e696016a",
      "src/detime/backends.py": "7432dcf59e382580dfb32f1f57e61ff71a30567c049b35243e24e3644523eda6",
      "src/detime/core.py": "d95b348cd8b16b56d18840965579c947a11628d969dd6c32c4af7723f5a027f4",
      "src/detime/methods/memd.py": "e6eb06c058644f123495d3593a804b40e677f6a5bfc2f2e289cb6c3e11d6e022",
      "src/detime/methods/mvmd.py": "3e66ea12f131795eeb5ebbb24bd6affe7bfc104ac94ef7d8cdeaff6073413fd7",
      "src/detime/registry.py": "e934ffca17880cefe5add728aa497e63ea811d7ae43abec1ea498de718094066"
    }
  }
}
