Skip to content

Commit a896afb

Browse files
committed
Renamed xspec_timeout to timeout for consistency with xspec naming.
1 parent b52852a commit a896afb

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

xga/sourcetools/density.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def _dens_setup(sources: Union[GalaxyCluster, ClusterSample], abund_table: str,
4343
conv_temp: Union[Quantity, Dict[str, Quantity]] = None,
4444
conv_outer_radius: Quantity = "r500", conv_inner_radius: Union[str, Quantity] = Quantity(0, 'arcsec'),
4545
num_cores: int = NUM_CORES, stacked_spectra: bool = False, telescope: Union[str, List[str]] = None,
46-
xspec_timeout: Quantity = Quantity(300, 's')) \
46+
timeout: Quantity = Quantity(300, 's')) \
4747
-> Tuple[Union[ClusterSample, List], Dict[str, List[Quantity]], Union[Dict[str, str], Dict[str, list]],
4848
Union[Dict[str, str], Dict[str, list]], List[str]]:
4949
"""
@@ -94,7 +94,7 @@ def _dens_setup(sources: Union[GalaxyCluster, ClusterSample], abund_table: str,
9494
instead use individual spectra for an ObsID. The default is False.
9595
:param int num_cores: The number of cores that the evselect call and XSPEC functions are allowed
9696
to use.
97-
:param Quantity xspec_timeout: How long xspec should run for before timing out.
97+
:param Quantity timeout: How long xspec should run for before timing out.
9898
:return: The source object(s)/sample that was passed in, a dictionary of an array of the
9999
calculated conversion factors to take the count-rate/volume to a number density of hydrogen
100100
for each telescope, the parsed obs_id variable, and the parsed inst variable.
@@ -226,7 +226,7 @@ def _dens_setup(sources: Union[GalaxyCluster, ClusterSample], abund_table: str,
226226
single_temp_apec(sources, conv_outer_radius, conv_inner_radius, abund_table=abund_table,
227227
group_spec=group_spec, min_counts=min_counts, min_sn=min_sn,
228228
over_sample=over_sample, num_cores=num_cores, stacked_spectra=stacked_spectra,
229-
telescope=telescope, timeout=xspec_timeout)
229+
telescope=telescope, timeout=timeout)
230230

231231
# Then we need to grab the temperatures and pass them through to the cluster conversion
232232
# factor calculator - this may well change as I intend to let cluster_cr_conv grab
@@ -393,7 +393,7 @@ def inv_abel_fitted_model(sources: Union[GalaxyCluster, ClusterSample],
393393
conv_inner_radius: Quantity = Quantity(0, 'arcsec'), inv_abel_method: str = None,
394394
num_cores: int = NUM_CORES, show_warn: bool = True, stacked_spectra: bool = False,
395395
telescope: Union[str, List[str]] = None,
396-
xspec_timeout: Quantity = Quantity(300, "s")) -> Dict[str, List[Union[GasDensity3D, None]]]:
396+
timeout: Quantity = Quantity(300, "s")) -> Dict[str, List[Union[GasDensity3D, None]]]:
397397
"""
398398
A count-rate-map-based galaxy cluster gas density calculation method where a surface brightness profile
399399
is fit with a model and an inverse abel transform is used to infer the 3D count-rate/volume
@@ -483,7 +483,7 @@ def inv_abel_fitted_model(sources: Union[GalaxyCluster, ClusterSample],
483483
instead use individual spectra for an ObsID. The default is False.
484484
:param str/List[str] telescope: Telescope(s) to produce density profiles from. Default is None, in which
485485
case density profiles will be produced from all telescopes associated with a source.
486-
:parma Quantity xspec_timeout: Timeout argument for xspec functions.
486+
:parma Quantity timeout: Timeout argument for xspec functions.
487487
:return: A dictionary of 3D gas density profile lists measured by this function - the keys are telescope
488488
names. The values are lists with one entry per source, even if the source in question doesn't have
489489
that telescope associated or the profile construction process failed.
@@ -494,7 +494,7 @@ def inv_abel_fitted_model(sources: Union[GalaxyCluster, ClusterSample],
494494
sources, conv_factors, obs_id, inst, telescope = _dens_setup(sources, abund_table, lo_en, hi_en, group_spec,
495495
min_counts, min_sn, over_sample, obs_id, inst,
496496
conv_temp, conv_outer_radius, conv_inner_radius,
497-
num_cores, stacked_spectra, telescope, xspec_timeout)
497+
num_cores, stacked_spectra, telescope, timeout)
498498

499499
# Calls the handy spectrum region setup function to make a predictable set of outer radius
500500
# values
@@ -647,7 +647,7 @@ def inv_abel_data(sources: Union[GalaxyCluster, ClusterSample], outer_radius: Un
647647
conv_outer_radius: Quantity = "r500", conv_inner_radius: Quantity = Quantity(0, 'arcsec'),
648648
num_cores: int = NUM_CORES, stacked_spectra: bool = False,
649649
telescope: Union[str, List[str]] = None,
650-
xspec_timeout: Quantity = Quantity(300, "s") ) -> Dict[str, List[Union[GasDensity3D, None]]]:
650+
timeout: Quantity = Quantity(300, "s") ) -> Dict[str, List[Union[GasDensity3D, None]]]:
651651
"""
652652
A count-rate-map-based galaxy cluster gas density calculation method where a surface brightness profile inverse
653653
abel transformed, thus inferring the 3D count-rate/volume profile. Then a conversion factor calculated from
@@ -753,7 +753,7 @@ def inv_abel_data(sources: Union[GalaxyCluster, ClusterSample], outer_radius: Un
753753
instead use individual spectra for an ObsID. The default is False.
754754
:param str/List[str] telescope: Telescope(s) to produce density profiles from. Default is None, in which
755755
case density profiles will be produced from all telescopes associated with a source.
756-
:parma Quantity xspec_timeout: Timeout argument for xspec functions.
756+
:parma Quantity timeout: Timeout argument for xspec functions.
757757
:return: A dictionary of 3D gas density profile lists measured by this function - the keys are telescope
758758
names. The values are lists with one entry per source, even if the source in question doesn't have
759759
that telescope associated or the profile construction process failed.
@@ -764,7 +764,7 @@ def inv_abel_data(sources: Union[GalaxyCluster, ClusterSample], outer_radius: Un
764764
sources, conv_factors, obs_id, inst, telescope = _dens_setup(sources, abund_table, lo_en, hi_en, group_spec,
765765
min_counts, min_sn, over_sample, obs_id, inst,
766766
conv_temp, conv_outer_radius, conv_inner_radius,
767-
num_cores, stacked_spectra, telescope, xspec_timeout)
767+
num_cores, stacked_spectra, telescope, timeout)
768768

769769
# Calls the handy spectrum region setup function to make a predictable set of outer radius values
770770
out_rads = region_setup(sources, outer_radius, Quantity(0, 'arcsec'), False, '')[-1]

0 commit comments

Comments
 (0)