threeML.plugins.PhotometryLike module

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

Bases: object

property off

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

Type:

Turn on or off the band. Use booleans, like

property on

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

Type:

Turn on or off the band. Use booleans, like

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

Bases: XYLike

display_filters()[source]

display the filter transmission curves

Returns:

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

Create the a PhotometryLike plugin from a saved HDF5 data file

Parameters:
  • name – plugin name

  • filters – speclite filters

  • file_name – name of the observation file

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

Example:

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

Parameters:
  • 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: str | None = None, model_kwargs: Dict[str, Any] | None = None, data_kwargs: Dict[str, Any] | None = None, **kwargs) ResidualPlot[source]

TODO describe function

Parameters:
  • 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]]) –

Returns:

set_model(likelihood_model)[source]

set the likelihood model :param likelihood_model: :return: