arrange_teff#
-
VSPEC.helpers.arrange_teff(minteff:
astropy.units.Quantity
, maxteff:astropy.units.Quantity
)# Generate a list of effective temperature (Teff) values with steps of 100 K that fully encompass the specified range.
This function is useful for obtaining a list of Teff values to be used for binning spectra later on.
- Parameters:
minteff (astropy.units.Quantity) – The minimum Teff value required.
maxteff (astropy.units.Quantity) – The maximum Teff value required.
- Returns:
teffs – An array of Teff values, with steps of 100 K.
- Return type:
Notes
The function calculates the Teff values that fully encompass the specified range by rounding down the minimum value to the nearest multiple of 100 K and rounding up the maximum value to the nearest multiple of 100 K.
The np.arange function is then used to generate a sequence of Teff values with steps of 100 K, covering the entire range from the rounded-down minimum value to the rounded-up maximum value.
Examples
>>> minteff = 5000 * u.K >>> maxteff = 6000 * u.K >>> arrange_teff(minteff, maxteff) [5000, 5100, 5200, 5300, 5400, 5500, 5600, 5700, 5800, 5900, 6000]