cabaret.Sources.from_arrays#
- classmethod Sources.from_arrays(ra: ndarray | list, dec: ndarray | list, fluxes: ndarray | list, units: str = 'deg', ra_rates: ndarray | list | None = None, dec_rates: ndarray | list | None = None) Sources[source]#
Create a Sources instance from separate RA and DEC arrays.
- Parameters:
ra (np.ndarray) – An array of shape (n,) containing the RA coordinates of the sources in deg.
dec (np.ndarray) – An array of shape (n,) containing the DEC coordinates of the sources in deg.
fluxes (np.ndarray) – An array of shape (n,) containing the fluxes of the sources. These should be of units photons/s/m².
units (str, optional) – Units for ra and dec, by default “deg”.
ra_rates (np.ndarray or list, optional) – RA motion rates in arcsec/s, shape (n,). Defaults to zeros.
dec_rates (np.ndarray or list, optional) – Dec motion rates in arcsec/s, shape (n,). Defaults to zeros.
- Returns:
A Sources instance.
- Return type: