File import formats - suggestion

Have a suggestion for improving DPlot or a question about existing features? Let us know

Moderator: DPlotAdmin

Post Reply
arctica
Posts: 6
Joined: Sat Apr 05, 2008 6:36 am
Location: Stevenage, UK

File import formats - suggestion

Post by arctica »

Hello

I was wondering if additional file formats could be added to the list, particularly those common in the geology/oil exploration fields. If so, what is the procedure for doing this.

I can supply example files of the sort I am thinking of - called .LAS. These are well log file format, with a header and followed by a column series.

Thanks

Lester
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

Lester,
If you have a thorough description of the file format and several example files then it most likely won't be a big problem for me to produce a file import plugin, which I'll be happy to do.

One caveat: I'm writing this from a hotel, no power or internet service at home due to a nasty storm and while I may be back up tomorrow (crossing fingers), it might be a week or more before I receive your files and/or you get a response.
Visualize Your Data
support@dplot.com
arctica
Posts: 6
Joined: Sat Apr 05, 2008 6:36 am
Location: Stevenage, UK

Post by arctica »

Hi David

I'll get a few example files together, and the format description.

Regards

Lester

DPlotAdmin wrote:Lester,
If you have a thorough description of the file format and several example files then it most likely won't be a big problem for me to produce a file import plugin, which I'll be happy to do.

One caveat: I'm writing this from a hotel, no power or internet service at home due to a nasty storm and while I may be back up tomorrow (crossing fingers), it might be a week or more before I receive your files and/or you get a response.
arctica
Posts: 6
Joined: Sat Apr 05, 2008 6:36 am
Location: Stevenage, UK

Post by arctica »

Hello David

Was wondering if you had any success with the .LAS well data format as a plugin? Seems to be plenty of interest at my work place, so it would be a selling oint for the geoscience community at large.

As I'm sure you have seen, the format is really simple and can easily be read into Excel say, but it would be great to have it in DPlot, that way we could interogate the data curves better: Excel is not good for this!

Cheers

Lester
arctica wrote:Hi David

I'll get a few example files together, and the format description.

Regards

Lester

DPlotAdmin wrote:Lester,
If you have a thorough description of the file format and several example files then it most likely won't be a big problem for me to produce a file import plugin, which I'll be happy to do.

One caveat: I'm writing this from a hotel, no power or internet service at home due to a nasty storm and while I may be back up tomorrow (crossing fingers), it might be a week or more before I receive your files and/or you get a response.
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

Lester,
I'm sorry - I meant to get back to you with a few questions and got sidetracked. DPlot will right now open 2 of your examples (TEST01.LAS and TEST03.LAS) using file type D, though the title lines it picks out are most likely not what you'd want and I could use a few pointers there. Also if you drag/drop those files onto DPlot or use "Open with..." then DPlot will misidentify the file type and probably report "Insufficient memory for <a whole bunch of> points." That's fairly easily remedied by having DPlot check for an .LAS extension and a ~ as the first character in the file.

Where this falls apart and where I'll need to do something different is with your TEST02.LAS: values aren't necessarily all on one line, so file type D as is won't work in this case. If your data will always be numeric (no m-d-y, time of day, etc.), then this will be fairly simple. As far as I can tell from the documentation your data will always be numbers; if this isn't correct please let me know.
Visualize Your Data
support@dplot.com
arctica
Posts: 6
Joined: Sat Apr 05, 2008 6:36 am
Location: Stevenage, UK

Post by arctica »

Hi David

Thanks for having a look at that; I'll check it out later on when I'm on my home computer. It does look like there is a common file structure to the .LAS format even though some of the header bits can be quite lengthy:

~VERSION INFORMATION
VERS. 2.0 : CWLS LOG ASCII STANDARD - 2.0
WRAP. NO :ONE LINE PER DEPTH STEP
~WELL INFORMATION
#MNEM.UNIT DATA DESCRIPTION OF MNEMONIC
#--------- ------------- --------------------------
STRT.FT 1189.0000 :START DEPTH
STOP.FT 6715.5000 :STOP DEPTH
STEP.FT 0.50000000 :STEP SIZE
NULL. -999.250 :NULL VALUE
DATE. 09-Jun-2008 :LAS FILE CREATION DATE
COMP . COMPANY NAME
WELL . WELL_TEST :WELL NAME
FLD . FOLD_BELT :FIELD
CNTY . TYRELL :COUNTY
STAT . CO :STATE
CTRY . USA :COUNTRY
API . 05055061050000 :API NUMUMBER
OW UWI . 05055061050000 :UNIQUE WELL IDENTIFIER
SRVC . Shell Logic :SERVICE COMPANY
~CURVE INFORMATION
#MNEM.UNIT API CODE CURVE DESCRIPTION
#--------- ------------- --------------------------
DEPT .FT : 1 DEPTH
CALI .IN : 2 2 Caliper
GR .API : 3 14 Gamma Ray
ILD_SH .OHMM : 4 22 Deep induction resistivity
ILM_SH .OHMM : 5 23 Medium induction resistivity
NPHI .V/V DECI : 6 15 Neutron porosity
PEF .BARNS : 7 11 Photo-electric factor
RHOB .G/C3 : 8 6 Bulk density
SP .MV : 9 34 Spontaneous potential
TENS .LB : 10 13 Cable Tension
~ASCII LOG DATA

As far as I can see, and I have looked at a few examples, the curve data block is the key, so as long as DPlot can associate the CURVE DESCRIPTION with the column headings then it will be fine. Since there is a possiblility of more than 3 columns here (have seen a commnets one) maybe a way of selecting which column to use. From the above, it looks like the data can be ascribed by checking for the ~CURVE and ~ASCII limits.

I will see what I get when I test things and get back to you

Cheers

Lester
DPlotAdmin wrote:Lester,
I'm sorry - I meant to get back to you with a few questions and got sidetracked. DPlot will right now open 2 of your examples (TEST01.LAS and TEST03.LAS) using file type D, though the title lines it picks out are most likely not what you'd want and I could use a few pointers there. Also if you drag/drop those files onto DPlot or use "Open with..." then DPlot will misidentify the file type and probably report "Insufficient memory for <a whole bunch of> points." That's fairly easily remedied by having DPlot check for an .LAS extension and a ~ as the first character in the file.

Where this falls apart and where I'll need to do something different is with your TEST02.LAS: values aren't necessarily all on one line, so file type D as is won't work in this case. If your data will always be numeric (no m-d-y, time of day, etc.), then this will be fairly simple. As far as I can tell from the documentation your data will always be numbers; if this isn't correct please let me know.
arctica
Posts: 6
Joined: Sat Apr 05, 2008 6:36 am
Location: Stevenage, UK

Post by arctica »

Hi David

I have checked the file-type D format for loading .LAS files and it does work reasonably well. The only major issue being there needs to be a way of specifying the null value: this is something that can be entered manually to save having to scan the header information - seems to be a fairly standard value in most LAS files (so far!).

The title is a bit awkward but can always be manually edited anyway.

The depth is a bit of a problem too since the values are positive downward (i.e. relative depth). Making column 1 negative values would have it plotting correctly on the Y-axis.

Thanks for having a look at this, and I don't want to keep you from other developments on DPlot. The files are ascii so easy to manipulate anyway, but DPlot makes a very good attempt at it - so well done!

Cheers

Lester
arctica wrote:Hi David

Thanks for having a look at that; I'll check it out later on when I'm on my home computer. It does look like there is a common file structure to the .LAS format even though some of the header bits can be quite lengthy:

~VERSION INFORMATION
VERS. 2.0 : CWLS LOG ASCII STANDARD - 2.0
WRAP. NO :ONE LINE PER DEPTH STEP
~WELL INFORMATION
#MNEM.UNIT DATA DESCRIPTION OF MNEMONIC
#--------- ------------- --------------------------
STRT.FT 1189.0000 :START DEPTH
STOP.FT 6715.5000 :STOP DEPTH
STEP.FT 0.50000000 :STEP SIZE
NULL. -999.250 :NULL VALUE
DATE. 09-Jun-2008 :LAS FILE CREATION DATE
COMP . COMPANY NAME
WELL . WELL_TEST :WELL NAME
FLD . FOLD_BELT :FIELD
CNTY . TYRELL :COUNTY
STAT . CO :STATE
CTRY . USA :COUNTRY
API . 05055061050000 :API NUMUMBER
OW UWI . 05055061050000 :UNIQUE WELL IDENTIFIER
SRVC . Shell Logic :SERVICE COMPANY
~CURVE INFORMATION
#MNEM.UNIT API CODE CURVE DESCRIPTION
#--------- ------------- --------------------------
DEPT .FT : 1 DEPTH
CALI .IN : 2 2 Caliper
GR .API : 3 14 Gamma Ray
ILD_SH .OHMM : 4 22 Deep induction resistivity
ILM_SH .OHMM : 5 23 Medium induction resistivity
NPHI .V/V DECI : 6 15 Neutron porosity
PEF .BARNS : 7 11 Photo-electric factor
RHOB .G/C3 : 8 6 Bulk density
SP .MV : 9 34 Spontaneous potential
TENS .LB : 10 13 Cable Tension
~ASCII LOG DATA

As far as I can see, and I have looked at a few examples, the curve data block is the key, so as long as DPlot can associate the CURVE DESCRIPTION with the column headings then it will be fine. Since there is a possiblility of more than 3 columns here (have seen a commnets one) maybe a way of selecting which column to use. From the above, it looks like the data can be ascribed by checking for the ~CURVE and ~ASCII limits.

I will see what I get when I test things and get back to you

Cheers

Lester
DPlotAdmin wrote:Lester,
I'm sorry - I meant to get back to you with a few questions and got sidetracked. DPlot will right now open 2 of your examples (TEST01.LAS and TEST03.LAS) using file type D, though the title lines it picks out are most likely not what you'd want and I could use a few pointers there. Also if you drag/drop those files onto DPlot or use "Open with..." then DPlot will misidentify the file type and probably report "Insufficient memory for <a whole bunch of> points." That's fairly easily remedied by having DPlot check for an .LAS extension and a ~ as the first character in the file.

Where this falls apart and where I'll need to do something different is with your TEST02.LAS: values aren't necessarily all on one line, so file type D as is won't work in this case. If your data will always be numeric (no m-d-y, time of day, etc.), then this will be fairly simple. As far as I can tell from the documentation your data will always be numbers; if this isn't correct please let me know.
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

Lester,
Version 0.0.0.1 is here: http://www.dplot.com/plugins/fileimport/las.dll.

Copy this file to <dplot folder>\plugins\fileimport.

The next time you run DPlot you'll see "LAS Well Log File" in the plugins list.

A few qualifiers, which I'd appreciate your input on before releasing this on the world:

1) The plugin makes no attempt at setting the title lines of the plot. If you'll point out the fields you'd like to see in the title it is a trivial matter to make that change.

2) I imagine you'd like the plugin to present a dialog box where you can specifiy which columns to plot. Not a huge deal, and will most likely be added whether you ask for it or not.

3) Variable step: all of the examples use a fixed step, which makes it very easy to determine the number of data rows w/o reading the entire file. But the format allows a variable step (specified with step=0). I changed one of the files to use step=0 and it is imported correctly, and as far as I can tell this will work in all cases. But I've been wrong before :-). If you run into any weird problems (like, but not limited to, DPlot reading a subset of the data) please send me the file you're having trouble with.

And in general, if you try this with any files and get unexpected results, please send me the file.
Visualize Your Data
support@dplot.com
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

Lester,
Update per your suggestions is available here:
http://www.dplot.com/plugins/fileimport/las.dll.

Changes:
  • You can select which records to plot, from 1 to all.
  • If a NULL value is specified in the file then the plugin will now use a YCutoff command (equivalent to Options>Amplitude Limits) with the low value set to the file's NULL value + abs(NULL)/1.E6, and the high value set to a very large number (effectively the limit of a double precision floating point number). In plain English, NULL values will result in gaps in a curve. About the only way I can see that this won't work is if some good input values are less than the NULL value, but based on your example files and the type of data you're looking at I think this is unlikely.
  • The plot title is taken from the WELL field.
  • If the first column is "Depth, m" (case insensitive) then a second X axis is added with depth in ft, and vice versa.
The last change requires version 2.1.8 (or later) of DPlot. As you're on the mailing list you should have received the link via e-mail. If not you can get it with "Check for Updates" on the Help menu, or of course by asking for the link by e-mail.

Your comments/suggestions are welcome. Barring any difficulties I'll be adding this plugin to the next release.
Visualize Your Data
support@dplot.com
Post Reply