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

Index Error when calling `boundary` with non full disk geos ara

Aperta
#529 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
42/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
python
Ambito
data

Direzione di ricerca

Inizia da pyresample/geometry.py, in particolare da AreaDefinition.boundary e _get_geo_boundary_sides, quindi riproduci il problema con l’esempio fornito goes_east_abi_c_1km. Controlla il percorso del bordo per le aree geostazionarie che non coprono un disco completo e verifica che boundary() restituisca i lati di longitudine e latitudine senza un IndexError.

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

Descrizione

When trying to get the boundary of a non full disk geostationaryAreaDefinition currently an IndexError will be thrown.

from satpy.resample import get_area_def

goes_east = get_area_def("goes_east_abi_c_1km")

goes_east.boundary()
Expected Output

The boundary lons/lats should be returned as in the full disk case.

Actual Result, Traceback if applicable
IndexError                                Traceback (most recent call last)
Cell In[3], line 5
      1 from satpy.resample import get_area_def
      3 goes_east = get_area_def("goes_east_abi_c_1km")
----> 5 goes_east.boundary()

File /dev/pytroll/pyresample/pyresample/geometry.py:1614, in AreaDefinition.boundary(self, frequency, force_clockwise)
   1612 from pyresample.boundary import AreaBoundary
   1613 if self.is_geostationary:
-> 1614     lon_sides, lat_sides = self._get_geo_boundary_sides(frequency=frequency)
   1615 else:
   1616     lon_sides, lat_sides = self.get_bbox_lonlats(frequency=frequency,
   1617                                                  force_clockwise=force_clockwise)

File /dev/pytroll/pyresample/pyresample/geometry.py:1585, in AreaDefinition._get_geo_boundary_sides(self, frequency)
   1580 # Retrieve dummy sides for GEO (side1 and side3 always of length 2)
   1581 side02_step = int(frequency / 2) - 1
   1582 lon_sides = [lons[slice(0, side02_step + 1)],
   1583              lons[slice(side02_step, side02_step + 1 + 1)],
   1584              lons[slice(side02_step + 1, side02_step * 2 + 1 + 1)],
-> 1585              np.append(lons[side02_step * 2 + 1], lons[0])
   1586              ]
   1587 lat_sides = [lats[slice(0, side02_step + 1)],
   1588              lats[slice(side02_step, side02_step + 1 + 1)],
   1589              lats[slice(side02_step + 1, side02_step * 2 + 1 + 1)],
   1590              np.append(lats[side02_step * 2 + 1], lats[0])
   1591              ]
   1592 return lon_sides, lat_sides

IndexError: index 49 is out of bounds for axis 0 with size 7

Versions of Python, package at hand and relevant dependencies

Python: 3.10.8
Pyresample: v1.27.1

Lingua principale
Python
Stelle
388
Fork
102
Merge medio
5g 17h
PR unite (30g)
5

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

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 pytroll/pyresample

Tutte le issue di pytroll/pyresample

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.