feat(pipekit): spectral diagnostics — energy, enstrophy, isotropic spectra, filters

Abierto
#154 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
47/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python

Línea de trabajo

Start by checking the implementation and acceptance criteria for dependencies #151, #110, and #108, then identify how spectral inputs, reductions, and rfft layouts are represented in the project. The issue specifies zero transforms for spectral inputs and tests against physical-space sums, analytic spectra, total energy, and Parseval weights for both layouts; done means those criteria pass.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

enhancement

Part of epic #148. Depends on: #151 (E4.1); the spectra ops wrap #110's Tier-A functions once they exist.

Proposal

op math transforms on Spectral input
Energy E = ½ ∑ |k|² |ψ̂|² / N² (from ψ or q) 0
Enstrophy Z = ½ ∑ |q̂|² / N² (Parseval) 0
IsotropicSpectrum E(k) = ∑_{k−½ ≤ |k′| < k+½} ½|k′|²|ψ̂(k′)|², binned 0
Filter wraps SpectralFilter2D (exponential, Hou–Li, …); strength is a leaf 0

All ops reduce the trailing grid axes and keep leading (time, ensemble) axes: [T, Ny, Nx] → [T] or [T, n_k].

Prototype check: enstrophy decays monotonically under hyperviscosity (Z/Z₀ = 1 → 0.9415 over 400 steps), computed with 0 transforms on the spectral trajectory.

Acceptance criteria

  • Energy / Enstrophy equal physical-space sums (allclose) and use 0 transforms on Spectral input.
  • IsotropicSpectrum reproduces a known analytic spectrum (single-mode and power-law fields), and its bin sum equals total energy.
  • With rfft layout (#108), Parseval weights double the interior kₓ columns correctly (test for both layouts).

Generated by Claude Code

Lenguaje dominante
Python
Estrellas
2
Forks
0
Merge medio
8 h 13 min
PR fusionados (30 d)
8

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de jejjohnson/spectraldiffx

Todos los issues de jejjohnson/spectraldiffx

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.