[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7DCCXVMV97MEBGWSTETYPYJ":3,"skill-same:01M7DCCXVMV97MEBGWSTETYPYJ":53},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":28,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M7DCCXVMV97MEBGWSTETYPYJ","pick-sparsifying-transform",null,"Choose a sparsifying transform for a signal or image in a PyLops sparsity-promoting inversion (FFT\u002FFFT2D\u002FFFTND, DCT, DWT\u002FDWT2D\u002FDWTND, DTCWT, Seislet, curvelets via UDCT, Radon\u002FFourierRadon\u002FChirpRadon, windowed versions with Sliding\u002FPatch), check its optional dependencies and frame properties, compare candidates quantitatively with a best-k-term compressibility test, and wire the winner into fista\u002Fspgl1 in synthesis or analysis form. Use when the user asks \"which transform should I use for sparsity\", \"wavelets or curvelets for my data\", \"make my model sparse for fista\u002Fspgl1\", \"compressive sensing \u002F interpolation with PyLops\".","PyLops\u002Fpylops-agent-skills","PyLops","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F74298005?v=4","01M7DCC0YV3FVDPP4GR6V7F43H","01M7DCC0ZTN5K09ZH48X951TBX",1,"LGPL-2.1","https:\u002F\u002Fgithub.com\u002FPyLops\u002Fpylops-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fpylops\u002Fskills\u002Fpick-sparsifying-transform\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: pick-sparsifying-transform\ndescription: Choose a sparsifying transform for a signal or image in a PyLops sparsity-promoting inversion (FFT\u002FFFT2D\u002FFFTND, DCT, DWT\u002FDWT2D\u002FDWTND, DTCWT, Seislet, curvelets via UDCT, Radon\u002FFourierRadon\u002FChirpRadon, windowed versions with Sliding\u002FPatch), check its optional dependencies and frame properties, compare candidates quantitatively with a best-k-term compressibility test, and wire the winner into fista\u002Fspgl1 in synthesis or analysis form. Use when the user asks \"which transform should I use for sparsity\", \"wavelets or curvelets for my data\", \"make my model sparse for fista\u002Fspgl1\", \"compressive sensing \u002F interpolation with PyLops\".\n---\n\nGoal: a transform chosen by evidence (not habit) for the user's signal, and\ncorrect code that uses it in a sparsity-promoting PyLops inversion. Do not modify\nthe installed `pylops` package.\n\n## 0. Check the environment\n\n- Use the project's Python runner; check `pylops.__version__`.\n- Optional dependencies (ask before installing):\n  - `DWT`, `DWT2D`, `DWTND` → `PyWavelets` (`pywt`);\n  - `UDCT` (curvelets) → `curvelets>=1.2`;\n  - `DTCWT` → `dtcwt` (may lag behind NumPy 2);\n  - `spgl1` solver → `spgl1`;\n  - fast `Radon2D\u002F3D` → `numba` (`engine=\"numba\"`);\n  - the external Curvelops package (FDCT via CurveLab) is a separate install –\n    only suggest it if `UDCT` is not suitable.\n- Check what imports: `python -c \"import pywt, curvelets, spgl1\"` etc.\n\n## 1. Understand the signal\n\nAsk for (or load) a **representative example** of the model\u002Fdata to be made\nsparse – ideally noise-free (a synthetic, a well-sampled subset, or a previous\ngood result). Characterise it:\n\n| Signal character | Natural candidates |\n|---|---|\n| sum of few sinusoids \u002F band-limited, stationary | `FFT`, `FFT2D`, `FFTND` (`norm=\"ortho\"`), `DCT` |\n| smooth with localised discontinuities (1-D, images) | `DWT`\u002F`DWT2D`\u002F`DWTND` (e.g. `db4`, `sym8`, few levels) |\n| piecewise constant \u002F blocky | `DWT` with `haar`, or not a transform at all: TV (`splitbregman`, PyProximal) |\n| images\u002Fseismic with oriented curved edges or events | curvelets `UDCT`, `DTCWT` |\n| seismic events with smoothly varying slope | `Seislet` (needs slopes from `pylops.utils.signalprocessing.slope_estimate`) |\n| linear\u002Fparabolic\u002Fhyperbolic seismic events | `Radon2D\u002F3D`, `FourierRadon2D\u002F3D`, `ChirpRadon2D\u002F3D` |\n| locally simple, globally complex | any of the above in windows with `Patch2D\u002F3D` or `Sliding1D\u002F2D\u002F3D` (see `sliding-patch-processing`) |\n| a learned or explicit dictionary | `MatrixMult(D)` with `omp` |\n\nShortlist 2–4 candidates.\n\n## 2. Compare candidates\n\nAdapt `reference\u002Fcompressibility_test.py`: it reports, for each candidate\nanalysis transform `T` (data → coefficients):\n\n- **tight frame or not** (`T.H @ T == I`): decides whether `T.H` reconstructs and\n  whether analysis-form `fista` updates are exact (true for `FFT*` with\n  `norm=\"ortho\"`, orthogonal wavelets, `DCT`, `UDCT`; false for `Seislet`, Radon);\n- **redundancy** (`T.shape[0] \u002F T.shape[1]`): cost and memory grow with it;\n- the **best-k-term curve**: SNR of the signal rebuilt from its largest *k*\n  coefficients (*k* as a % of the number of signal samples, so redundant frames\n  are not favoured). The best transform reaches high SNR with the fewest\n  coefficients.\n\nRadon-type operators map model (slowness, time) → data, so their \"coefficients\"\ncome from an inversion, not `T @ x`: compare them by running a short `fista` on\nthe representative signal instead of the best-k test.\n\nAlso weigh: speed of `matvec`\u002F`rmatvec`, GPU support (see `accelerate-on-gpu`),\nand parameters that need tuning (wavelet family\u002Flevels, curvelet scales\u002Fangles,\nRadon slowness range and sampling).\n\n## 3. Wire it into the inversion\n\nLet `Op` be the physics\u002Fsampling operator (e.g. `Restriction` for interpolation)\nand `S` the synthesis operator (coefficients → signal; for the transforms above\n`S = T.H`, or the transform itself for Radon-type operators).\n\n- **Synthesis** (`x = S p`, `p` sparse) – works for any `S`:\n  - `pylops.spgl1(Op, y, SOp=T, sigma=...)` → `(x, p, info)`: note that `spgl1`\n    takes the **analysis** transform `T` and internally inverts `Op @ T.H`,\n    returning `x = T.H p`; set `sigma` from the noise level (`‖noise‖₂`);\n  - or `p = pylops.fista(Op @ S, y, eps=..., niter=...)[0]`, then `x = S @ p`.\n- **Analysis** (`‖T x‖₁` small) – `pylops.fista(Op, y, SOp=T.H, eps=...)`\n  (here `SOp` is the **synthesis** side, penalty `‖SOpᴴ x‖₁`) is exact only for\n  tight frames; otherwise use PyProximal (`solve-nonsmooth-problem` skill,\n  e.g. `L1` composed with `T` in `PrimalDual`\u002F`LinearizedADMM`).\n- For complex transforms (`FFT*`, `UDCT`) of real signals, take `np.real` of the\n  final `x`, and use `complexflag` in dot-tests.\n- Dot-test `Op @ S` before inverting. Tune `eps`\u002F`sigma` with\n  `tune-regularization`.\n\n## 4. Hand off\n\nReport: the candidates tried, the compressibility table\u002Fplot and tight-frame\nproperties, the chosen transform with its parameters and why, dependency notes,\nand the snippet (synthesis or analysis) used in the user's inversion.\n","Goal: a transform chosen by evidence (not habit) for the user's signal, and\ncorrect code that uses it in a sparsity-promoting PyLops inversion. Do not modify\nthe installed `pylops` package.\n\n## 0. Check the environment\n\n- Use the project's Python runner; check `pylops.__version__`.\n- Optional dependencies (ask before installing):\n  - `DWT`, `DWT2D`, `DWTND` → `PyWavelets` (`pywt`);\n  - `UDCT` (curvelets) → `curvelets>=1.2`;\n  - `DTCWT` → `dtcwt` (may lag behind NumPy 2);\n  - `spgl1` solver → `spgl1`;\n  - fast `Radon2D\u002F3D` → `numba` (`engine=\"numba\"`);\n  - the external Curvelops package (FDCT via CurveLab) is a separate install –\n    only suggest it if `UDCT` is not suitable.\n- Check what imports: `python -c \"import pywt, curvelets, spgl1\"` etc.\n\n## 1. Understand the signal\n\nAsk for (or load) a **representative example** of the model\u002Fdata to be made\nsparse – ideally noise-free (a synthetic, a well-sampled subset, or a previous\ngood result). Characterise it:\n\n| Signal character | Natural candidates |\n|---|---|\n| sum of few sinusoids \u002F band-limited, stationary | `FFT`, `FFT2D`, `FFTND` (`norm=\"ortho\"`), `DCT` |\n| smooth with localised discontinuities (1-D, images) | `DWT`\u002F`DWT2D`\u002F`DWTND` (e.g. `db4`, `sym8`, few levels) |\n| piecewise constant \u002F blocky | `DWT` with `haar`, or not a transform at all: TV (`splitbregman`, PyProximal) |\n| images\u002Fseismic with oriented curved edges or events | curvelets `UDCT`, `DTCWT` |\n| seismic events with smoothly varying slope | `Seislet` (needs slopes from `pylops.utils.signalprocessing.slope_estimate`) |\n| linear\u002Fparabolic\u002Fhyperbolic seismic events | `Radon2D\u002F3D`, `FourierRadon2D\u002F3D`, `ChirpRadon2D\u002F3D` |\n| locally simple, globally complex | any of the above in windows with `Patch2D\u002F3D` or `Sliding1D\u002F2D\u002F3D` (see `sliding-patch-processing`) |\n| a learned or explicit dictionary | `MatrixMult(D)` with `omp` |\n\nShortlist 2–4 candidates.\n\n## 2. Compare candidates\n\nAdapt `reference\u002Fcompressibility_test.py`: it reports, for each candidate\nanalysis transform `T` (data → coefficients):\n\n- **tight frame or not** (`T.H @ T == I`): decides whether `T.H` reconstructs and\n  whether analysis-form `fista` updates are exact (true for `FFT*` with\n  `norm=\"ortho\"`, orthogonal wavelets, `DCT`, `UDCT`; false for `Seislet`, Radon);\n- **redundancy** (`T.shape[0] \u002F T.shape[1]`): cost and memory grow with it;\n- the **best-k-term curve**: SNR of the signal rebuilt from its largest *k*\n  coefficients (*k* as a % of the number of signal samples, so redundant frames\n  are not favoured). The best transform reaches high SNR with the fewest\n  coefficients.\n\nRadon-type operators map model (slowness, time) → data, so their \"coefficients\"\ncome from an inversion, not `T @ x`: compare them by running a short `fista` on\nthe representative signal instead of the best-k test.\n\nAlso weigh: speed of `matvec`\u002F`rmatvec`, GPU support (see `accelerate-on-gpu`),\nand parameters that need tuning (wavelet family\u002Flevels, curvelet scales\u002Fangles,\nRadon slowness range and sampling).\n\n## 3. Wire it into the inversion\n\nLet `Op` be the physics\u002Fsampling operator (e.g. `Restriction` for interpolation)\nand `S` the synthesis operator (coefficients → signal; for the transforms above\n`S = T.H`, or the transform itself for Radon-type operators).\n\n- **Synthesis** (`x = S p`, `p` sparse) – works for any `S`:\n  - `pylops.spgl1(Op, y, SOp=T, sigma=...)` → `(x, p, info)`: note that `spgl1`\n    takes the **analysis** transform `T` and internally inverts `Op @ T.H`,\n    returning `x = T.H p`; set `sigma` from the noise level (`‖noise‖₂`);\n  - or `p = pylops.fista(Op @ S, y, eps=..., niter=...)[0]`, then `x = S @ p`.\n- **Analysis** (`‖T x‖₁` small) – `pylops.fista(Op, y, SOp=T.H, eps=...)`\n  (here `SOp` is the **synthesis** side, penalty `‖SOpᴴ x‖₁`) is exact only for\n  tight frames; otherwise use PyProximal (`solve-nonsmooth-problem` skill,\n  e.g. `L1` composed with `T` in `PrimalDual`\u002F`LinearizedADMM`).\n- For complex transforms (`FFT*`, `UDCT`) of real signals, take `np.real` of the\n  final `x`, and use `complexflag` in dot-tests.\n- Dot-test `Op @ S` before inverting. Tune `eps`\u002F`sigma` with\n  `tune-regularization`.\n\n## 4. Hand off\n\nReport: the candidates tried, the compressibility table\u002Fplot and tight-frame\nproperties, the chosen transform with its parameters and why, dependency notes,\nand the snippet (synthesis or analysis) used in the user's inversion.\n",{"name":5,"description":7},"main","a0aead16681bea6df74af88096782ad6ab4eddfb","plugins\u002Fpylops\u002Fskills\u002Fpick-sparsifying-transform",0,"https:\u002F\u002Fgithub.com\u002FPyLops\u002Fpylops-agent-skills","https:\u002F\u002Fpylops.github.io\u002Fpylops-agent-skills\u002F","https:\u002F\u002Fgithub.com\u002FPyLops","https:\u002F\u002Fpylops.github.io","Matrix-Free linear algebra and optimization in Python","2026-11-02 05:28:21",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add PyLops\u002Fpylops-agent-skills --skill pick-sparsifying-transform",{"tool":39,"command":40},"bunx","bunx skills add PyLops\u002Fpylops-agent-skills --skill pick-sparsifying-transform",{"tool":42,"command":43},"pnpm","pnpm dlx skills add PyLops\u002Fpylops-agent-skills --skill pick-sparsifying-transform","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FPyLops\u002Fpylops-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fpylops\u002Fskills\u002Fpick-sparsifying-transform\u002FSKILL.md",true,[47],{"path":48,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":52},"reference\u002Fcompressibility_test.py","SCRIPT","脚本",4335,"https:\u002F\u002Fgithub.com\u002FPyLops\u002Fpylops-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fpylops\u002Fskills\u002Fpick-sparsifying-transform\u002Freference\u002Fcompressibility_test.py",[54,61,68,75,82,89],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":18},"01M7DCE0ERZ2MCH1ANEBTC1Y40","solve-nonsmooth-problem","Use this skill whenever the user wants to solve an inverse problem on PyLops operators with a non-smooth, constrained or non-convex term - load it before writing the objective, choosing a solver or writing optimisation code, even when a SciPy bounded solver or a hand-written FISTA\u002FADMM loop would also work. Covers total variation, L1\u002Fsparsity in a transform, joint sparsity across signals sharing the same components, bounds\u002Fpositivity\u002Fball\u002Faffine constraints, low-rank matrix completion (nuclear norm) and plug-and-play priors with a denoiser (median filter, BM3D), solved with PyProximal (ProximalGradient, ADMM, PrimalDual, ...), step sizes from operator norms. E.g. \"add TV regularisation\", \"keep the model within physical bounds\", \"recover several signals that share their components\", \"fill in missing entries of a low-rank matrix\", \"use PyProximal\". Not for purely quadratic regularisation (Tikhonov, damping, derivative smoothing), which is plain least squares - use the pylops skill solve-inverse-problem.","https:\u002F\u002Fgithub.com\u002FPyLops\u002Fpylops-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fpyproximal\u002Fskills\u002Fsolve-nonsmooth-problem\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":18},"01M7DCDT6XDJPE8W9JPVAAX50X","wrap-operator","Wrap a user's own forward model as a PyLops linear operator inside their project (not inside the PyLops library), with a verified adjoint, a dot-test and a small test suite. Use when the user wants to turn existing forward\u002Fadjoint code, a script at a URL, or a mathematical description into a PyLops operator they can pass to PyLops solvers (e.g. \"make my blurring function a PyLops operator\", \"wrap this forward model so I can invert it with lsqr\", \"I have a forward and adjoint, plug them into PyLops\").","https:\u002F\u002Fgithub.com\u002FPyLops\u002Fpylops-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fpylops\u002Fskills\u002Fwrap-operator\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":18},"01M7DCDKBBA8PJA706HD1W3AVR","tune-regularization","Choose regularisation weights and thresholds for a PyLops inversion (epsRs in regularized_inversion, damp in cgls\u002Flsqr, eps in ista\u002Ffista, epsRL1s in splitbregman, sigma\u002Ftau in spgl1, niter as implicit regularisation) with a principled, reproducible sweep - L-curve, discrepancy principle, GCV for small problems, or a synthetic test with a known model. Use when the user asks \"how do I choose epsilon \u002F lambda \u002F damping\", \"my inversion is too smooth \u002F too noisy\", \"make an L-curve\", or after solve-inverse-problem produced a working but untuned inversion.","https:\u002F\u002Fgithub.com\u002FPyLops\u002Fpylops-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fpylops\u002Fskills\u002Ftune-regularization\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":18},"01M7DCDBNA6XGWDZQ1A15CG1S6","solve-inverse-problem","Use this skill whenever the user has (or can build) a PyLops operator and data and wants to invert it - load it before choosing a solver or writing any inversion code, even when the right solver or regularisation seems obvious. It sets up and runs the inversion in the user's project - choose the solver (lsqr, cgls, cg, regularized_inversion, preconditioned_inversion, fista, spgl1, omp, irls, splitbregman), the regularisation and the stopping parameters, and write a runnable script that reports convergence. E.g. \"invert my data with this operator\", \"which PyLops solver should I use\", \"add Tikhonov \u002F smoothness \u002F sparsity regularisation to my inversion\", \"solve y = Op x\". Not for an inversion that already misbehaves (use debug-inversion) or for choosing regularisation weights with an L-curve or sweep (use tune-regularization).","https:\u002F\u002Fgithub.com\u002FPyLops\u002Fpylops-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fpylops\u002Fskills\u002Fsolve-inverse-problem\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":18},"01M7DCD5Q5P09A2R28QWWVSPGM","sliding-patch-processing","Set up PyLops windowed operators - Sliding1D, Sliding2D, Sliding3D, Patch2D, Patch3D - to apply a local transform or operator over overlapping windows of 1-D\u002F2-D\u002F3-D data, choosing window size, overlap, taper and model size with the *_design and *_pad_to_next helpers, checking coverage and the dot-test, and using them for local denoising, interpolation or inversion. Use when the user asks \"apply FFT\u002FRadon\u002Fany operator in overlapping windows\", \"local transform \u002F patching with PyLops\", \"Patch2D gives artefacts at the edges\", \"how do I pick nwin, nover, nop\".","https:\u002F\u002Fgithub.com\u002FPyLops\u002Fpylops-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fpylops\u002Fskills\u002Fsliding-patch-processing\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":18},"01M7DCCNBV43MY51NMRKC9K7J3","debug-inversion","Use this skill whenever a user shares PyLops code or results that misbehave and asks what is wrong - load it first, before running the user's code, testing a hypothesis or answering, even when the bug looks obvious from the code. Covers a crash or traceback (dtype\u002Fcasting errors, shape mismatches), a solver (lsqr, cgls, cg, fista, ista, spgl1, regularized_inversion, splitbregman) that stalls, diverges, returns NaNs, zeros, ringing or a wrong model, one dataset or block being ignored in a stacked\u002Fjoint inversion, or a custom FunctionOperator\u002FLinearOperator that may have a wrong adjoint. Diagnoses with evidence (block-by-block dot-tests incl. complex, dtype and dims checks, operator\u002Fdata scaling, solver and eps\u002Fdamp choice), then proposes the smallest fix and verifies it. Not for choosing a solver for a new, working setup (use solve-inverse-problem) or picking regularisation weights (use tune-regularization).","https:\u002F\u002Fgithub.com\u002FPyLops\u002Fpylops-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fpylops\u002Fskills\u002Fdebug-inversion\u002FSKILL.md",[],[]]