SkyModels

class gammapy.modeling.models.SkyModels(skymodels)[source]

Bases: collections.abc.Sequence

Sky model collection.

Parameters
skymodelslist of SkyModel

Sky models

Attributes Summary

parameters

Methods Summary

count(self, value)

from_yaml(yaml_str)

Create from YAML string.

index(self, value[, start, stop])

Raises ValueError if the value is not present.

read(filename)

Read from YAML file.

to_yaml(self)

Convert to YAML string.

write(self, path[, overwrite])

Write to YAML file.

Attributes Documentation

parameters

Methods Documentation

count(self, value)
classmethod from_yaml(yaml_str)[source]

Create from YAML string.

index(self, value, start=0, stop=None)

Raises ValueError if the value is not present.

Supporting start and stop arguments is optional, but recommended.

classmethod read(filename)[source]

Read from YAML file.

to_yaml(self)[source]

Convert to YAML string.

write(self, path, overwrite=False)[source]

Write to YAML file.