Depreciated Writing SEG-Y
Warning
These methods have been depreciated in favour of an Xarray accessor method. Examples in this documentation have been updated to use the new method or consult the accessor reference.
segy_writer(seisnc, segyfile, trace_header_map=None, il_chunks=None, dimension=None, silent=False, use_text=False)
Convert siesnc format (NetCDF4) to SEGY.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
seisnc |
(Dataset, string)
|
The input SEISNC file either a path or the in memory xarray.Dataset |
required |
segyfile |
string
|
The output SEG-Y file |
required |
trace_header_map |
dict
|
Defaults to None. A dictionary of seisnc variables and byte locations. The variable will be written to the trace headers in the assigned byte location. By default CMP=23, cdp_x=181, cdp_y=185, iline=189, xline=193. |
None
|
il_chunks |
int
|
The size of data to work on - if you have memory limitations. Defaults to 10. This is primarily used for large 3D and ignored for 2D data. |
None
|
dimension |
str
|
Data dimension to output, defaults to 'twt' or 'depth' whichever is present |
None
|
silent |
bool
|
Turn off progress reporting. Defaults to False. |
False
|
use_text |
bool
|
Use the seisnc text for the EBCIDC output. This text usally comes from the loaded SEG-Y file and may not match the segysak SEG-Y output. Defaults to False and writes the default segysak EBCIDC |
False
|
Source code in segysak/segy/_segy_writer.py
Python | |
---|---|
740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 |
|
segy_freewriter(seisnc, segyfile, data_array='data', trace_header_map=None, use_text=False, dead_trace_key=None, vert_dimension='twt', chunk_spec=None, silent=False, **dim_kwargs)
Convert siesnc format (NetCDF4) to SEG-Y.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
seisnc |
(Dataset, string)
|
The input SEISNC file either a path or the in memory xarray.Dataset |
required |
segyfile |
string
|
The output SEG-Y file |
required |
data_array |
string
|
The Dataset variable name for the output volume. |
'data'
|
trace_header_map |
dict
|
Defaults to None. A dictionary of seisnc variables and byte locations. The variable will be written to the trace headers in the assigned byte location. By default CMP=23, cdp_x=181, cdp_y=185, iline=189, xline=193. |
None
|
use_text |
book
|
Use the seisnc text for the EBCIDC output. This text usally comes from the loaded SEG-Y file and may not match the segysak SEG-Y output. Defaults to False and writes the default segysak EBCIDC |
False
|
dead_trace_key |
str
|
The key for the Dataset variable to use for trace output filter. |
None
|
vert_dimension |
str
|
Data dimension to output, defaults to 'twt' or 'depth' whichever is present. |
'twt'
|
chunk_spec |
dict
|
Xarray open_dataset chunking spec. |
None
|
silent |
bool
|
Turn off progress reporting. Defaults to False. |
False
|
dim_kwargs |
int
|
The dimension/byte location pairs to output dimensions to. The number of dim_kwargs should be equal to the number of dimensions on the output data_array. The sort order will be as per the order passed to the function. |
{}
|
Source code in segysak/segy/_segy_freewriter.py
Python | |
---|---|
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 |
|
output_byte_locs(name)
Return common bytes position variable_dict for segy_writer.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str
|
One of [standard_3d, petrel_3d] |
required |
Returns:
Name | Type | Description |
---|---|---|
dict |
A dictionary of SEG-Y byte positions and default seisnc variable pairs. |
Example
segywriter(ncfile, 'segyfile.sgy', trace_header_map=output_byte_loc('petrel'))
Source code in segysak/segy/_segy_writer.py
Python | |
---|---|
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 |
|