Open MSZeftawy opened 4 years ago
Thanks for the suggestion @MSZeftawy!
I think that lasio could help with this by providing a keyword argument to map descriptions against mnemonics, using a dict-like object, similar to how pandas does in many places. Very similar to your function.
Note to self: stay aligned to whatever welly chooses to do in this space (e.g. related: renaming curves https://github.com/agilescientific/welly/issues/213)
Hi Kent,
I have been using LASIO for a week now and I think it has a large potential. Great job!
Some of the files I open has header and parameters section description same as mnemonic (150 to be exact). such as below;
As all the lasses I have got the same parameters, I defined a function to rename the description of them, sample of the code;
def moddescr():
las.well.STRT.descr='START DEPTH'
las.well.STOP.descr='STOP DEPTH'
las.well.STEP.descr='STEP INTERVAL'
las.well.COMP.descr='COMPANY'
las.well.FLD.descr='FIELD'
las.well.LOC.descr='LOCATION'
las.well.SRVC.descr='SERVICE COMPANY'
las.well.CTRY.descr='CTRY'
las.well.STAT.descr='STATE'
las.well.CNTY.descr='COUNTRY'
las.well.DATE.descr='LOGGING DATE'
las.params.BHT.descr='BOREHOLE TEMPERATURE AT TD'
las.params.BIT1.descr='BIT 1 SIZE MM'
las.params.BIT2.descr='BIT 2 SIZE MM'
las.params.BIT3.descr='BIT 3 SIZE MM'
las.params.BS.descr='BIT SIZE'
las.params.BTF1.descr='BIT 1 START DEPTH'
las.params.BTF2.descr='BIT 2 START DEPTH'
las.params.BTF3.descr='BIT 3 START DEPTH'
las.params.BTT1.descr='BIT 1 END DEPTH'
las.params.BTT2.descr='BIT 2 END DEPTH'
las.params.BTT3.descr='BIT 3 END DEPTH'
las.params.CIRC.descr='STOP CIRCULATION TIME'
las.params.CIRCT.descr='TIME SINCE CIRCULATION'
las.params.CRES.descr='MUD CACKE RESISTIVITY'
You may have noticed that CNTY is used as COUNTRY instead of CTRY.
Then I called the function just before writing the new files and it worked great. A sample below;
las=lasio.read(filename)
moddescr()
lasio.writer.write(las,newlas,version=2,wrap=None,STRT=None,STOP=None,STEP=None,fmt='%.2f',len_numeric_field=11, data_width=None, header_width=60)
And the output;
It would be great if you could add a header/parameters tables that contain standard mnemonics and corresponding description with a new separate function to apply the description upon user request. Or as optional input in las.writer function.
Plesase let me know if I can help.
Cheers Moustafa