Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Add linearity tests for forward models

Aperta
#293 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

@manduinca ci sta già lavorando.

Dal 24/7/2026.

  • #698 di @manduinca — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
68/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
python
Ambito
testing-qa

Direzione di ricerca

Individua la copertura pytest esistente per i modelli diretti di points, prisms e tesseroids, quindi identifica i campi disponibili come potential e g_z. Aggiungi un test parametrizzato per ogni geometria che confronti il risultato multi-corpo con la somma dei risultati individuali. Il lavoro è completato quando i controlli di linearità coprono ogni geometria e ogni campo e hanno esito positivo.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement good first issue

Description of the desired feature:

Our forward models for the different geometries (points, prisms, tesseroids) allow to take multiple bodies as inputs, returning a single array as the resulting field generated by every one of these bodies on the computation points.
One of the properties of these forward models is their linearity: the resulting field for all the bodies should be equal to the sum of the individual fields.
Although this property is easily readable from the code, it might be wise to add functions that actually test them.
We could add test_linearity functions for each geometry that compares the resulting field of passing a set of bodies to the resulting field of computing the fields of each one separately and then sum them up.

Through pytests.mark.parametrize we could write a single function per geometry, adding the field as a parameter.
For example:

@pytest.mark.parametrize("field", ("potential", "g_z", ...))
def test_linearity(field):
    """
    Test linearity of the forward model
    """
    ...

Are you willing to help implement and maintain this feature? Yes, but I would love to help anyone motivated to tackle it. 💪🏼

Lingua principale
Python
Stelle
309
Fork
91
Merge medio
2g 2h
PR unite (30g)
2

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di fatiando/harmonica

Tutte le issue di fatiando/harmonica

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.