Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/tutorials/quickstart.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -468,11 +468,13 @@
"# Compare bin header\n",
"assert original_segy.binary_header == roundtrip_segy.binary_header\n",
"\n",
"# Compare 100 random trace headers and traces\n",
"# Compare 100 random trace headers and samples.\n",
"# IBM float32 cannot preserve denormals through IEEE decode/encode.\n",
"rng = np.random.default_rng()\n",
"rand_indices = rng.integers(low=0, high=original_segy.num_traces, size=100)\n",
"for idx in rand_indices:\n",
" np.testing.assert_equal(original_segy.trace[idx], roundtrip_segy.trace[idx])\n",
" np.testing.assert_equal(original_segy.header[idx], roundtrip_segy.header[idx])\n",
" np.testing.assert_allclose(original_segy.sample[idx], roundtrip_segy.sample[idx], rtol=0, atol=1e-37)\n",
"\n",
"print(\"Files identical!\")"
]
Expand Down
Loading