Opened 7 years ago

Closed 7 years ago

#232 closed defect (fixed)

Empty catalog passed to CSEPGeneric.Catalog.modifications() to generate catalog uncertainties raises 'IndexError: index out of bounds' exception

Reported by: liukis Owned by: liukis
Priority: major Milestone: CSEP Version 10.10.0
Component: Toolkit Version: 10.7.0
Keywords: Cc:

Description

When empty catalog (for example OneDayModel? catalog for 2010-07-05) is passed to CSEPGeneric.Catalog.modifications() method to generated catalog uncertainties, an exception 'IndexError?: index out of bounds' is raised. The reason is that modifications catalogs are initialized by source:trunk/src/generic/CSEPGeneric.py@3030#L768 to zeros, and if input catalog source:trunk/src/generic/CSEPGeneric.py@3030#L774 is empty, catalog uncertainties never get reset to empty arrays ([]) within that loop, and zeros are written to the file to store catalogs with applied uncertainties. When preparing catalog uncertainties for evaluation test, each modification catalog gets filtered by time (source:trunk/src/generic/RELMTest.py@3046#L764) which causes an exception since each numpy.array.size=1 (array is set to '0')

Change History (2)

comment:1 Changed 7 years ago by liukis

  • Owner changed from somebody to liukis
  • Status changed from new to accepted

comment:2 Changed 7 years ago by liukis

  • Resolution set to fixed
  • Status changed from accepted to closed
Note: See TracTickets for help on using tickets.