autogalaxy.profiles.geometry_profiles.SphProfile#
- class SphProfile[source]#
Bases:
GeometryProfileA spherical profile, which describes profiles with y and x centre Cartesian coordinates.
Methods
Convert a grid of angles, defined in degrees counter-clockwise from the positive x-axis, to a grid of angles between the input angles and the profile.
hasReturns True if any attribute of this profile is an instance of the input class cls, else False.
Convert a grid of (y, x) coordinates, to their radial distances from the profile centre (e.g. :math: r = sqrt(x**2 + y**2)).
Transform a grid of (y,x) coordinates from the reference frame of the profile to the original observer reference frame.
Transform a grid of (y,x) coordinates to the reference frame of the profile.
- radial_grid_from(grid, xp=<module 'numpy' from '/home/docs/checkouts/readthedocs.org/user_builds/pyautogalaxy/envs/latest/lib/python3.11/site-packages/numpy/__init__.py'>, **kwargs)[source]#
Convert a grid of (y, x) coordinates, to their radial distances from the profile centre (e.g. :math: r = sqrt(x**2 + y**2)).
- Parameters:
grid (
Union[ndarray,Grid2D,Grid2DIrregular]) – The grid of (y, x) coordinates which are converted to radial distances.
- angle_to_profile_grid_from(grid_angles, xp=<module 'numpy' from '/home/docs/checkouts/readthedocs.org/user_builds/pyautogalaxy/envs/latest/lib/python3.11/site-packages/numpy/__init__.py'>, **kwargs)[source]#
Convert a grid of angles, defined in degrees counter-clockwise from the positive x-axis, to a grid of angles between the input angles and the profile.
- Parameters:
grid_angles (
ndarray) – The angle theta counter-clockwise from the positive x-axis to each coordinate in radians.
- transformed_to_reference_frame_grid_from(grid, xp=<module 'numpy' from '/home/docs/checkouts/readthedocs.org/user_builds/pyautogalaxy/envs/latest/lib/python3.11/site-packages/numpy/__init__.py'>, **kwargs)[source]#
Transform a grid of (y,x) coordinates to the reference frame of the profile.
This performs a translation to the profile’s centre.
- Parameters:
grid – The (y, x) coordinates in the original reference frame of the grid.
- transformed_from_reference_frame_grid_from(grid, xp=<module 'numpy' from '/home/docs/checkouts/readthedocs.org/user_builds/pyautogalaxy/envs/latest/lib/python3.11/site-packages/numpy/__init__.py'>, **kwargs)[source]#
Transform a grid of (y,x) coordinates from the reference frame of the profile to the original observer reference frame.
This performs a translation from the profile’s centre.
- Parameters:
grid – The (y, x) coordinates in the reference frame of the profile.