Sources exactly on a chunk border are extracted by every adjacent chunk
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 76/100
Direzione di ricerca
Start in optics/fov.py at extract_from (around line 166) and extract_area_from_table (around lines 282–285), where chunk bounds are derived from the WCS footprint and applied to sources. Run the provided reproduction with chunking enabled and compare its corner, edge, and interior flux ratios. Done means each source is extracted by exactly one chunk and all three ratios are 1.000.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What happened?
Reported by Claude
FieldOfView.extract_area_from_table selects table sources with half-open bounds (>= min, < max), which should give each source to exactly one chunk. But the bounds come from the WCS footprint (get_corners → calc_footprint), and the pixel-to-world conversion leaves adjacent chunks overlapping by about 3e-13 arcsec. A source exactly on a border therefore passes the selection of every adjacent chunk: it is counted twice on a chunk edge and four times on a corner. This is not rare in practice. For example, a single star at the field centre with 2 × 2 chunks sits on the corner.
Expected: every source in exactly one chunk (ratio 1.000 in all three cases).
Where: optics/fov.py, extract_from (line 166, minmax from the footprint) and extract_area_from_table (lines 282–285). Possible fixes: take the bounds from the FOV volume definition (exact values) instead of the WCS footprint, or round them before the comparison.
Code to reproduce
import astropy.units as u
from synphot import SourceSpectrum, ConstFlux1D
import scopesim as sim
from scopesim.tests.mocks.load_basic_instrument import load_example_optical_train
def image_plane_flux(x, y, chunked):
props = {"!DET.width": 320, "!DET.height": 320}
if chunked: # force 2 x 2 chunks of 160 x 160 pixels
props.update({"!SIM.computing.chunk_size": 160,
"!SIM.computing.max_segment_size": 160 * 160})
opt = load_example_optical_train(set_modes=["imaging"], properties=props)
opt["atmospheric_radiometry"].include = False # no sky
opt["psf"].include = False # no PSF: nothing can leak
src = sim.Source(x=[x], y=[y], ref=[0], weight=[1],
spectra=[SourceSpectrum(ConstFlux1D, amplitude=1 * u.mJy)])
opt.observe(src)
return opt.image_planes[0].hdu.data.sum()
# chunk borders run through x = 0 and y = 0
for x, y, where in [(0, 0, "corner"), (0, 5, "edge"), (0.37, 0.41, "inside")]:
ratio = image_plane_flux(x, y, True) / image_plane_flux(x, y, False)
print(f"star on chunk {where:6s} ({x}, {y}): chunked / unchunked flux = {ratio:.3f}")
# Output:
# star on chunk corner (0, 0): chunked / unchunked flux = 4.000
# star on chunk edge (0, 5): chunked / unchunked flux = 2.000
# star on chunk inside (0.37, 0.41): chunked / unchunked flux = 1.000
Exception traceback
ScopeSim bug_report()
IRDB installation
Cloned and linked IRDB repository
Use case
Other
- Lingua principale
- Python
- Stelle
- 42
- Fork
- 30
- Merge medio
- 2g 22h
- PR unite (30g)
- 7
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di AstarVienna/ScopeSim
-
effects performance
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
AstarVienna/ScopeSim#1062 ·
-
optics
Difficoltà 4/5 3-5 giorni Idoneità per principianti 69/100
AstarVienna/ScopeSim#1060 ·
-
SkycalcTERCurve validate fails with non-allowed valuesForse di nuovo libera @oczoske l’ha presa 43 giorni fa e non c’è nessuna pull request aperta. Apertaeffects
AstarVienna/ScopeSim#1049 · 2 commenti · 1 assegnatario ·
-
MICADO mixed detector readout modeForse di nuovo libera @oczoske l’ha presa 44 giorni fa e non c’è nessuna pull request aperta. Apertaeffects imaging instrument-specific Science Team
AstarVienna/ScopeSim#1048 · 1 assegnatario ·
-
Move some function out of `image_plane_utils.py`Forse di nuovo libera @teutoburg l’ha presa 56 giorni fa e non c’è nessuna pull request aperta. Apertarefactor
AstarVienna/ScopeSim#1047 · 1 assegnatario ·
Tutte le issue di AstarVienna/ScopeSim
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
qboson/kaiwu-pytorch-plugin#2308 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
NL-BioImaging/biomero-converter#43 ·
I maintainer di solito rispondono entro 1 giorno
-
Name the maintainers in CODEOWNERSForse già presa @TorecLuik l’ha presa oggi. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
NL-BioImaging/BIOMERO.shallower#41 ·
I maintainer di solito rispondono entro 1 giorno
-
soup drift-alarm drops malformed and unrecognised live rows without saying so, then reports OK on the rows that are leftForse già presa @abdulwaarith0 l’ha presa oggi. Apertaneeds-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
MakazhanAlpamys/Soup#3665 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
roadmap/v1.3.0 scope/entitlement type/improvement
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
databrickslabs/ontos#1778 ·
I maintainer di solito rispondono entro 2 giorni