shakelib.plotting.contour

shakelib.plotting.contour.contour(imtdict, imtype, filter_size, gmice)[source]

Generate contours of a specific IMT and return as a Shapely MultiLineString object.

Parameters:
Returns:

List of dictionaries containing two fields

Return type:

list

Raises:

NotImplementedError -- if the user attempts to contour a data file – with sets of points rather than grids.

shakelib.plotting.contour.getContourLevels(dmin, dmax, itype='log')[source]

Get contour levels given min/max values and desired IMT.

Use itype=’log’ for any IMT that is logarithmically distributed, such as PGA, PGV, and Sa. Linear for MMI.

Parameters:
  • dmin (float) – Minimum value of data to contour.

  • dmax (float) – Maximum value of data to contour.

  • itype (str) – Interval type; default is ‘log’, anythign else indicates linear intervals.

Returns:

Numpy array of contour levels.

Return type:

ndarray