get_bkg_scale¶
-
sherpa.astro.ui.get_bkg_scale(id=None)¶ Return the background scaling factor for a PHA data set.
Return the factor applied to the background component to scale it to match it to the source (either when subtracting the background, or fitting it simultaneously).
Parameters: id (int or str, optional) – The identifier for the data set to use. If not given then the default identifier is used, as returned by get_default_id. Returns: ratio – The scaling factor. The result can vary per channel, in which case an array is returned. Return type: number or array See also
get_areascal()- Return the fractional area factor of a PHA data set.
get_backscal()- Return the area scaling factor for a PHA data set.
set_backscal()- Change the area scaling of a PHA data set.
set_full_model()- Define the convolved model expression for a data set.
set_bkg_full_model()- Define the convolved background model expression for a PHA data set.
Notes
The scale factor:
exp_src * bscale_src / (exp_bgnd * bscale_bgnd)
where
exp_xandbscale_xare the exposure and BACKSCAL values for the source (x=src) and background (x=bgnd) regions, respectively.Examples
>>> get_bkg_scale('pi') 0.034514770047217924