luminosity_temperature_pipeline(sample_data, start_aperture, use_peak=False, peak_find_method='hierarchical', convergence_frac=0.1, min_iter=3, max_iter=10, rad_temp_rel=<xga.products.relation.ScalingRelation object>, lum_en=<Quantity [[5.e-01, 2.e+00], [1.e-02, 1.e+02]] keV>, core_excised=False, freeze_nh=True, freeze_met=True, lo_en=<Quantity 0.3 keV>, hi_en=<Quantity 7.9 keV>, group_spec=True, min_counts=5, min_sn=None, over_sample=None, save_samp_results_path=None, save_rad_history_path=None, cosmo=LambdaCDM(H0=70.0 km / (Mpc s), Om0=0.3, Ode0=0.7, Tcmb0=0.0 K, Neff=3.04, m_nu=None, Ob0=None), timeout=<Quantity 1. h>, num_cores=1)¶
This is the XGA pipeline for measuring overdensity radii, and the temperatures and luminosities within the radii, for a sample of clusters. No knowledge of the overdensity radii of the clusters is required beforehand, only the position and redshift of the objects. A name is also required for each of them.
The pipeline works by measuring a temperature from a spectrum generated with radius equal to the ‘start_aperture’, and the using the radius temperature relation (‘rad_temp_rel’) to infer a value for the overdensity radius you are targeting. The cluster’s overdensity radius is set equal to the new radius estimate and we repeat the process.
A cluster radius measurement is accepted if the ‘current’ estimate of the radius is considered to be converged with the last estimate. For instance if ‘convergence_frac’ is set to 0.1, convergence occurs when a change of less than 10% from the last radius estimate is measured. The radii cannot be assessed for convergence until at least ‘min_iter’ iterations have been passed, and the iterative process will end if the number of iterations reaches ‘max_iter’.
This pipeline will only work for clusters that we can successfully measure temperatures for, which requires a minimum data quality - as such you may find that some do not achieve successful radius measurements with this pipeline. In these cases the pipeline should not error, but the failure will be recorded in the results and radius history dataframes returned from the function (and optionally written to CSV files). The pipeline will also gracefully handle SAS spectrum generation failures, removing the offending clusters from the sample being analysed and warning the user of the failure.
As with all XGA sources and samples, the XGA luminosity-temperature pipeline DOES NOT require all objects passed in the sample_data to have X-ray observations. Those that do not will simply be filtered out.
This pipeline will not read in previous XSPEC fits in its current form, though previously generated spectra will be read in.
sample_data (pd.DataFrame) – A dataframe of information on the galaxy clusters. The columns ‘ra’, ‘dec’, ‘name’, and ‘redshift’ are required for this pipeline to work.
start_aperture (Quantity) – This is the radius used to generate the first set of spectra for each cluster, which in turn are fit to produce the first temperature estimate.
use_peak (bool) – If True then XGA will measure an X-ray peak coordinate and use that as the centre for spectrum generation and fitting, and the peak coordinate will be included in the results dataframe/csv. If False then the coordinate in sample_data will be used. Default is False.
peak_find_method (str) – Which peak finding method should be used (if use_peak is True). Default is ‘hierarchical’ (uses XGA’s hierarchical clustering peak finder), ‘simple’ may also be passed in which case the brightest unmasked pixel within the source region will be selected.
convergence_frac (float) – This defines how close a current radii estimate must be to the last radii measurement for it to count as converged. The default value is 0.1, which means the current-to-last estimate ratio must be between 0.9 and 1.1.
min_iter (int) – The minimum number of iterations before a radius can converge and be accepted. The default is 3.
max_iter (int) – The maximum number of iterations before the loop exits and the pipeline moves on. This makes sure that the loop has an exit condition and won’t continue on forever. The default is 10.
rad_temp_rel (ScalingRelation) – The scaling relation used to convert a cluster temperature measurement for into an estimate of an overdensity radius. The y-axis must be radii, and the x-axis must be temperature. The pipeline will attempt to determine the overdensity radius you are attempting to measure for by checking the name of the y-axis; it must contain 2500, 500, or 200 to indicate the overdensity. The default is the R500-Tx Arnaud et al. 2005 relation.
lum_en (Quantity) – The energy bands in which to measure luminosity. The default is Quantity([[0.5, 2.0], [0.01, 100.0]], ‘keV’), corresponding to the 0.5-2.0keV and bolometric bands.
core_excised (bool) – Should final measurements of temperature and luminosity be made with core-excision in addition to measurements within the overdensity radius specified by the scaling relation. This will involve multiplying the radii by 0.15 to determine the inner radius. Default is False.
freeze_nh (bool) – Controls whether the hydrogen column density (nH) should be frozen during XSPEC fits to spectra, the default is True.
freeze_met (bool) – Controls whether metallicity should be frozen during XSPEC fits to spectra, the default is False. Leaving metallicity free to vary tends to require more photons to achieve a good fit.
lo_en (Quantity) – The lower energy limit for the data to be fitted by XSPEC. The default is 0.3 keV.
hi_en (Quantity) – The upper energy limit for the data to be fitted by XSPEC. The default is 7.9 keV, but reducing this value may help achieve a good fit for suspected lower temperature systems.
group_spec (bool) – A boolean flag that sets whether generated spectra are grouped or not.
min_counts (float) – If generating a grouped spectrum, this is the minimum number of counts per channel. To disable minimum counts set this parameter to None.
min_sn (float) – If generating a grouped spectrum, this is the minimum signal to noise in each channel. To disable minimum signal to noise set this parameter to None.
over_sample (float) – The minimum energy resolution for each group, set to None to disable. e.g. if over_sample=3 then the minimum width of a group is 1/3 of the resolution FWHM at that energy.
save_samp_results_path (str) – The path to save the final results (temperatures, luminosities, radii) to. The default is None, in which case no file will be created. This information is also returned from this function.
save_rad_history_path (str) – The path to save the radii history for all clusters. This specifies what the estimated radius was for each cluster at each iteration step, in kpc. The default is None, in which case no file will be created. This information is also returned from this function.
cosmo (Cosmology) – The cosmology to use for sample declaration, and thus for all analysis. The default cosmology is a flat LambdaCDM concordance model.
timeout (Quantity) – This sets the amount of time an XSPEC fit can run before it is timed out, the default is 1 hour.
num_cores (int) – The number of cores that can be used for spectrum generation and fitting. The default is 90% of the cores detected on the system.
The GalaxyCluster sample object used for this analysis, the dataframe of results for all input objects (even those for which the pipeline was unsuccessful), and the radius history dataframe for the clusters.
- Return type
Tuple[ClusterSample, pd.DataFrame, pd.DataFrame]