autogalaxy.profiles.geometry_profiles.SphProfile#

class SphProfile[source]#

Bases: GeometryProfile

A spherical profile, which describes profiles with y and x centre Cartesian coordinates.

Parameters

centre (Tuple[float, float]) – The (y,x) arc-second coordinates of the profile centre.

Methods

angle_to_profile_grid_from

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.

dict

A dictionary representation of the instance comprising a type field which contains the entire class path by which the type can be imported and constructor arguments.

from_dict

Instantiate an instance of a class from its dictionary representation.

from_json

Load the dictable object to a .json file, whereby all attributes are converted from the .json file's dictionary representation to create the instance of the object

has

Does this instance have an attribute which is of type cls?

output_to_json

Output the dictable object to a .json file, whereby all attributes are converted to a dictionary representation first.

radial_grid_from

Convert a grid of (y, x) coordinates, to their radial distances from the profile centre (e.g.

transformed_from_reference_frame_grid_from

Transform a grid of (y,x) coordinates from the reference frame of the profile to the original observer reference frame.

transformed_to_reference_frame_grid_from

Transform a grid of (y,x) coordinates to the reference frame of the profile.

radial_grid_from(grid)[source]#

Convert a grid of (y, x) coordinates, to their radial distances from the profile centre (e.g. :math: r = x**2 + y**2).

Parameters

grid (Union[ndarray, Grid2D, Grid2DIterate, Grid2DIrregular]) – The grid of (y, x) coordinates which are converted to radial distances.

Return type

ndarray

angle_to_profile_grid_from(grid_angles)[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.

Return type

Tuple[ndarray, ndarray]

transformed_to_reference_frame_grid_from(grid)[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)[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.