Reputation: 21
When writing a LAS file using:
las_data.write(new_File,version=2.0)
I loose the curve Mnemonics placed on the ~A or ~ASCII line My petrophysicist loves seeing them listed on that line just above the data columns. When writing a LAS file using lasio it doesn't work
Below is the code showing how I create the line - same as I write when altering other headeritem lines. From reading the LASIO documentation I started to wonder whether those Mnemonics are included as column headers in the dataframe with the data columns. Hence the final statement line below but to no avail.
#Update encode ~ASCII with curve names
las_dat.encoding = "~ASCII DEPT"
counter = 0
for curve in las_dat.curves:
x=6 #spaces between curve Mnem
if counter>0:
las_dat.encoding = las_dat.encoding + " "*(x-
len(curve.mnemonic.strip(' ')))+curve.mnemonic.strip(' ')
counter = counter + 1
las_dat.set_data(df) #Seems like ~A line is part of df
Here is an example of the ~ASCII line: '~ASCII DEPT ILM SFL ILD CILD SP NPSS C1 DRHO RHOB DPSS PEF GR HDIA'
Upvotes: 2
Views: 356