Skip to content

Commit

Permalink
Add assets folder and update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Anna Tartaglia committed Oct 24, 2024
1 parent ea7ed2c commit 53c5d1b
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 13 deletions.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
4 changes: 2 additions & 2 deletions docs/src/benchmarks.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The Julia implementation of the EHT scattering framework takes advantage of Juli

With Julia's speed improvements, the `ScatteringOptics.jl` scattering kernel loads 100 times faster than the `eht-imaging` kernel. The scattering kernel may be called upon to compute visibilities for a given sample of Fourier space points. In these computations, `ScatteringOptics.jl` also exhibits speed improvements up to 100 times over the three included models (Dipole, Boxcar, and Von Mises; see [Use Non-default Models](@ref) for more info) and varying observing wavelengths. These computation runtimes are compared over a range of sample in the plots below.

<img src="images/speed_dipole.png" width="300"/> <img src="images/speed_boxcar.png" width="300"/> <img src="images/speed_vonmises.png" width="300"/>
<img src="assets/speed_dipole.png" width="300"/> <img src="assets/speed_boxcar.png" width="300"/> <img src="assets/speed_vonmises.png" width="300"/>


With this significant speed up, the Julia implementation allows for the joint modeling of scattering parameters and reconstructed images in self-consistent way.
Expand All @@ -17,5 +17,5 @@ With this significant speed up, the Julia implementation allows for the joint mo

Our scattering kernel produces visibilities that are consistent with those computed by `eht-imaging` across all 3 kernel models as well as the range of standard observing wavelengths in radio astronomy. Below, we demonstrate this by plotting the Dipole kernel over the Fourier space major and minor axis for both the Julia and Python implementations in one plot per observing wavelength. The lines completely overlap, indicating complete consistency in results. All fractional errors between the two implementations range on the order of $10^{-6}$ and $10^{-7}$ (Figure \ref{kernelerrors}), which is well under scattering kernel uncertainty limits.

<img src="images/kernel87.png" width="400"/> <img src="images/kernel36.png" width="400"/>
<img src="assets/kernel87.png" width="400"/> <img src="assets/kernel36.png" width="400"/>

14 changes: 7 additions & 7 deletions docs/src/tutorials/diffractive.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ CurrentModule = ScatteringOptics
This page describes how to simulate diffractive scattering.

## Loading your image
Here, we use an example image in [`eht-imaging`](https://github.com/achael/eht-imaging). Data can be downloaded from [here](data/jason_mad_eofn.fits). This is a general relativistic magnetohydrodynamic (GRMHD) model of the magnetic arrestic disk originally from [Dexter et al. 2020](https://ui.adsabs.harvard.edu/abs/2020MNRAS.494.4168D/abstract).
Here, we use an example image in [`eht-imaging`](https://github.com/achael/eht-imaging). Data can be downloaded from [here](docs/src/assets/jason_mad_eofn.fits). This is a general relativistic magnetohydrodynamic (GRMHD) model of the magnetic arrestic disk originally from [Dexter et al. 2020](https://ui.adsabs.harvard.edu/abs/2020MNRAS.494.4168D/abstract).

```@example 1
using CairoMakie
Expand All @@ -17,7 +17,7 @@ using VLBISkyModels
# using Comrade
# Load a image model from an image FITS file
im = load_fits("data/jason_mad_eofn.fits", IntensityMap)
im = load_fits("docs/src/assets/jason_mad_eofn.fits", IntensityMap)
# Plot source image
imageviz(im, size=(600, 500), colormap=:afmhot)
Expand Down Expand Up @@ -124,20 +124,20 @@ The output images may be saved to fits files. Here, we save the images generated

```@example 1
# Ensemble average image of provided EHT fits file
save_fits("data/im_ea.fits", im_ea)
save_fits("docs/src/assets/im_ea.fits", im_ea)
# Gaussian model and its scattered ensemble average image
save_fits("data/im_g.fits", im_g)
save_fits("data/im_gea.fits", im_gea)
save_fits("docs/src/assets/im_g.fits", im_g)
save_fits("docs/src/assets/im_gea.fits", im_gea)
# Scattering kernel
save_fits("data/im_skm.fits", im_skm)
save_fits("docs/src/assets/im_skm.fits", im_skm)
```

We also save the kernel visibilities calculated in the tutorial.
```@example 1
using HDF5
# Save the computed kernel data
h5open("output_data.h5", "w") do file
h5open("docs/src/assets/kernel.h5", "w") do file
file["u"] = collect(u)
file["vis"] = vis
end
Expand Down
8 changes: 4 additions & 4 deletions docs/src/tutorials/refractive.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ CurrentModule = ScatteringOptics
Another feature of `ScatteringOptics.jl` is simulating refractive scattering. This page gives a tutorial to simulate refractive scattering effects.

## Loading your image
Again, we use an example image in [`eht-imaging`](https://github.com/achael/eht-imaging). Data can be downloaded from [here](data/jason_mad_eofn.fits). This is a general relativistic magnetohydrodynamic (GRMHD) model of the magnetic arrestic disk originally from [Dexter et al. 2020](https://ui.adsabs.harvard.edu/abs/2020MNRAS.494.4168D/abstract).
Again, we use an example image in [`eht-imaging`](https://github.com/achael/eht-imaging). Data can be downloaded from [here](docs/src/assets/jason_mad_eofn.fits). This is a general relativistic magnetohydrodynamic (GRMHD) model of the magnetic arrestic disk originally from [Dexter et al. 2020](https://ui.adsabs.harvard.edu/abs/2020MNRAS.494.4168D/abstract).

```@example 1
using CairoMakie
Expand All @@ -16,7 +16,7 @@ using VLBISkyModels
# using Comrade
# Load a image model from an image FITS file
im = load_fits("data/jason_mad_eofn.fits", IntensityMap)
im = load_fits("docs/src/assets/jason_mad_eofn.fits", IntensityMap)
# Frequency of the image
νref = metadata(im).frequency
Expand Down Expand Up @@ -112,7 +112,7 @@ The output images may be saved to fits files. Here, we save the images generated

```@example 1
# Average image of provided EHT fits file
save_fits("data/im_a.fits", im_a)
save_fits("docs/src/assets/im_a.fits", im_a)
# Scattered average image of Gaussian model
save_fits("data/im_ga.fits", im_ga)
save_fits("docs/src/assets/im_ga.fits", im_ga)
```

0 comments on commit 53c5d1b

Please sign in to comment.