Skip to content

Observation

ocelot.model.observation.GaiaDR3ObservationModel ¤

Bases: BaseObservation

name property ¤

Type of observation modelled by this class.

Should return a lowercase string, like 'gaia_dr3'.

photometric_band_names property ¤

Names of photometric bands modelled by this system.

apply_astrometric_errors(cluster) ¤

Apply astrometric errors to the cluster and save observed astrometry to the cluster.

calculate_astrometric_errors should be called before this method.

By default, this is just a simple UNCORRELATED Gaussian; it may be overwritten if desired. In addition, this method only works on proper motions and parallaxes; if you're writing an observation class that also needs to simulate positional errors, then you should overwrite this function.

__init__(representative_stars=None, subsample_selection_functions=tuple(), overestimate_bp_rp_fluxes=True) ¤

A model for an observation made with Gaia DR3.

calculate_photometric_errors(cluster) ¤

Calculate photometric errors for a simulated cluster.

apply_photometric_errors(cluster) ¤

Custom method to apply photometric errors to a simulated cluster.

Method incorporates the underestimated BP and RP flux measurement issue in DR3.

Follows things discussed in Riello+21, section 8.1.

calculate_astrometric_errors(cluster) ¤

Calculate astrometric errors for a simulated cluster.

get_selection_functions(cluster) ¤

Get an initialized GaiaDR3SelectionFunction in addition to any subsample selection functions defined by the user.

calculate_extinction(cluster) ¤

Applies extinction in a given photometric band observed in this dataset.

calculate_resolving_power(primary, secondary, separation) ¤

Calculates the probability that a given pair of stars would be separately resolved.

mag_to_flux(magnitude, band) ¤

Convert a magnitude in some band into a flux in some band.

flux_to_mag(flux, band) ¤

Convert a flux in some band into a magnitude in some band.

ocelot.model.observation.GaiaDR3SelectionFunction ¤

Bases: BaseSelectionFunction

query(cluster, observation) ¤

Query a selection function. Assigns a column called 'selection_probability_NAME' to the dataframe, along with the column name.

__init__(coordinate, resolution=500, g_range=(2, 22)) ¤

Gaia DR3 selection function. Based on

Parameters:

Name Type Description Default
coordinate SkyCoord

Coordinate to query the selection function at. Must have length one!

required
resolution int

Resolution of the selection function interpolator. Default: 500

500
g_range tuple or list

Range of values in G magnitude to sample, from min to max. Default: (2, 22).

(2, 22)

ocelot.model.observation.GenericSubsampleSelectionFunction ¤

Bases: BaseSelectionFunction

query(cluster, observation) ¤

Query a selection function. Assigns a column called 'selection_probability_NAME' to the dataframe, along with the column name.

__init__(data_all, data_cut, column, minimum_bin_width=0.2, minimum_bin_size=10, bounds_value=0.0, range=None, column_in_data=None) ¤

A generic subsample selection function, following the prescription from [1, 2] and using binomial statistics.

By default, it uses a variable bin width histogram - set minimum_bin_size to zero to prevent this.

Parameters:

Name Type Description Default
data_all DataFrame

A dataset in the region of interest.

required
data_cut DataFrame

A dataset in the region of interest that

required
column str

Column to create the selection function on.

required
minimum_bin_width float

Minimum width of each bin. Set higher to reduce the granularity of the selection function. Default: 0.2

0.2
minimum_bin_size int

Minimum number of stars in each bin. Default: 10

10
bounds_value float

Value of the selection function outside of the range of observed data. Default: 0.0

0.0
range tuple | None

Length-2 array of the minimum and maximum values of 'column' in data_all. Default: None, meaning that the range of data values is inferred from the data itself. This may be inappropriate with small datasets.

None
column_in_data str | None

Alternative column name to use for the datasets. If not specified, 'column' is used. Default: None

None
References

[1] https://ui.adsabs.harvard.edu/abs/2021AJ....162..142R/abstract [2] https://ui.adsabs.harvard.edu/abs/2023A%26A...677A..37C/abstract

ocelot.model.observation.BaseObservation ¤

Bases: ABC

Class defining a model to simulate an observation by some telescope.

name abstractmethod property ¤

Type of observation modelled by this class.

Should return a lowercase string, like 'gaia_dr3'.

photometric_band_names abstractmethod property ¤

Names of photometric bands modelled by this system.

Should return a list of strings, like ['gaia_dr3_g', 'gaia_dr3_bp'].

has_proper_motions abstractmethod property ¤

Boolean flag indicating whether or not a given dataset includes proper motions.

has_parallaxes abstractmethod property ¤

Boolean flag indicating whether or not a given dataset includes parallaxes.

calculate_photometric_errors(cluster) abstractmethod ¤

Calculate photometric errors and save them to the observation.

calculate_astrometric_errors(cluster) abstractmethod ¤

Calculate astrometric errors and save them to the observation.

apply_photometric_errors(cluster) ¤

Apply photometric errors to the cluster and save observed photometry to the cluster.

calculate_photometric_errors should be called before this method.

By default, this is just a simple Gaussian; it may be overwritten if desired.

apply_astrometric_errors(cluster) ¤

Apply astrometric errors to the cluster and save observed astrometry to the cluster.

calculate_astrometric_errors should be called before this method.

By default, this is just a simple UNCORRELATED Gaussian; it may be overwritten if desired. In addition, this method only works on proper motions and parallaxes; if you're writing an observation class that also needs to simulate positional errors, then you should overwrite this function.

get_selection_functions(cluster) abstractmethod ¤

Fetch all selection functions associated with this observation.

calculate_resolving_power(primary, secondary, separation) abstractmethod ¤

Calculates the probability that a given pair of stars would be separately resolved. Overwrite me please!

calculate_extinction(cluster) abstractmethod ¤

Calculate extinction in all photometric bands and saves them to the observation.

mag_to_flux(magnitude, band) abstractmethod ¤

Convert a magnitude in some band into a flux in some band.

flux_to_mag(flux, band) abstractmethod ¤

Convert a flux in some band into a magnitude in some band.

ocelot.model.observation.BaseSelectionFunction ¤

Bases: ABC

query(cluster, observation) ¤

Query a selection function. Assigns a column called 'selection_probability_NAME' to the dataframe, along with the column name.