close Warning: Can't synchronize with repository "(default)" (/work/source/svn/csep does not appear to be a Subversion repository.). Look in the Trac log for more information.

Opened 8 years ago

Closed 8 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:


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/ to zeros, and if input catalog source:trunk/src/generic/ 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/ which causes an exception since each numpy.array.size=1 (array is set to '0')

Change History (2)

comment:1 Changed 8 years ago by liukis

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

comment:2 Changed 8 years ago by liukis

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