Skip to content

Commit

Permalink
Refactor quickstart tutorial notebook (#234)
Browse files Browse the repository at this point in the history
Co-authored-by: Altay Sansal <[email protected]>
  • Loading branch information
tasansal and Altay Sansal authored Nov 20, 2024
1 parent 115eafc commit 6d00bfc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions docs/tutorials/creation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,7 @@
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.3"
"pygments_lexer": "ipython3"
}
},
"nbformat": 4,
Expand Down
4 changes: 3 additions & 1 deletion docs/tutorials/quickstart.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@
" binary_header_fields=[\n",
" HeaderField(name=\"sample_interval\", byte=17, format=\"int16\"),\n",
" HeaderField(name=\"samples_per_trace\", byte=21, format=\"int16\"),\n",
" HeaderField(name=\"data_sample_format\", byte=25, format=\"int16\"),\n",
" HeaderField(name=\"num_extended_text_headers\", byte=305, format=\"int16\"),\n",
" ],\n",
" trace_header_fields=[\n",
Expand Down Expand Up @@ -374,7 +375,8 @@
"binary_header = sgy.binary_header\n",
"\n",
"rng = default_rng()\n",
"indices = rng.integers(0, sgy.num_traces, size=5_000).tolist()\n",
"indices = rng.choice(sgy.num_traces, size=5_000, replace=False)\n",
"indices.sort()\n",
"\n",
"traces = sgy.trace[indices]"
]
Expand Down

0 comments on commit 6d00bfc

Please sign in to comment.