threeML.plugins.PhotometryLike module

class threeML.plugins.PhotometryLike.BandNode(name, index, value, mask)[source]

Bases: object

property off

‘ = True’ or ‘ = False’.


Turn on or off the band. Use booleans, like

property on

‘p.on = True’ or ‘p.on = False’.


Turn on or off the band. Use booleans, like

class threeML.plugins.PhotometryLike.PhotometryLike(name: str, filters: Union[FilterSequence, FilterResponse], observation: PhotometericObservation)[source]

Bases: XYLike


display the filter transmission curves


classmethod from_file(name: str, filters: Union[FilterResponse, FilterSequence], file_name: str)[source]

Create the a PhotometryLike plugin from a saved HDF5 data file

  • name – plugin name

  • filters – speclite filters

  • file_name – name of the observation file

classmethod from_kwargs(name, filters, **kwargs)[source]


grond = PhotometryLike.from_kwargs(‘GROND’,

filters=threeML_filter_library.ESO.GROND, g=(20.93,.23), r=(20.6,0.12), i=(20.4,.07), z=(20.3,.04), J=(20.0,.03), H=(19.8,.03), K=(19.7,.04))

Magnitudes and errors are entered as keyword arguments where the key is the filter name and the argument is a tuple containing the data. You can exclude data for individual filters and they will be ignored during the fit.

NOTE: PhotometryLike expects apparent AB magnitudes. Please calibrate your data to this system

  • name – plugin name

  • filters – speclite filters

  • kwargs – keyword args of band name and tuple(mag, mag error)

property magnitude_errors
property magnitudes
property observation: PhotometericObservation
plot(data_color: str = 'r', model_color: str = 'blue', show_data: bool = True, show_residuals: bool = True, show_legend: bool = True, model_label: Optional[str] = None, model_kwargs: Optional[Dict[str, Any]] = None, data_kwargs: Optional[Dict[str, Any]] = None, **kwargs) ResidualPlot[source]

TODO describe function

  • data_color (str) –

  • model_color (str) –

  • show_data (bool) –

  • show_residuals (bool) –

  • show_legend (bool) –

  • model_label (Optional[str]) –

  • model_kwargs (Optional[Dict[str, Any]]) –

  • data_kwargs (Optional[Dict[str, Any]]) –



set the likelihood model :param likelihood_model: :return: