edges_analysis.beams.sky_convolution_generator¶
- edges_analysis.beams.sky_convolution_generator(lsts: ~numpy.ndarray, ground_loss_file: str, beam: ~edges_analysis.beams.Beam, sky_model: ~edges_analysis.sky_models.SkyModel, index_model: ~edges_analysis.sky_models.IndexModel, normalize_beam: bool, beam_smoothing: bool, smoothing_model: ~edges_cal.modelling.Model, location: ~astropy.coordinates.earth.EarthLocation = <EarthLocation (-2553239.64058645, 5097473.27470581, -2850021.53546025) m>, ref_time: ~astropy.time.core.Time = <Time object: scale='utc' format='isot' value=2014-01-01T09:39:42.000>, interp_kind: ~typing.Literal['linear', 'nearest', 'slinear', 'cubic', 'quintic', 'pchip', 'spline', 'sphere-spline'] = 'sphere-spline', lst_progress: bool = True, freq_progress: bool = True, ref_freq_idx: int = 0, use_astropy_azel: bool = True)[source]¶
Iterate through given LSTs and generate a beam*sky product at each freq and LST.
This is a generator, so it will yield a single item at a time (to save on memory).
- Parameters:
lsts – The LSTs at which to evaluate the convolution.
ground_loss_file – A path to a file containing ground loss information.
beam – The beam to convolve.
sky_model – The sky model to convolve
index_model – The spectral index model of the sky model.
normalize_beam – Whether to ensure the beam is properly normalised.
beam_interpolation – Whether to smooth over freq axis
interp_kind – The kind of interpolation to use for the beam. “spline” uses
scipy.interpolate.RectBivariateSpline
and “sphere-spline” usesscipy.interpolate.RectSphereBivariateSpline
. All other options usescipy.interpolate.RegularGridInterpolator
. with the given kind asmethod
.use_astropy_azel – Whether to use the astropy coordinate system for azimuth and elevation. If False, compute the az/el using Alan’s method.
- Yields:
i – The LST enumerator
j – The frequency enumerator
mean_conv_temp – The mean temperature after multiplying by the beam (above the horizon)
conv_temp – An array containing the temperature after multiuplying by the beam in each pixel above the horizon.
sky – An array containing the sky temperature in pixel above the horizon.
beam – An array containing the interpolatedbeam in pixels above the horizon
time – The local time at each LST.
n_pixels – The total number of pixels that are not masked.
Examples
Use this function as follows:
>>> for i, j, mean_t, conv_t, sky, bm, time, npix in sky_convolution_generator(): >>> print(conv_t)