Skip to content

Commit

Permalink
Fix doc typos
Browse files Browse the repository at this point in the history
  • Loading branch information
dominic-chang committed Oct 13, 2024
1 parent 0adc2b3 commit 4db374d
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 50 deletions.
5 changes: 4 additions & 1 deletion docs/src/kerr_geodesic_summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ The Hamilton-Jacobi Equations then reduce to four first order differential equat
\end{align}
```
where we have defined the Mino time by its relationship to the affine parameter;
$$d\tau=d\tilde\tau/\Sigma.$$

```math
d\tau=d\tilde\tau/\Sigma.
```

Equations (15)-(18) define a 'Kepler-like' problem for photons in the Kerr spacetime.
The Mino time here acts similar to the Keplerian coordinate time in that problem, and can be expressed either in terms of $r$ or $\theta$ using equations (15) and (16);
Expand Down
4 changes: 2 additions & 2 deletions examples/coordinate-example.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ curr_theme = Theme(
set_theme!(merge!(curr_theme, theme_latexfonts()))

# We will use a 0.99 spin Kerr black hole viewed by an asymptotic observer at an inclination angle of θo=π/4.
# A region spanned by radii between the horizon and 10M at varying inclinations will be raytraced onto the 20Mx20M
# A region spanned by radii between the horizon and 10M at varying inclinations will be raytraced onto the 15x15
# screen of the observer.


Expand All @@ -47,7 +47,7 @@ axes_list = [
]


# Initialize Camera and Pre-Allocate Memory for data to be plotted
# Initialize Camera and pre-allocate memory for data to be plotted
coordinates = (zeros(sze, sze) for _ in 1:3)
camera = Krang.SlowLightIntensityCamera(metric, θo, -ρmax, ρmax, -ρmax, ρmax, sze);
colormaps = (:afmhot, :afmhot, :hsv)
Expand Down
8 changes: 4 additions & 4 deletions notebook_examples/coordinate-example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"cell_type": "markdown",
"source": [
"We will use a 0.99 spin Kerr black hole viewed by an asymptotic observer at an inclination angle of θo=π/4.\n",
"A region spanned by radii between the horizon and 20M at varying inclinations will be raytraced onto the 20Mx20M\n",
"A region spanned by radii between the horizon and 10M at varying inclinations will be raytraced onto the 15x15\n",
"screen of the observer."
],
"metadata": {}
Expand Down Expand Up @@ -110,7 +110,7 @@
{
"cell_type": "markdown",
"source": [
"Initialize Camera and Pre-Allocate Memory for data to be plotted"
"Initialize Camera and pre-allocate memory for data to be plotted"
],
"metadata": {}
},
Expand All @@ -128,7 +128,7 @@
"cell_type": "code",
"source": [
"coordinates = (zeros(sze, sze) for _ in 1:3)\n",
"camera = Krang.SlowLightIntensityCamera(metric, θo, -ρmax, ρmax, -ρmax, ρmax, sze, A=Matrix);\n",
"camera = Krang.SlowLightIntensityCamera(metric, θo, -ρmax, ρmax, -ρmax, ρmax, sze);\n",
"colormaps = (:afmhot, :afmhot, :hsv)\n",
"colorrange = ((-20, 20), (0, rmax), (0, 2π))"
],
Expand Down Expand Up @@ -264,7 +264,7 @@
"```julia\n",
"using CUDA\n",
"\n",
"rendered_scene = coordinate_point.(CuArray(camera.screen.pixels), Ref(geometry))\n",
"rendered_scene = Array(coordinate_point.(CuArray(camera.screen.pixels), Ref(geometry)))\n",
"```"
],
"metadata": {}
Expand Down
2 changes: 1 addition & 1 deletion notebook_examples/custom-material-example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
{
"output_type": "execute_result",
"data": {
"text/plain": "(Krang.Mesh{Krang.ConeGeometry{Float64, Nothing}, Main.var\"##131077\".ZAMORedshifts{Float64}}(Krang.ConeGeometry{Float64, Nothing}(1.3089969389957472, nothing), Main.var\"##131077\".ZAMORedshifts{Float64}(1, 1.141067359796659, 10.0)),)"
"text/plain": "(Krang.Mesh{Krang.ConeGeometry{Float64, Nothing}, Main.var\"##131431\".ZAMORedshifts{Float64}}(Krang.ConeGeometry{Float64, Nothing}(1.3089969389957472, nothing), Main.var\"##131431\".ZAMORedshifts{Float64}(1, 1.141067359796659, 10.0)),)"
},
"metadata": {},
"execution_count": 5
Expand Down
65 changes: 25 additions & 40 deletions notebook_examples/mino-time-example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,39 +11,44 @@
"cell_type": "markdown",
"source": [
"In this example, we will raytrace the region around a Kerr black hole as seen by an observer stationed at infinity.\n",
"We will show the emission coordinates of the n=0 (direct) and n=1 (indirect) photons as they are emitted from the\n",
"source, at a fixed inclination angle from the black hole's spin axis.\n",
"We will return the coordinates associated with a ray by marching along the ray's Mino time parameter from the assymptotic observer.\n",
"\n",
"First, let's import Krang and CairoMakie for plotting."
],
"metadata": {}
},
{
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": "true"
},
"metadata": {},
"execution_count": 1
}
],
"outputs": [],
"cell_type": "code",
"source": [
"using Krang\n",
"import GLMakie as GLMk\n",
"GLMk.Makie.inline!(true)"
"GLMk.Makie.inline!(true)\n",
"\n",
"curr_theme = GLMk.Theme(# Makie theme\n",
" fontsize=20,\n",
" Axis=(\n",
" xticksvisible=false,\n",
" xticklabelsvisible=false,\n",
" yticksvisible=false,\n",
" yticklabelsvisible=false,\n",
" leftspinevisible=false,\n",
" rightspinevisible=false,\n",
" topspinevisible=false,\n",
" bottomspinevisible=false,\n",
" titlefontsize=30,\n",
" ),\n",
")\n",
"\n",
"GLMk.set_theme!(GLMk.merge(curr_theme, GLMk.theme_latexfonts()))"
],
"metadata": {},
"execution_count": 1
},
{
"cell_type": "markdown",
"source": [
"We will use a 0.99 spin Kerr black hole viewed by an asymptotic observer at an inclination angle of θo=π/4.\n",
"A region spanned by radii between the horizon and 20M at varying inclinations will be raytraced onto the 20Mx20M\n",
"screen of the observer."
"We will use a 0.99 spin Kerr black hole viewed by an asymptotic observer at an inclination angle of θo=π/4."
],
"metadata": {}
},
Expand All @@ -54,8 +59,6 @@
"metric = Krang.Kerr(0.99); # Kerr spacetime with 0.99 spin\n",
"θo = 85 * π / 180; # Observer inclination angle with respect to spin axis\n",
"sze = 200; # Number of pixels along each axis of the screen\n",
"rmin = Krang.horizon(metric); # Minimal radius to raytrace\n",
"rmax = 10; # Maximal radius to raytrace\n",
"ρmax = 5; # Size of the screen"
],
"metadata": {},
Expand All @@ -66,7 +69,7 @@
"source": [
"We will define a camera with the above parameters.\n",
"The SlowLightIntensityCamera pre-calculates information about the spacetime and the observer's screen to speed up the\n",
"raytracing for slowlight applications."
"raytracing for slow light applications."
],
"metadata": {}
},
Expand All @@ -82,7 +85,7 @@
{
"cell_type": "markdown",
"source": [
"Let us now create a figure to plot the emission coordinates on,"
"Let us now create a figure to plot the emission coordinates on."
],
"metadata": {}
},
Expand All @@ -99,23 +102,6 @@
],
"cell_type": "code",
"source": [
"curr_theme = GLMk.Theme(# Makie theme\n",
" fontsize=20,\n",
" Axis=(\n",
" xticksvisible=false,\n",
" xticklabelsvisible=false,\n",
" yticksvisible=false,\n",
" yticklabelsvisible=false,\n",
" leftspinevisible=false,\n",
" rightspinevisible=false,\n",
" topspinevisible=false,\n",
" bottomspinevisible=false,\n",
" titlefontsize=30,\n",
" ),\n",
")\n",
"\n",
"GLMk.set_theme!(GLMk.merge(curr_theme, GLMk.theme_latexfonts()))\n",
"\n",
"fig = GLMk.Figure(resolution=(500, 600));"
],
"metadata": {},
Expand All @@ -124,8 +110,7 @@
{
"cell_type": "markdown",
"source": [
"and use this figure make an animation by looping over the inclination angle θs.\n",
"This loop will plot the emission coordinates for each θs."
"We will create a loop to plot the emission coordinates for each θs."
],
"metadata": {}
},
Expand Down Expand Up @@ -155,7 +140,7 @@
" data = (time, radius, inclination, azimuth)\n",
" titles = (GLMk.L\"\\text{Regularized Time }(t_s)\", GLMk.L\"\\text{Radius }(r_s)\", GLMk.L\"\\text{Inclination }(\\theta_s)\", GLMk.L\"\\text{Azimuth } (\\phi_s)\")\n",
" colormaps = (:afmhot, :afmhot, :afmhot, :hsv)\n",
" colorrange = ((-20, 20), (0, rmax), (0,π), (0, 2π))\n",
" colorrange = ((-20, 20), (0, 10.0), (0,π), (0, 2π))\n",
" indices = ((1,1), ())\n",
"\n",
" for i in 1:4\n",
Expand Down
2 changes: 1 addition & 1 deletion notebook_examples/neural-net-example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"WARNING: using ComponentArrays.Axis in module ##131080 conflicts with an existing identifier.\n"
"WARNING: using ComponentArrays.Axis in module ##131434 conflicts with an existing identifier.\n"
]
}
],
Expand Down
2 changes: 1 addition & 1 deletion notebook_examples/raytracing-mesh-example.ipynb

Large diffs are not rendered by default.

0 comments on commit 4db374d

Please sign in to comment.