Skip to content

Commit 104d5f8

Browse files
committed
fixup! Use extension 1 in rotation calculations
1 parent 3d4f42a commit 104d5f8

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

python/examples/make-rotated-rev2.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ def product(f):
99

1010
# this program turns the rev1 file into rev2 file with CDP values set to
1111
# different set of cdp-x and cdp-y coordinates in standard and ext1 headers.
12-
# values are taken from make-rotated-copies.py script
12+
# The formulas are taken from make-rotated-copies.py script
1313

1414
def main():
15-
if len(sys.argv) < 2:
15+
if len(sys.argv) != 3:
1616
sys.exit(
1717
"Usage: {} [source-file] [destination-file]".format(sys.argv[0]))
1818

@@ -45,13 +45,13 @@ def main():
4545
with segyio.open(dstfile, 'r+') as dst:
4646
for i, (x, y) in enumerate(product(src)):
4747
trh = dst.traceheader[i][0]
48-
# right
48+
# "right" rotation formula
4949
trh.cdp_x = y
5050
trh.cdp_y = 100 - x
5151
trh.co_scal = 1
5252

5353
trh = dst.traceheader[i][1]
54-
# left
54+
# "left" rotation formula
5555
trh.cdp_x = (100 - y) * 21
5656
trh.cdp_y = x * 21
5757

test-data/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ To recreate:
6060
File below is used to test revision 2 features and is created with:
6161
`python python/examples/make-rotated-rev2.py test-data/small.sgy test-data/rotated-small-rev2.sgy`
6262

63-
| File | Purpose |
64-
|------------------------|-------------------------------------------------------------------------- |
65-
| rotated-small-rev2.sgy | Revision 2 file with different values on standard and extension 1 levels. |
63+
| File | Purpose |
64+
|------------------------|--------------------------------------------------------------------------- |
65+
| rotated-small-rev2.sgy | Revision 2 file with different values on standard and extension 1 headers. |
6666

6767
## Dimensions sorting test files
6868

0 commit comments

Comments
 (0)