Skip to content

How to consider coord_scalar #136

Answered by trhallam
khaled1240274 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, coordinate scaling is not handled by default and must be applied by the user.

Any trace header information must be stored as intergers which is why, if you have floating point precission coordinates you must apply a scaling factor. To scale your coordinates, apply the following

segy = xr.open_dataset(
    file_path, engine='sgy_engine', 
    dim_byte_fields={"iline": InlineLoc, "xline": XlineLoc}, 
    extra_byte_fields={"cdp_x": cdpxLoc, "cdp_y": cdpyLoc} 
)
# multiply by 100
segy.segysak.scale_coords(100)
# multiply by 0.01
# segy.segysak.scale_coords(-100)

The convention here is part of the SEG-Y standard and comes from how the coordinate scalar (also an integer) is represented in …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@khaled1240274
Comment options

Answer selected by khaled1240274
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants