yasfpy.numerics =============== .. py:module:: yasfpy.numerics .. autoapi-nested-parse:: Numerical helper routines and lookup-table generation. The :class:`~yasfpy.numerics.Numerics` class owns the numerical settings for a simulation (harmonic/truncation orders, sampling grids, lookup tables) and provides methods to generate the various precomputed tables needed by YASF. Classes ------- .. autoapisummary:: yasfpy.numerics.Numerics Module Contents --------------- .. py:class:: Numerics(lmax, sampling_points_number = np.array([100]), polar_angles = None, polar_weight_func = lambda x: x, azimuthal_angles = None, gpu = False, particle_distance_resolution=10.0, solver=None, coupling_backend = 'dense', coupling_tile_size = 64, coupling_near_field_radius = None) The `Numerics` class is used for numerical computations in the YASF (Yet Another Scattering Framework) library, providing methods for computing associated Legendre polynomials, translation tables, Fibonacci sphere points, and spherical unity vectors. .. py:attribute:: log .. py:attribute:: lmax .. py:attribute:: sampling_points_number .. py:attribute:: polar_angles :value: None .. py:attribute:: azimuthal_angles :value: None .. py:attribute:: gpu :value: False .. py:attribute:: particle_distance_resolution :value: 10.0 .. py:attribute:: solver :value: None .. py:attribute:: coupling_backend :value: 'dense' .. py:attribute:: coupling_tile_size :value: 64 .. py:attribute:: coupling_near_field_radius :value: None .. py:method:: compute_plm_coefficients() The function computes the coefficients for the associated Legendre polynomials. .. py:method:: compute_translation_table(force_compute=False) The function computes a translation table using Wigner 3j symbols and stores the results in a numpy array. .. py:method:: compute_fibonacci_sphere_points(n = 100) :staticmethod: Computes the points on a Fibonacci sphere using the given number of points. :param n: The number of points to be computed on the Fibonacci sphere. Defaults to 100. :type n: int, optional :returns: A tuple containing: - points (np.ndarray): The Cartesian points of the Fibonacci sphere. - theta (np.ndarray): The polar angles of the points on the Fibonacci sphere. - phi (np.ndarray): The azimuthal angles of the points on the Fibonacci sphere. :rtype: tuple (np.ndarray) .. py:method:: compute_spherical_unity_vectors() The function computes the spherical unity vectors e_r, e_theta, and e_phi based on the given polar and azimuthal angles.