samples

samples.base module

class xga.samples.base.BaseSample(ra, dec, redshift=None, name=None, cosmology=FlatLambdaCDM(name="Planck15", H0=67.7 km / (Mpc s), Om0=0.307, Tcmb0=2.725 K, Neff=3.05, m_nu=[0. 0. 0.06] eV, Ob0=0.0486), load_products=True, load_fits=False, no_prog_bar=False)[source]

Bases: object

The superclass for all sample classes. These store whole samples of sources, to make bulk analysis of interesting X-ray sources easy.

property names

Property getter for the list of source names in this sample.

Returns

List of source names.

Return type

list

property ra_decs

Property getter for the list of RA-DEC positions of the sources in this sample.

Returns

List of source RA-DEC positions as supplied at sample initialisation.

Return type

Quantity

property redshifts

Property getter for the list of redshifts of the sources in this sample (if available). If no redshifts were supplied, None will be returned.

Returns

List of redshifts.

Return type

ndarray

property nHs

Property getter for the list of nH values of the sources in this sample.

Returns

List of nH values.

Return type

Quantity

property cosmo

Property getter for the cosmology defined at initialisation of the sample. This cosmology is what is used for all analyses performed on the sample.

Returns

The chosen cosmology.

property obs_ids

Property meant to inform the user about the number (and identities) of ObsIDs associated with the sources in a given sample.

Returns

A dictionary (where the top level keys are the source names) of the ObsIDs associated with the

individual sources in this sample. :rtype: dict

property instruments

Property meant to inform the user about the number (and identities) of instruments associated with ObsIDs associated with the sources in a given sample.

Returns

A dictionary (where the top level keys are the source names) of the instruments associated with

ObsIDs associated with the individual sources in this sample. :rtype: dict

property failed_names

Yields the names of those sources that could not be declared for some reason.

Returns

A list of source names that could not be declared.

Return type

List[str]

property failed_reasons

Returns a dictionary containing sources that failed to be declared successfully, and a simple reason why they couldn’t be.

Returns

A dictionary of source names as keys, and reasons as values.

Return type

Dict[str, str]

Lx(outer_radius, model, inner_radius=<Quantity 0. arcsec>, lo_en=<Quantity 0.5 keV>, hi_en=<Quantity 2. keV>, group_spec=True, min_counts=5, min_sn=None, over_sample=None, quality_checks=True)[source]

A get method for luminosities measured for the constituent sources of this sample. An error will be thrown if luminosities haven’t been measured for the given region and model, no default model has been set, unlike the Tx method of ClusterSample. An extra condition that aims to only return ‘good’ data has been included, so that any Lx measurement with an uncertainty greater than value will be set to NaN, and a warning will be issued.

Parameters
  • model (str) – The name of the fitted model that you’re requesting the luminosities from (e.g. constant*tbabs*apec).

  • outer_radius (str/Quantity) – The name or value of the outer radius that was used for the generation of the spectra which were fitted to produce the desired result (for instance ‘r200’ would be acceptable for a GalaxyCluster, or Quantity(1000, ‘kpc’)). You may also pass a quantity containing radius values, with one value for each source in this sample.

  • inner_radius (str/Quantity) – The name or value of the inner radius that was used for the generation of the spectra which were fitted to produce the desired result (for instance ‘r500’ would be acceptable for a GalaxyCluster, or Quantity(300, ‘kpc’)). By default this is zero arcseconds, resulting in a circular spectrum. You may also pass a quantity containing radius values, with one value for each source in this sample.

  • lo_en (Quantity) – The lower energy limit for the desired luminosity measurement.

  • hi_en (Quantity) – The upper energy limit for the desired luminosity measurement.

  • group_spec (bool) – Whether the spectra that were fitted for the desired result were grouped.

  • min_counts (float) – The minimum counts per channel, if the spectra that were fitted for the desired result were grouped by minimum counts.

  • min_sn (float) – The minimum signal to noise per channel, if the spectra that were fitted for the desired result were grouped by minimum signal to noise.

  • over_sample (float) – The level of oversampling applied on the spectra that were fitted.

  • quality_checks (bool) – Whether the quality checks to make sure a returned value is good enough to use should be performed.

Returns

An Nx3 array Quantity where N is the number of sources. First column is the luminosity, second column is the -err, and 3rd column is the +err. If a fit failed then that entry will be NaN

Return type

Quantity

check_spectra()[source]

This method checks through the spectra associated with each source in the sample, printing a summary of which aren’t usable and the reasons.

info()[source]

Simple function to show basic information about the sample.

samples.general module

class xga.samples.general.PointSample(ra, dec, redshift=None, name=None, point_radius=<Quantity 30. arcsec>, use_peak=False, peak_lo_en=<Quantity 0.5 keV>, peak_hi_en=<Quantity 2. keV>, back_inn_rad_factor=1.05, back_out_rad_factor=1.5, cosmology=FlatLambdaCDM(name="Planck15", H0=67.7 km / (Mpc s), Om0=0.307, Tcmb0=2.725 K, Neff=3.05, m_nu=[0. 0. 0.06] eV, Ob0=0.0486), load_fits=False, no_prog_bar=False, psf_corr=False)[source]

Bases: xga.samples.base.BaseSample

property point_radii

Property getter for the radii of the regions used for analysis of the point sources in this sample.

Returns

A non-scalar Quantity of the point source radii used for analysis of the point sources in this sample.

Return type

Quantity

property point_radii_unit

Property getter for the unit which the point radii values are stored in.

Returns

The unit that the point radii are stored in.

Return type

Unit

samples.extended module

class xga.samples.extended.ClusterSample(ra, dec, redshift, name, r200=None, r500=None, r2500=None, richness=None, richness_err=None, wl_mass=None, wl_mass_err=None, custom_region_radius=None, use_peak=True, peak_lo_en=<Quantity 0.5 keV>, peak_hi_en=<Quantity 2. keV>, back_inn_rad_factor=1.05, back_out_rad_factor=1.5, cosmology=FlatLambdaCDM(name="Planck15", H0=67.7 km / (Mpc s), Om0=0.307, Tcmb0=2.725 K, Neff=3.05, m_nu=[0. 0. 0.06] eV, Ob0=0.0486), load_fits=False, clean_obs=True, clean_obs_reg='r200', clean_obs_threshold=0.3, no_prog_bar=False, psf_corr=False)[source]

Bases: xga.samples.base.BaseSample

A sample class to be used for declaring and analysing populations of galaxy clusters, with many cluster-science specific functions, such as the ability to create common scaling relations.

property r200_snr

Fetches and returns the R200 signal to noises from the constituent sources.

Returns

The signal to noise ration calculated at the R200.

Return type

np.ndarray

property r500_snr

Fetches and returns the R500 signal to noises from the constituent sources.

Returns

The signal to noise ration calculated at the R500.

Return type

np.ndarray

property r2500_snr

Fetches and returns the R2500 signal to noises from the constituent sources.

Returns

The signal to noise ration calculated at the R2500.

Return type

np.ndarray

property richness

Provides the richnesses of the clusters in this sample, if they were passed in on definition.

Returns

A unitless Quantity object of the richnesses and their error(s).

Return type

Quantity

property wl_mass

Provides the weak lensing masses of the clusters in this sample, if they were passed in on definition.

Returns

A Quantity object of the WL masses and their error(s), in whatever units they were when

they were passed in originally. :rtype: Quantity

property r200

Returns all the R200 values passed in on declaration, but in units of kpc.

Returns

A quantity of R200 values.

Return type

Quantity

property r500

Returns all the R500 values passed in on declaration, but in units of kpc.

Returns

A quantity of R500 values.

Return type

Quantity

property r2500

Returns all the R2500 values passed in on declaration, but in units of kpc.

Returns

A quantity of R2500 values.

Return type

Quantity

Lx(outer_radius, model='constant*tbabs*apec', inner_radius=<Quantity 0. arcsec>, lo_en=<Quantity 0.5 keV>, hi_en=<Quantity 2. keV>, group_spec=True, min_counts=5, min_sn=None, over_sample=None, quality_checks=True)[source]

A get method for luminosities measured for the constituent sources of this sample. An error will be thrown if luminosities haven’t been measured for the given region and model, no default model has been set, unlike the Tx method of ClusterSample. An extra condition that aims to only return ‘good’ data has been included, so that any Lx measurement with an uncertainty greater than value will be set to NaN, and a warning will be issued.

This overrides the BaseSample method, but the only difference is that this has a default model, which is what single_temp_apec fits (constant*tbabs*apec).

Parameters
  • model (str) – The name of the fitted model that you’re requesting the luminosities from (e.g. constant*tbabs*apec).

  • outer_radius (str/Quantity) – The name or value of the outer radius that was used for the generation of the spectra which were fitted to produce the desired result (for instance ‘r200’ would be acceptable for a GalaxyCluster, or Quantity(1000, ‘kpc’)). You may also pass a quantity containing radius values, with one value for each source in this sample.

  • inner_radius (str/Quantity) – The name or value of the inner radius that was used for the generation of the spectra which were fitted to produce the desired result (for instance ‘r500’ would be acceptable for a GalaxyCluster, or Quantity(300, ‘kpc’)). By default this is zero arcseconds, resulting in a circular spectrum. You may also pass a quantity containing radius values, with one value for each source in this sample.

  • lo_en (Quantity) – The lower energy limit for the desired luminosity measurement.

  • hi_en (Quantity) – The upper energy limit for the desired luminosity measurement.

  • group_spec (bool) – Whether the spectra that were fitted for the desired result were grouped.

  • min_counts (float) – The minimum counts per channel, if the spectra that were fitted for the desired result were grouped by minimum counts.

  • min_sn (float) – The minimum signal to noise per channel, if the spectra that were fitted for the desired result were grouped by minimum signal to noise.

  • over_sample (float) – The level of oversampling applied on the spectra that were fitted.

  • quality_checks (bool) – Whether the quality checks to make sure a returned value is good enough to use should be performed.

Returns

An Nx3 array Quantity where N is the number of sources. First column is the luminosity, second column is the -err, and 3rd column is the +err. If a fit failed then that entry will be NaN

Return type

Quantity

Tx(outer_radius='r500', model='constant*tbabs*apec', inner_radius=<Quantity 0. arcsec>, group_spec=True, min_counts=5, min_sn=None, over_sample=None, quality_checks=True)[source]

A get method for temperatures measured for the constituent clusters of this sample. An error will be thrown if temperatures haven’t been measured for the given region (the default is R_500) and model (default is the constant*tbabs*apec model which single_temp_apec fits to cluster spectra). Any clusters for which temperature fits failed will return NaN temperatures, and with temperature greater than 25keV is considered failed, any temperature with a negative error value is considered failed, any temperature where the Tx-low err is less than zero isn’t returned, and any temperature where one of the errors is more than three times larger than the other is considered failed (if quality checks are on).

Parameters
  • model (str) – The name of the fitted model that you’re requesting the results from (e.g. constant*tbabs*apec).

  • outer_radius (str/Quantity) – The name or value of the outer radius that was used for the generation of the spectra which were fitted to produce the desired result (for instance ‘r200’ would be acceptable for a GalaxyCluster, or Quantity(1000, ‘kpc’)). If ‘region’ is chosen (to use the regions in region files), then any inner radius will be ignored. You may also pass a quantity containing radius values, with one value for each source in this sample. The default for this method is r500.

  • inner_radius (str/Quantity) – The name or value of the inner radius that was used for the generation of the spectra which were fitted to produce the desired result (for instance ‘r500’ would be acceptable for a GalaxyCluster, or Quantity(300, ‘kpc’)). By default this is zero arcseconds, resulting in a circular spectrum. You may also pass a quantity containing radius values, with one value for each source in this sample.

  • group_spec (bool) – Whether the spectra that were fitted for the desired result were grouped.

  • min_counts (float) – The minimum counts per channel, if the spectra that were fitted for the desired result were grouped by minimum counts.

  • min_sn (float) – The minimum signal to noise per channel, if the spectra that were fitted for the desired result were grouped by minimum signal to noise.

  • over_sample (float) – The level of oversampling applied on the spectra that were fitted.

  • quality_checks (bool) – Whether the quality checks to make sure a returned value is good enough to use should be performed.

Returns

An Nx3 array Quantity where N is the number of clusters. First column is the temperature, second column is the -err, and 3rd column is the +err. If a fit failed then that entry will be NaN.

Return type

Quantity

gas_mass(rad_name, dens_model, method, prof_outer_rad=None, pix_step=1, min_snr=0.0, psf_corr=True, psf_model='ELLBETA', psf_bins=4, psf_algo='rl', psf_iter=15, set_ids=None, quality_checks=True)[source]

A convenient get method for gas masses measured for the constituent clusters of this sample, though the arguments that can be passed to retrieve gas density profiles are limited to tone-down the complexity. Largely this method assumes you have measured density profiles from combined surface brightness profiles, though if you have generated density profiles from annular spectra and know their set ids you may pass them. Any more nuanced access to density profiles will have to be done yourself.

If the specified density model hasn’t been fitted to the density profile, this method will run a fit using the default settings of the fit method of XGA profiles.

A gas mass will be set to NaN if either of the uncertainties are larger than the gas mass value, if the gas mass value is less than 1e+9 solar masses, if the gas mass value is greater than 1e+16 solar masses, if quality checks are on.

Parameters
  • rad_name (str) – The name of the radius (e.g. r500) to calculate the gas mass within.

  • dens_model (str) – The model fit to the density profiles to be used to calculate gas mass. If a fit doesn’t already exist then one will be performed with default settings.

  • method (str) – The method used to generate the density profile. For a profile created by fitting a model to a surface brightness profile this should be the name of the model, for a profile from annular spectra this should be ‘spec’, and for a profile generated directly from the data of a surface brightness profile this should be ‘onion’.

  • prof_outer_rad (Quantity/str) – The outer radii of the density profiles, either a single radius name or a Quantity containing an outer radius for each cluster. For instance if you defined a ClusterSample called srcs you could pass srcs.r500 here.

  • pix_step (int) – The width of each annulus in pixels used to generate the profile, for profiles based on surface brightness.

  • min_snr (float) – The minimum signal to noise imposed upon the profile, for profiles based on surface brightness.

  • psf_corr (bool) – Is the brightness profile corrected for PSF effects, for profiles based on surface brightness.

  • psf_model (str) – If PSF corrected, the PSF model used, for profiles based on surface brightness.

  • psf_bins (int) – If PSF corrected, the number of bins per side, for profiles based on surface brightness.

  • psf_algo (str) – If PSF corrected, the algorithm used, for profiles based on surface brightness.

  • psf_iter (int) – If PSF corrected, the number of algorithm iterations, for profiles based on surface brightness.

  • set_ids (List[int]) – A list of AnnularSpectra set IDs used to generate the density profiles, if you wish to use spectrum based density profiles here.

  • quality_checks (bool) – Whether the quality checks to make sure a returned value is good enough to use should be performed.

Returns

An Nx3 array Quantity where N is the number of clusters. First column is the gas mass, second column is the -err, and 3rd column is the +err. If a fit failed then that entry will be NaN.

Return type

Quantity

hydrostatic_mass(rad_name, temp_model_name=None, dens_model_name=None, quality_checks=True)[source]

A simple method for fetching hydrostatic masses of this sample of clusters. This function is limited, and if you have generated multiple hydrostatic mass profiles you may have to use the get_hydrostatic_mass_profiles function of each source directly, or use the returned profiles from the function that generated them.

If only one hydrostatic mass profile has been generated for each source, then you do not need to specify model names, but if the same temperature and density profiles have been used to make a hydrostatic mass profile but with different models then you may use them.

A mass will be set to NaN if either of the uncertainties are larger than the mass value, if the mass value is less than 1e+12 solar masses, if the mass value is greater than 1e+16 solar masses (if quality checks are on), or if no hydrostatic mass profile is available.

Parameters
  • rad_name (str) – The name of the radius (e.g. r500) to calculate the hydrostatic mass within.

  • temp_model_name (str) – The name of the model used to fit the temperature profile used to generate the required hydrostatic mass profile, default is None.

  • dens_model_name (str) – The name of the model used to fit the density profile used to generate the required hydrostatic mass profile, default is None.

  • quality_checks (bool) – Whether the quality checks to make sure a returned value is good enough to use should be performed.

Returns

An Nx3 array Quantity where N is the number of clusters. First column is the hydrostatic mass, second column is the -err, and 3rd column is the +err. If a fit failed then that entry will be NaN.

Return type

Quantity

gm_richness(rad_name, dens_model, prof_outer_rad, dens_method, x_norm=<Quantity 60.>, y_norm=<Quantity 1.e+12 solMass>, fit_method='odr', start_pars=None, pix_step=1, min_snr=0.0, psf_corr=True, psf_model='ELLBETA', psf_bins=4, psf_algo='rl', psf_iter=15, set_ids=None, inv_efunc=False)[source]

This generates a Gas Mass vs Richness scaling relation for this sample of Galaxy Clusters.

Parameters
  • rad_name (str) – The name of the radius (e.g. r500) to measure gas mass within.

  • dens_model (str) – The model fit to the density profiles to be used to calculate gas mass. If a fit doesn’t already exist then one will be performed with default settings.

  • prof_outer_rad (Quantity/str) – The outer radii of the density profiles, either a single radius name or a Quantity containing an outer radius for each cluster. For instance if you defined a ClusterSample called srcs you could pas srcs.r500 here.

  • dens_method (str) – The method used to generate the density profile. For a profile created by fitting a model to a surface brightness profile this should be the name of the model, for a profile from annular spectra this should be ‘spec’, and for a profile generated directly from the data of a surface brightness profile this should be ‘onion’.

  • x_norm (Quantity) – Quantity to normalise the x data by.

  • y_norm (Quantity) – Quantity to normalise the y data by.

  • fit_method (str) – The name of the fit method to use to generate the scaling relation.

  • start_pars (list) – The start parameters for the fit run.

  • pix_step (int) – The width of each annulus in pixels used to generate the profile, for profiles based on surface brightness.

  • min_snr (float) – The minimum signal to noise imposed upon the profile, for profiles based on surface brightness.

  • psf_corr (bool) – Is the brightness profile corrected for PSF effects, for profiles based on surface brightness.

  • psf_model (str) – If PSF corrected, the PSF model used, for profiles based on surface brightness.

  • psf_bins (int) – If PSF corrected, the number of bins per side, for profiles based on surface brightness.

  • psf_algo (str) – If PSF corrected, the algorithm used, for profiles based on surface brightness.

  • psf_iter (int) – If PSF corrected, the number of algorithm iterations, for profiles based on surface brightness.

  • set_ids (List[int]) – A list of AnnularSpectra set IDs used to generate the density profiles, if you wish to use spectrum based density profiles here.

  • inv_efunc (bool) – Should the inverse E(z) function be applied to the y-axis, if False then the non-inverse will be applied.

Returns

The XGA ScalingRelation object generated for this sample.

Return type

ScalingRelation

gm_Tx(rad_name, dens_model, prof_outer_rad, dens_method, x_norm=<Quantity 4. keV>, y_norm=<Quantity 1.e+12 solMass>, fit_method='odr', start_pars=None, model='constant*tbabs*apec', group_spec=True, min_counts=5, min_sn=None, over_sample=None, pix_step=1, min_snr=0.0, psf_corr=True, psf_model='ELLBETA', psf_bins=4, psf_algo='rl', psf_iter=15, set_ids=None, inv_efunc=False)[source]

This generates a Gas Mass vs Tx scaling relation for this sample of Galaxy Clusters.

Parameters
  • rad_name (str) – The name of the radius (e.g. r500) to get values for.

  • dens_model (str) – The model fit to the density profiles to be used to calculate gas mass. If a fit doesn’t already exist then one will be performed with default settings.

  • prof_outer_rad (Quantity/str) – The outer radii of the density profiles, either a single radius name or a Quantity containing an outer radius for each cluster. For instance if you defined a ClusterSample called srcs you could pas srcs.r500 here.

  • dens_method (str) – The method used to generate the density profile. For a profile created by fitting a model to a surface brightness profile this should be the name of the model, for a profile from annular spectra this should be ‘spec’, and for a profile generated directly from the data of a surface brightness profile this should be ‘onion’.

  • x_norm (Quantity) – Quantity to normalise the x data by.

  • y_norm (Quantity) – Quantity to normalise the y data by.

  • fit_method (str) – The name of the fit method to use to generate the scaling relation.

  • start_pars (list) – The start parameters for the fit run.

  • model (str) – The name of the model that the temperatures were measured with.

  • group_spec (bool) – Whether the spectra that were fitted for the Tx values were grouped.

  • min_counts (float) – The minimum counts per channel, if the spectra that were fitted for the Tx values were grouped by minimum counts.

  • min_sn (float) – The minimum signal to noise per channel, if the spectra that were fitted for the Tx values were grouped by minimum signal to noise.

  • over_sample (float) – The level of oversampling applied on the spectra that were fitted.

  • pix_step (int) – The width of each annulus in pixels used to generate the profile, for profiles based on surface brightness.

  • min_snr (float) – The minimum signal to noise imposed upon the profile, for profiles based on surface brightness.

  • psf_corr (bool) – Is the brightness profile corrected for PSF effects, for profiles based on surface brightness.

  • psf_model (str) – If PSF corrected, the PSF model used, for profiles based on surface brightness.

  • psf_bins (int) – If PSF corrected, the number of bins per side, for profiles based on surface brightness.

  • psf_algo (str) – If PSF corrected, the algorithm used, for profiles based on surface brightness.

  • psf_iter (int) – If PSF corrected, the number of algorithm iterations, for profiles based on surface brightness.

  • set_ids (List[int]) – A list of AnnularSpectra set IDs used to generate the density profiles, if you wish to use spectrum based density profiles here.

  • inv_efunc (bool) – Should the inverse E(z) function be applied to the y-axis, if False then the non-inverse will be applied.

Returns

The XGA ScalingRelation object generated for this sample.

Return type

ScalingRelation

Lx_richness(outer_radius='r500', x_norm=<Quantity 60.>, y_norm=<Quantity 1.e+44 erg / s>, fit_method='odr', start_pars=None, model='constant*tbabs*apec', lo_en=<Quantity 0.5 keV>, hi_en=<Quantity 2. keV>, inner_radius=<Quantity 0. arcsec>, group_spec=True, min_counts=5, min_sn=None, over_sample=None, inv_efunc=True)[source]

This generates a Lx vs richness scaling relation for this sample of Galaxy Clusters. If you have run fits to find core excised luminosity, and wish to use it in this scaling relation, then please don’t forget to supply an inner_radius to the method call.

Parameters
  • outer_radius (str) – The name of the radius (e.g. r500) to get values for.

  • x_norm (Quantity) – Quantity to normalise the x data by.

  • y_norm (Quantity) – Quantity to normalise the y data by.

  • fit_method (str) – The name of the fit method to use to generate the scaling relation.

  • start_pars (list) – The start parameters for the fit run.

  • model (str) – The name of the model that the luminosities were measured with.

  • lo_en (Quantity) – The lower energy limit for the desired luminosity measurement.

  • hi_en (Quantity) – The upper energy limit for the desired luminosity measurement.

  • inner_radius (str/Quantity) – The name or value of the inner radius that was used for the generation of the spectra which were fitted to produce the desired result (for instance ‘r500’ would be acceptable for a GalaxyCluster, or Quantity(300, ‘kpc’)). By default this is zero arcseconds, resulting in a circular spectrum. You may also pass a quantity containing radius values, with one value for each source in this sample.

  • group_spec (bool) – Whether the spectra that were fitted for the desired result were grouped.

  • min_counts (float) – The minimum counts per channel, if the spectra that were fitted for the desired result were grouped by minimum counts.

  • min_sn (float) – The minimum signal to noise per channel, if the spectra that were fitted for the desired result were grouped by minimum signal to noise.

  • over_sample (float) – The level of oversampling applied on the spectra that were fitted.

  • inv_efunc (bool) – Should the inverse E(z) function be applied to the y-axis, if False then the non-inverse will be applied.

Returns

The XGA ScalingRelation object generated for this sample.

Return type

ScalingRelation

Lx_Tx(outer_radius='r500', x_norm=<Quantity 4. keV>, y_norm=<Quantity 1.e+44 erg / s>, fit_method='odr', start_pars=None, model='constant*tbabs*apec', lo_en=<Quantity 0.5 keV>, hi_en=<Quantity 2. keV>, tx_inner_radius=<Quantity 0. arcsec>, lx_inner_radius=<Quantity 0. arcsec>, group_spec=True, min_counts=5, min_sn=None, over_sample=None, inv_efunc=True)[source]

This generates a Lx vs Tx scaling relation for this sample of Galaxy Clusters. If you have run fits to find core excised luminosity, and wish to use it in this scaling relation, then you can specify the inner radius of those spectra using lx_inner_radius, as well as ensuring that you use the temperature fit you want by setting tx_inner_radius.

Parameters
  • outer_radius (str) – The name of the radius (e.g. r500) to get values for.

  • x_norm (Quantity) – Quantity to normalise the x data by.

  • y_norm (Quantity) – Quantity to normalise the y data by.

  • fit_method (str) – The name of the fit method to use to generate the scaling relation.

  • start_pars (list) – The start parameters for the fit run.

  • model (str) – The name of the model that the luminosities and temperatures were measured with.

  • lo_en (Quantity) – The lower energy limit for the desired luminosity measurement.

  • hi_en (Quantity) – The upper energy limit for the desired luminosity measurement.

  • tx_inner_radius (str/Quantity) – The name or value of the inner radius that was used for the generation of the spectra which were fitted to produce the temperature (for instance ‘r500’ would be acceptable for a GalaxyCluster, or Quantity(300, ‘kpc’)). By default this is zero arcseconds, resulting in a circular spectrum. You may also pass a quantity containing radius values, with one value for each source in this sample.

  • lx_inner_radius (str/Quantity) – The name or value of the inner radius that was used for the generation of the spectra which were fitted to produce the Lx. The same rules as tx_inner_radius apply, and this option is particularly useful if you have measured core-excised luminosity an wish to use it in a scaling relation.

  • group_spec (bool) – Whether the spectra that were fitted for the desired result were grouped.

  • min_counts (float) – The minimum counts per channel, if the spectra that were fitted for the desired result were grouped by minimum counts.

  • min_sn (float) – The minimum signal to noise per channel, if the spectra that were fitted for the desired result were grouped by minimum signal to noise.

  • over_sample (float) – The level of oversampling applied on the spectra that were fitted.

  • inv_efunc (bool) – Should the inverse E(z) function be applied to the y-axis, if False then the non-inverse will be applied.

Returns

The XGA ScalingRelation object generated for this sample.

Return type

ScalingRelation

mass_Tx(outer_radius='r500', x_norm=<Quantity 4. keV>, y_norm=<Quantity 5.e+14 solMass>, fit_method='odr', start_pars=None, model='constant*tbabs*apec', tx_inner_radius=<Quantity 0. arcsec>, group_spec=True, min_counts=5, min_sn=None, over_sample=None, temp_model_name=None, dens_model_name=None, inv_efunc=False)[source]

A convenience function to generate a hydrostatic mass-temperature relation for this sample of galaxy clusters.

Parameters
  • outer_radius (str) – The outer radius of the region used to measure temperature and the radius out to which you wish to measure mass.

  • x_norm (Quantity) – Quantity to normalise the x data by.

  • y_norm (Quantity) – Quantity to normalise the y data by.

  • fit_method (str) – The name of the fit method to use to generate the scaling relation.

  • start_pars (list) – The start parameters for the fit run.

  • model (str) – The name of the model that the luminosities and temperatures were measured with.

  • tx_inner_radius (str/Quantity) – The name or value of the inner radius that was used for the generation of the spectra which were fitted to produce the temperature (for instance ‘r500’ would be acceptable for a GalaxyCluster, or Quantity(300, ‘kpc’)). By default this is zero arcseconds, resulting in a circular spectrum. You may also pass a quantity containing radius values, with one value for each source in this sample.

  • group_spec (bool) – Whether the spectra that were fitted for the desired result were grouped.

  • min_counts (float) – The minimum counts per channel, if the spectra that were fitted for the desired result were grouped by minimum counts.

  • min_sn (float) – The minimum signal to noise per channel, if the spectra that were fitted for the desired result were grouped by minimum signal to noise.

  • over_sample (float) – The level of oversampling applied on the spectra that were fitted.

  • temp_model_name (str) – The name of the model used to fit the temperature profile used to generate the required hydrostatic mass profile, default is None.

  • dens_model_name (str) – The name of the model used to fit the density profile used to generate the required hydrostatic mass profile, default is None.

  • inv_efunc (bool) – Should the inverse E(z) function be applied to the y-axis, if False then the non-inverse will be applied.

Returns

The XGA ScalingRelation object generated for this sample.

Return type

ScalingRelation

mass_richness(outer_radius='r500', x_norm=<Quantity 60.>, y_norm=<Quantity 5.e+14 solMass>, fit_method='odr', start_pars=None, temp_model_name=None, dens_model_name=None, inv_efunc=False)[source]

A convenience function to generate a hydrostatic mass-richness relation for this sample of galaxy clusters.

Parameters
  • outer_radius (str) – The name of the radius (e.g. r500) to get values for.

  • x_norm (Quantity) – Quantity to normalise the x data by.

  • y_norm (Quantity) – Quantity to normalise the y data by.

  • fit_method (str) – The name of the fit method to use to generate the scaling relation.

  • start_pars (list) – The start parameters for the fit run.

  • temp_model_name (str) – The name of the model used to fit the temperature profile used to generate the required hydrostatic mass profile, default is None.

  • dens_model_name (str) – The name of the model used to fit the density profile used to generate the required hydrostatic mass profile, default is None.

  • inv_efunc (bool) – Should the inverse E(z) function be applied to the y-axis, if False then the non-inverse will be applied.

Returns

The XGA ScalingRelation object generated for this sample.

Return type

ScalingRelation

mass_Lx(outer_radius='r500', x_norm=<Quantity 1.e+44 erg / s>, y_norm=<Quantity 5.e+14 solMass>, fit_method='odr', start_pars=None, model='constant*tbabs*apec', lo_en=<Quantity 0.5 keV>, hi_en=<Quantity 2. keV>, lx_inner_radius=<Quantity 0. arcsec>, group_spec=True, min_counts=5, min_sn=None, over_sample=None, temp_model_name=None, dens_model_name=None, inv_efunc=False)[source]

This generates a mass vs Lx scaling relation for this sample of Galaxy Clusters. If you have run fits to find core excised luminosity, and wish to use it in this scaling relation, then you can specify the inner radius of those spectra using lx_inner_radius.

Parameters
  • outer_radius (str) – The name of the radius (e.g. r500) to get values for.

  • x_norm (Quantity) – Quantity to normalise the x data by.

  • y_norm (Quantity) – Quantity to normalise the y data by.

  • fit_method (str) – The name of the fit method to use to generate the scaling relation.

  • start_pars (list) – The start parameters for the fit run.

  • model (str) – The name of the model that the luminosities and temperatures were measured with.

  • lo_en (Quantity) – The lower energy limit for the desired luminosity measurement.

  • hi_en (Quantity) – The upper energy limit for the desired luminosity measurement.

  • lx_inner_radius (str/Quantity) – The name or value of the inner radius that was used for the generation of the spectra which were fitted to produce the Lx. The same rules as tx_inner_radius apply, and this option is particularly useful if you have measured core-excised luminosity an wish to use it in a scaling relation.

  • group_spec (bool) – Whether the spectra that were fitted for the desired result were grouped.

  • min_counts (float) – The minimum counts per channel, if the spectra that were fitted for the desired result were grouped by minimum counts.

  • min_sn (float) – The minimum signal to noise per channel, if the spectra that were fitted for the desired result were grouped by minimum signal to noise.

  • over_sample (float) – The level of oversampling applied on the spectra that were fitted.

  • temp_model_name (str) – The name of the model used to fit the temperature profile used to generate the required hydrostatic mass profile, default is None.

  • dens_model_name (str) – The name of the model used to fit the density profile used to generate the required hydrostatic mass profile, default is None.

  • inv_efunc (bool) – Should the inverse E(z) function be applied to the y-axis, if False then the non-inverse will be applied.

Returns

The XGA ScalingRelation object generated for this sample.

Return type

ScalingRelation

samples.point module