Reads LAS files.
Created on Jan 11, 2012
Specialisation of exception for LASRead.
Specialisation of exception for LASRead when handling sections.
Specialisation of exception for LASRead when handling array section.
Specialisation of exception for LASRead when reading data.
Equivalent to KeyError when looking stuff up.
LAS file extension
LAS lower case file extension
Returns True if the file extansion is a LAS one.
Regex to match a comment
logging.debug call here can add about 50% of the processing time
Given an file-like object this generates non-blank, non-comment lines. It’s a co-routine so can accept a line to put back.
All section identifiers
Section with data lines
Section with index value in column 0
Regex to match a section heasd
Map of section identifiers to description
The ‘MENM’ field, no spaces, dots or colons. ONE group
The data field which is the middle of the line between the first ‘.’ and last ‘:’ This is composed of optional units and value. Units must follow the dot immediately and contain no colons or spaces Note: Group 2 may have leading and trailing spaces TWO groups
Data field 2 is after the last ‘:’ THREE groups
Captures the 6 fields: mnem unit valu desc format assoc
Return self as a plain tuple. Used by copy and pickle.
Create new instance of SectLine(mnem, unit, valu, desc, format, assoc)
Return a nicely formatted representation string
Alias for field number 5
Alias for field number 3
Alias for field number 4
Alias for field number 0
Alias for field number 1
Alias for field number 2
Contains data on a section.
Number of members.
Membership test.
Given a line this decomposes it to its _members. i is the position of the line l in the file.
Finalisation of section, this updates the internal representation.
Returns an entry, key can be int or str.
Returns an list of mnemonics.
Returns an list of mnemonic units.
Returns the keys in the internal map.
Returns the member ordinal for mnemonic m or -1 if not found. This can be used for finding the array column for a particular curve.
list of weak references to the object (if defined)
Contains data on an array section.
Process a line in an array section.
Finalisation. TODO: Make a numpy array and get rid of the members. Need to overload __getitem__.
Returns the number of data points in a frame.
Base class for LAS reading and writing. This provides common functionality to child classes.
Mapping of commonly seen LAS units to proper LIS units Both key and value must be strings
Number of sections.
Returns a section, key can be int or str.
Returns the number of frames of data in an ‘A’ record if I have one.
Returns the number of frame data points in an ‘A’ record if I have one.
Yields up each section.
The NULL value, defaults to -999.25.
The X axis units.
The Xaxis start value as an EngVal.
The Xaxis end value as an EngVal.
The Xaxis step value as an EngVal.
Returns True if X axis is increasing i.e. for time or down log.
Returns a tuple of (value, units) for a Mnemonic that may appear in either a Well section or a Parameter section. Units may be None if empty. Returns (None, None) if nothing found.
Returns a set of mnemonics from the Well section and the Parameter section.
Returns True if theMnem, a Mnem.Mnem() object is an output in the Curve section. It will use the alternate names table LGFORMAT_LAS from LASConstants to interpret curves that are not exact matches.
Returns list of curve names actually declared in the Curve section. List will be unordered if ordered is False.
Given a curve as a Mnem.Mnem() this returns the units as a string. May raise KeyError.
Generates curve values for theMnem, a Mnem.Mnem() object.
list of weak references to the object (if defined)