`shift_x_y_to_zk1_2_wavediff()` function has dimensional inconsistencies
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- python
- Área
- computer-vision
Línea de trabajo
Read src/wf_psf/utils/preprocessing.py around shift_x_y_to_zk1_2_wavediff() and src/wf_psf/utils/centroids.py around compute_zernike_tip_tilt. Trace the displacement units through both functions and clarify the intended physics and Zernike wavediff convention. Done means the arctan input and conversion path are dimensionally consistent, with the affected behavior verified.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Hi @tobias-liaudat,
There seems to be a dimensional analysis issue in the code you originally wrote. Since you're most familiar with the intended physics here, could you take a look?
In the code snippet below, the function takes arctan() of a quantity with units [1/m], which is dimensionally incorrect:
Moreover, this function is called incompute_zernike_tip_tilt. There, the arg passed in is the displacement pixel shift multiplied by pixel_sampling=12e-6 m, which will do the conversion from the [pixel] units to [m].
But, then this is undone by division by reference_pix_sampling = 12e-6 in shift_x_y_to_zk1_2_wavediff in the arctan function above. Both values are the same, making this conversion roundtrip unnecessary.
Just to add: this pattern also appears in the original code from last year:
current_shifts = centroid_calc.return_shifts() # In [pixel]
dx = reference_shifts[1] - current_shifts[1] # In [pixel]
dy = reference_shifts[0] - current_shifts[0] # In [pixel]
z1_wavediff = shift_x_y_to_zk1_2_wavediff(dx * pixel_sampling) # Input in [m]
z2_wavediff = shift_x_y_to_zk1_2_wavediff(dy * pixel_sampling) # Input in [m]
return (
z1_wavediff,
z2_wavediff,
) # Output in Zernike coefficients in wavediff convention
Could you help clarify the intended physics and suggest how to make this dimensionally consistent? I can think of a couple of approaches, but you're the expert and so I'd value your input. Thanks!
- Lenguaje dominante
- Python
- Estrellas
- 24
- Forks
- 10
- Merge medio
- 2 d 13 min
- PR fusionados (30 d)
- 2
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de CosmoStat/wf-psf
-
bug documentation
Dificultad 1/5 1-3 horas Aptitud para principiantes 72/100
-
[DOCUMENTATION] Installation instructions list different environment name than in `environment.yml`Abiertobug documentation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
-
[TASK] Implement a configurable ThresholdRejectionPolicyPosiblemente ocupada @jeipollack la tomó hace 7 días. Abiertoneeded
-
[BUG] Update `QualityControlPipeline` to consume the dictionary-based `QualityMetric.compute()` API.Posiblemente ocupada @jeipollack la tomó hace 20 días. Abiertobug
Todos los issues de CosmoStat/wf-psf
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
common-workflow-language/cwl-utils#477 ·
Los mantenedores suelen responder en 1 día
-
Add dependabotAbiertofeat
Dificultad 2/5 Menos de una hora Aptitud para principiantes 72/100
open-nudge/opentemplate#204 ·
Los mantenedores suelen responder en 1 día
-
github-stale-ci-pr-closer: KV state is double-wrapped, never persists, and hits the depth-32 limitPosiblemente ocupada @VascoSch92 la tomó hoy. Abiertopriority:medium ready-for-dev
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
OpenHands/extensions#781 ·
Los mantenedores suelen responder en 1 día
-
bug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
curriculum documentation quality
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
githubnext/gh-aw-workshop#4638 ·
Los mantenedores suelen responder en 1 día