segysak.segy.segy_freewriter

segysak.segy.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
  • seisnc (xarray.Dataset, string) – The input SEISNC file either a path or the in memory xarray.Dataset

  • segyfile (string) – The output SEG-Y file

  • data_array (string) – The Dataset variable name for the output volume.

  • trace_header_map (dict, optional) – 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.

  • use_text (book, optional) – 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

  • dead_trace_key (str) – The key for the Dataset variable to use for trace output filter.

  • vert_dimension (str) – Data dimension to output, defaults to ‘twt’ or ‘depth’ whichever is present.

  • chunk_spec (dict, optional) – Xarray open_dataset chunking spec.

  • silent (bool, optional) – Turn off progress reporting. Defaults to 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.