[esssans] Better interface for defining wavelength bins and bands

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

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
25/100
Tipo de issue
Nueva funcionalidad
Claridad
Necesita aclaración
Estado de actividad
Activo
Stack tecnológico
python
Área
data

Línea de trabajo

Start by reading the existing WavelengthBins and WavelengthBands definitions and the sc.linspace usage described in the issue. The issue presents several competing interface ideas but does not identify files or tests; clarify the intended design with maintainers before starting. Done means an agreed interface for defining wavelength bins and bands, with behavior that matches that decision.

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

Descripción

esssans

Currently, we were defining the bands as a 1d variable with N+1 edges, where N is the number of bands that we want to have: sc.linspace("wavelength", 1.0, 13.0, 11, unit="angstrom").

It's a bit of a weird interface as the dimension name is wavelength, but it results in data that has a dimension band of size N.

Claude suggested that WavelengthBands should just be tuples of indices that index into the WavelengthBins. I'm not sure I like that so much...

I myself thought that maybe if we wish to have bands, we could give WavelengthBins as a DataGroup instead that contains bands. Then we combine all the entries in the group to construct a single set of wavelength bins. The bands would be each entry in the group.

But as you say, this could be a follow-up.

Originally posted by @nvaytet in https://github.com/scipp/ess/pull/726#discussion_r4183870136

Lenguaje dominante
Python
Estrellas
3
Forks
6
Merge medio
2 d 13 h
PR fusionados (30 d)
35

Preparar el entorno

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 scipp/ess

Todos los issues de scipp/ess

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.