plots.horizon module

class plots.horizon.HorizonDistance(horizon_history_dict, verbose=False)[source]

Bases: object

static datasource_loader(sources)[source]

Determine how to load the data sources based on their extensions.

Args:
sources:

list of str, the data sources to be loaded.

Raises:
UnknownExtensionError:

If the sources do not ends with .gz or .cache.

Returns:

None

classmethod from_psds(sources, verbose=False)[source]

Construct a HorizonDistance instance from a list of psds.

Args:
sources:

list of str, the data sources to be loaded.

verbose:

bool, default is False, toggle error message.

Returns:

An instance of HorizionDistance.

classmethod from_rankingstats(sources, verbose=False)[source]

Construct a HorizonDistance instance from a list of ranking statistic files.

Args:
sources:

list of str, the data sources to be loaded.

verbose:

bool, default is False, toggle error message.

Returns:

An instance of HorizionDistance.

Note:

The ranking statistic files are expectd to be in the same template bank bin.

property max

Return the global minimum of the horizon distance.

property min

Return the global minimum of the horizon distance.

savefig(output, figsize=(12, 4), limits=None, title=None)[source]

Save the horizon distance plot to disk.

Args:
output:

str, the output file name.

figsize:

tuple of float, default (12,4), set the output figure size in inch.

limits:

list of float, default to auto detection, set the limits on horizon distance.

title:

str, the title of the plots.

Returns:

None

exception plots.horizon.UnknownExtensionError[source]

Bases: Exception