discrete-transforms
Routes PyWavelets users through DWT, IDWT, multilevel transforms, SWT, MRA, coefficient packing, thresholding, padding, and fully separable transforms.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- discrete-transforms
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Routes PyWavelets users through DWT, IDWT, multilevel transforms, SWT, MRA, coefficient packing, thresholding, padding, and fully separable transforms.
- disable-model-invocation
- true
02 资源文件 3
- 参考文档references/api-reference.md3.5 KB
- 参考文档references/troubleshooting.md3.7 KB
- 参考文档references/workflows.md3.1 KB
03 SKILL.md 正文
Discrete Transforms
Use this sub-skill for the core pywt transform stack: decimated DWT/IDWT, 2D and ND transforms, coefficient packing, stationary wavelets, multiresolution analysis, thresholding, signal-extension modes, padding, and fully separable transforms.
Route here when the task asks for
dwt,idwt,wavedec,waverec,dwt2,idwt2,wavedec2,waverec2dwtn,idwtn,wavedecn,waverecnswt,iswt,swt2,iswt2,swtn,iswtnmra,mra2,mran,imra,imra2,imrancoeffs_to_array,array_to_coeffs,ravel_coeffs,unravel_coeffs,wavedecn_size,wavedecn_shapesthreshold,threshold_firm,pad,Modes.modes,dwt_coeff_len,dwt_max_level,dwtn_max_levelfswavedecn,fswaverecn, orFswavedecnResult
Route elsewhere when the task is about
- wavelet catalogs, custom wavelets,
wavefun,central_frequency,scale2frequency, orcwt: go to../wavelets-and-cwt/SKILL.md - packet trees, node paths, packet reconstruction, or
WaveletPacket*: go to../wavelet-packets/SKILL.md
Start here
- Read
references/workflows.mdfor concrete transform recipes. - Read
references/api-reference.mdwhen you need the verified signatures or result-shape rules. - Read
references/troubleshooting.mdwhen modes, axes, coefficient shapes, or SWT/MRA constraints fail. - Run
../../scripts/check_pywavelets_install.pywhen you want a quick smoke check that covers the core transform stack.
Common workflow anchors
- Use
pywt.Modes.modesto confirm supported extension modes before choosingmode=. - For 1D smoke checks,
db1andsymmetricare the safest defaults. - For SWT and SWT-based MRA, prefer
mode='periodization'and a signal length that is a multiple of2**level. - For
waverecandwaverecn, zero arrays are the safe way to omit coefficients;Noneis not the general replacement mechanism. - For coefficient packing, prefer
coeffs_to_array/array_to_coeffswhen you need a shaped array andravel_coeffs/unravel_coeffswhen you need a flat vector. - For fully separable transforms, inspect the returned
FswavedecnResultobject instead of treating it as a raw coefficient list.
Useful bundled data
pywt.data.ecg()is a compact 1D signal for DWT, SWT, and thresholding examples.pywt.data.camera()is a compact 2D image fordwt2,wavedec2,dwtn,wavedecn,swt2, and packet-adjacent smoke checks.pywt.data.nino()is useful when a transform recipe needs a small real-valued signal with a time axis.
What to expect from the references
references/workflows.mdgives copyable recipes for 1D, 2D, ND, SWT, MRA, coefficient packing, thresholding, padding, and fully separable transforms.references/api-reference.mdlists the verified function signatures and the major return-shape conventions.references/troubleshooting.mdexplains the common error fragments and recovery steps for transform and coefficient workflows.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).