Schwarzschild Embedding Module¶
Class for Utility functions for Schwarzschild Embedding surface to implement gravitational lensing:
-
class
einsteinpy.hypersurface.schwarzschildembedding.
SchwarzschildEmbedding
(M)¶ Class for Utility functions for Schwarzschild Embedding surface to implement gravitational lensing
-
input_units
¶ list – list of input units of M
-
units_list
¶ list – customized units to handle values of M and render plots within grid range
-
r_init
¶ ~astropy.units.m
Constructor Initialize mass and embedding initial radial coordinate in appropiate units in order to render the plots of the surface in finite grid. The initial r is taken to be just greater than schwarzschild radius but it is important to note that the embedding breaks at r < 9m/4.
Parameters: M (kg) – Mass of the body -
gradient
(r)¶ Calculate gradient of Z coordinate w.r.t r to update the value of r and thereby get value of spherical radial coordinate R.
Parameters: r (float) – schwarzschild coordinate at which gradient is supposed to be obtained Returns: gradient of Z w.r.t r at the point r (passed as argument) Return type: float
-
radial_coord
(r)¶ Returns spherical radial coordinate (of the embedding) from given schwarzschild coordinate.
Parameters: r (float) – Returns: spherical radial coordinate of the 3d embedding Return type: float
-
get_values
(alpha)¶ Obtain the Z coordinate values and corrosponding R values for range of r as 9m/4 < r < 9m.
Parameters: alpha (float) – scaling factor to obtain the step size for incrementing r Returns: (list, list) : values of R (x_axis) and Z (y_axis) Return type: tuple
-
get_values_surface
(alpha)¶ Obtain the same values as of the get_values function but reshapes them to obtain values for all points on the solid of revolution about Z axis (as the embedding is symmetric in angular coordinates).
Parameters: alpha (float) – scaling factor to obtain the step size for incrementing r Returns: (~numpy.array of X, ~numpy.array of Y, ~numpy.array of Z) values in cartesian coordinates obtained after applying solid of revolution Return type: tuple
-
plot_hypersurface
(plot_type='wireframe', alpha=100)¶ Plots the surface thus obtained for the embedding.
Parameters:
-
show
()¶ Show the plot made by plot_hypersurface()
-