snsim.nb_fun ============ .. py:module:: snsim.nb_fun .. autoapi-nested-parse:: This module contains functions with numba decorator to speed up the simulation. Functions --------- .. autoapisummary:: snsim.nb_fun.sine_interp snsim.nb_fun.R_base snsim.nb_fun.new_coord_on_fields snsim.nb_fun.radec_to_cart_2d snsim.nb_fun.radec_to_cart Module Contents --------------- .. py:function:: sine_interp(x_new, fun_x, fun_y) Return the sinus interpolation of a function at x. :param x_new: New x where evaluate the function. :type x_new: float :param fun_x: Existing function x. :type fun_x: list(float) :param fun_y: Existing function y. :type fun_y: list(float) :returns: The sinus interpolation value of f at x_new. :rtype: float .. py:function:: 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. :rtype: numpy.ndarray(float) .. py:function:: 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. :rtype: numpy.ndarray(float, size = (2, ?)) .. py:function:: radec_to_cart_2d(ra, dec) Compute carthesian vector for given RA Dec coordinates. :param ra: Right Ascension. :type ra: numpy.ndarray :param dec: Declinaison. :type dec: numpy.ndarray :returns: Carthesian coordinates corresponding to RA Dec coordinates. :rtype: numpy.ndarray(float) .. py:function:: radec_to_cart(ra, dec) Compute carthesian vector for given RA Dec coordinates. :param ra: Right Ascension. :type ra: float :param dec: Declinaison. :type dec: float :returns: Carthesian coordinates corresponding to RA Dec coordinates. :rtype: numpy.array(float)