Skip to content

Commit

Permalink
fix typo in tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
DSilva27 committed Sep 16, 2024
1 parent cfc7628 commit 8a105bd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions docs/examples/simulate-relion-dataset.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -115,17 +115,19 @@
"\n",
" # Pose\n",
" # ... instantiate rotations\n",
" rotation = SO3.sample_uniform(key)\n",
"\n",
" key, subkey = jax.random.split(key) # split the key to use for the next random number\n",
"\n",
" rotation = SO3.sample_uniform(subkey)\n",
" key, subkey = jax.random.split(key) # do this everytime you use a key!!\n",
"\n",
" # ... now in-plane translation\n",
" ny, nx = instrument_config.shape\n",
" in_plane_offset_in_angstroms = (\n",
" jax.random.uniform(subkey, (2,), minval=-0.2, maxval=0.2)\n",
" * jnp.asarray((nx, ny))\n",
" * instrument_config.pixel_size\n",
" )\n",
" key, subkey = jax.random.split(key) # do this everytime you use a key!!\n",
"\n",
" # ... convert 2D in-plane translation to 3D, setting the out-of-plane translation to\n",
" # zero\n",
Expand All @@ -145,6 +147,7 @@
" key, subkey = jax.random.split(key)\n",
"\n",
" phase_shift = jax.random.uniform(subkey, (), minval=0, maxval=0)\n",
" # no more random numbers needed\n",
"\n",
" # now generate your non-random values\n",
" spherical_aberration_in_mm = 2.7\n",
Expand Down

0 comments on commit 8a105bd

Please sign in to comment.