snsim.nb_fun¶
This module contains functions with numba decorator to speed up the simulation.
Functions¶
|
Return the sinus interpolation of a function at x. |
|
Give rotation to RA := theta, DEC := phi. |
|
Compute new coordinates of an object in a list of fields frames. |
|
Compute carthesian vector for given RA Dec coordinates. |
|
Compute carthesian vector for given RA Dec coordinates. |
Module Contents¶
- snsim.nb_fun.sine_interp(x_new, fun_x, fun_y)¶
Return the sinus interpolation of a function at x.
- snsim.nb_fun.R_base(theta, phi, vec)¶
Give rotation to RA := theta, DEC := phi. :param theta: RA amplitude of the rotation :type theta: float :param phi: Dec amplitude of the rotation :type phi: float :param vec: Carthesian vector to rotate :type vec: numpy.ndarray(float)
- Returns:
Rotated vector.
- Return type:
- snsim.nb_fun.new_coord_on_fields(ra_dec, ra_dec_frame, new_radec)¶
Compute new coordinates of an object in a list of fields frames. :param ra_frame: Field Right Ascension. :type ra_frame: numpy.ndarray(float) :param dec_frame: Field Declinaison. :type dec_frame: numpy.ndarray(float) :param vec: The carthesian coordinates of the object. :type vec: numpy.ndarray(float, size = 3)
- Returns:
The new coordinates of the obect in each field frame.
- Return type:
numpy.ndarray(float, size = (2, ?))
- snsim.nb_fun.radec_to_cart_2d(ra, dec)¶
Compute carthesian vector for given RA Dec coordinates.
- Parameters:
ra (numpy.ndarray) – Right Ascension.
dec (numpy.ndarray) – Declinaison.
- Returns:
Carthesian coordinates corresponding to RA Dec coordinates.
- Return type: