deproject

Deproject from a set of 2-d annular spectra to the 3-d object properties.

Copyright:Smithsonian Astrophysical Observatory (2009)
Author:Tom Aldcroft (aldcroft@head.cfa.harvard.edu)

Deproject class

class deproject.Deproject(radii, theta=360, angdist=None)

Bases: specstack.SpecStack

Deproject from a set of 2-d annular spectra to the 3-d object properties.

The radii parameter must be a list of values that starts with the inner radius of the inner annulus and includes each radius up through the outer radius of the outer annulus. Thus the radii list will be one element longer than the number of annuli.

Parameters:
  • radii – sorted list of circular annulus radii (arcsec) for extracted spectra
  • theta – azimuthal extent of annuli (degrees) (default = 360)
  • angdist – angular size distance (cm)
angdist

Angular size distance

dummyfunc(*args, **kwargs)
find_norm(shell)

Find the normalization value for the shell model. Check for multiple or missing norms.

Parameters:shell – shell index
Return type:norm value
find_parval(parname)

Find the value of the first parameter with the given parname. Ignore case when matching.

Parameters:parname – parameter name
Return type:parameter value
fit()

Do a fit of the model parameters using the “onion-peeling” method:

  • First fit the outside shell model using the outer annulus spectrum
  • Freeze the model parameters for the outside shell
  • Fit the next inward shell / annulus and freeze those parameters
  • Repeat until all datasets have been fit and all shell parameters determined.
  • Return model parameters to original thawed/frozen status
Return type:None
freeze(par)

Apply freeze command to specified parameter for each dataset.

Parameters:par – parameter specifier in format <model_type>.<par_name>
Return type:None
get_density()

Get electron density (cm^-3) for each shell using the standard definition of normalization for Xspec thermal models:

n_e = sqrt(norm * 4*pi * DA^2 * 1e14 * (1+z)^2 / volume * ne_nh_ratio))

norm        = model normalization from sherpa fit
DA          = angular size distance (cm)
volume      = volume (cm^3)
ne_nh_ratio = 1.18

Note that the model components for each volume element (intersection of the annular cylinder a with the spherical shell s) are multiplied by a volume normalization:

vol_norm[s,a] = volume[s,a] / v_sphere
v_sphere = volume of sphere enclosing outer annulus

With this convention the volume used in calculating the electron density is simply v_sphere.

Return type:numpy array of densities (cm^-3) corresponding to shells
get_par(par)

Get array of parameter values for datasets.

Parameters:
  • par – parameter specifier in format <model_type>.<par_name>
  • val – parameter value
Return type:

numpy array of parameter value ordered by dataset

ignore(*args)

Apply Sherpa ignore command to each dataset.

linear_scale(*args, **kwargs)
load_pha(specfile, annulus)

Load a pha file and add to the datasets for stacked analysis.

Parameters:
  • specfile – extracted source PHA/PI spectrum file
  • annulus – annulus for spectrum file
log_scale(*args, **kwargs)
n_datasets

Return the number of datasets :rtype: int

notice(*args)

Apply Sherpa notice command to each dataset.

plot_arf(*args, **kwargs)
plot_bkg(*args, **kwargs)
plot_bkg_chisqr(*args, **kwargs)
plot_bkg_delchi(*args, **kwargs)
plot_bkg_fit(*args, **kwargs)
plot_bkg_fit_delchi(*args, **kwargs)
plot_bkg_fit_resid(*args, **kwargs)
plot_bkg_model(*args, **kwargs)
plot_bkg_ratio(*args, **kwargs)
plot_bkg_resid(*args, **kwargs)
plot_bkg_source(*args, **kwargs)
plot_bkg_unconvolved(*args, **kwargs)
plot_chisqr(*args, **kwargs)
plot_data(*args, **kwargs)
plot_delchi(*args, **kwargs)
plot_fit(*args, **kwargs)
plot_fit_delchi(*args, **kwargs)
plot_fit_resid(*args, **kwargs)
plot_model(*args, **kwargs)
plot_order(*args, **kwargs)
plot_psf(*args, **kwargs)
plot_ratio(*args, **kwargs)
plot_resid(*args, **kwargs)
plot_source(*args, **kwargs)
print_window(*args, **kwargs)

Print window for each dataset.

Parameters:
  • args – list arguments to pass to print_window
  • kwargs – named (keyword) arguments to pass to print_window
Return type:

None

redshift

Source redshift

set_bkg_model(bkgmodel)

Create a source model for each dataset. A dataset is associated with a specific extraction annulus.

Parameters:bkgmodel – string expression defining background model
Return type:None
set_par(par, val)

Set parameter value for each dataset.

Parameters:
  • par – parameter specifier in format <model_type>.<par_name>
  • val – parameter value
Return type:

None

set_source(srcmodel='xsphabs*xsapec')

Create a source model for each dataset. A dataset is associated with a specific extraction annulus.

Parameters:srcmodel – string expression defining source model
Return type:None
subtract(*args)

Subtract background from each dataset

thaw(par)

Apply thaw command to specified parameter for each dataset.

Parameters:par – parameter specifier in format <model_type>.<par_name>
Return type:None

Table Of Contents

Previous topic

Deproject

Next topic

specstack