Open
Description
def ci(allstack, h, kappa, ev_num):
"""
Search best H and kappa from stacked matrix.
Calculate error for H and kappa
:param allstack: stacked HK matrix
:param h: 1-D array of H
:param kappa: 1-D array of kappa
:param ev_num: event number
:return:
"""
[i, j] = np.unravel_index(allstack.argmax(), allstack.shape)
bestk = kappa[i]
besth = h[j]
cvalue = 1 - np.std(allstack.reshape(allstack.size)) / np.sqrt(ev_num)
cs = plt.contour(h, kappa, allstack, [cvalue])
> cs_path = cs.collections[0].get_paths()[0].vertices
E AttributeError: 'QuadContourSet' object has no attribute 'collections'
This error will be raised when using matplotlib 3.10
. using
cs_path = cs.get_paths()[0].vertices
instead in the future version.
Metadata
Metadata
Assignees
Labels
No labels
Activity