Skip to content

Commit

Permalink
Minor changes to sgrid header
Browse files Browse the repository at this point in the history
  • Loading branch information
geojunky committed Nov 29, 2022
1 parent 1c9a795 commit ff5125a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions seismic/receiver_fn/export_sgrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def process(rf_h5_file, output_sgrid_file, start, end, epsg_code, extend, dx, dy
ascii_data_file = fn.replace('.sg', '')+'__ascii@@'

prop_name = ''
if(property_name is None): prop_name = fn.replace('.sg', '') + '-ccp-amp'
if(property_name is None): prop_name = os.path.basename(fn).replace('.sg', '') + '-ccp-amp'
else: prop_name = property_name

log.info('Writing Sgrid file: {}..'.format(fn))
Expand All @@ -276,8 +276,8 @@ def process(rf_h5_file, output_sgrid_file, start, end, epsg_code, extend, dx, dy
'}',
'GOCAD_ORIGINAL_COORDINATE_SYSTEM',
'NAME Default',
'PROJECTION Unknown'
'DATUM Unknown'
'PROJECTION EPSG:{}'.format(epsg_code),
'DATUM Unknown',
'AXIS_NAME "X" "Y" "Z"',
'AXIS_UNIT "m" "m" "m"',
'ZPOSITIVE Depth',
Expand Down Expand Up @@ -335,6 +335,7 @@ def process(rf_h5_file, output_sgrid_file, start, end, epsg_code, extend, dx, dy

sta_fn = fn.replace('.sg', '')+'_stations.csv'
f=open(sta_fn, 'w+')
f.write('# station-name X(EPSG:{}) Y(EPSG:{})\n'.format(epsg_code, epsg_code))
log.info('Writing station-coordinates file: {}..'.format(sta_fn))
for k in vol._meta.keys():
sta = vol._meta[k]
Expand Down

0 comments on commit ff5125a

Please sign in to comment.