exosim.utils.grids#

Functions#

wl_grid(wl_min, wl_max, R[, return_bin_width])

It returns the wavelength log-grid in microns

time_grid(time_min, time_max[, low_frequencies_resolution])

It returns the time grid in hours

Module Contents#

wl_grid(wl_min, wl_max, R, return_bin_width=False)[source]#

It returns the wavelength log-grid in microns

The wavelength at the center of the spectral bins is defined as

\[\lambda_c = \frac{1}{2} (\lambda_j + \lambda_{j+1} )\]

where \(\lambda_j\) is the wavelength at the bin edge defined by the recursive relation, and \(R\) is the logbin_resolution defined by the user.

\[\lambda_{j+1} = \lambda_{j} \left( 1 + \frac{1}{R} \right)\]

And, given the maximum and minimum wavelengths, provided by the user, the number of bins is

\[n_{bins} = \frac{\log \left( \frac{\lambda_{max}}{\lambda_{min}} \right) } {\log \left( 1 + \frac{1}{R}\right)} + 1\]
Parameters:
  • wl_min (Quantity or float.) – minimum wavelength sampled. If no units are attached is considered as expressed in um

  • wl_max (Quantity or float.) – maximum wavelength sampled. If no units are attached is considered as expressed in um

  • R (int) – spectral resolving power

  • return_bin_width (bool) – if True returns also the bin width. Default is False.

Returns:

time_grid(time_min, time_max, low_frequencies_resolution=None)[source]#

It returns the time grid in hours

Parameters:
  • time_min (Quantity or float.) – minimum time sampled. If no units are attached is considered as expressed in hours.

  • time_max (Quantity or float.) – maximum time sampled. If no units are attached is considered as expressed in hours.

  • low_frequencies_resolution (Quantity, float or None) – time sampling interval. If no units are attached is considered as expressed in hours. If None, a single time point at time_min is returned.

Returns:

time grid

Return type:

Quantity