List of changes

Unreleased changes (Available on GitHub)

Version 0.31 (18 May 2023)

  • Many improvements to code style and formatting, and the documentation

  • #555 - Fix problem when writing with changed data (different number of depths)

  • #554 / #556 - Enable DLM (delimiter) TAB

  • #552 - Remove or replace cchardet with chardet

  • #530 - Detect hyphens in data section and adjust regexp_subs as needed

  • Fix #322 - provide a way to consistently retrieve header items which may or may not be present in the header:

    If you try ordinary item-style access, as is normal in Python, a KeyError exception will be raised if it is missing:

    >>> permit = las.well['PRMT']
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "c:\devapps\kinverarity\projects\lasio\lasio\las_items.py", line 313, in __getitem__
        raise KeyError("%s not in %s" % (key, self.keys()))
    KeyError: "PRMT not in ['STRT', 'STOP', 'STEP', 'NULL', 'COMP', 'WELL', 'FLD', 'LOC', 'PROV', 'SRVC', 'DATE', 'UWI']"
    

    A better pattern is to use the lasio.SectionItems.get() method, which allows you to specify a default value in the case of it missing:

    >>> permit = las.well.get('PRMT', 'unknown')
    >>> permit
    HeaderItem(mnemonic="PRMT", unit="", value="unknown", descr="")
    

    You can use the add=True keyword argument if you would like this header item to be added, as well as returned:

    >>> permit = las.well.get('PRMT', 'unknown', add=True)
    >>> las.well
    [HeaderItem(mnemonic="STRT", unit="M", value="0.05", descr="FIRST INDEX VALUE"),
    HeaderItem(mnemonic="STOP", unit="M", value="136.6", descr="LAST INDEX VALUE"),
    HeaderItem(mnemonic="STEP", unit="M", value="0.05", descr="STEP"),
    HeaderItem(mnemonic="NULL", unit="", value="-99999", descr="NULL VALUE"),
    HeaderItem(mnemonic="COMP", unit="", value="", descr="COMP"),
    HeaderItem(mnemonic="WELL", unit="", value="Scorpio E1", descr="WELL"),
    HeaderItem(mnemonic="FLD", unit="", value="", descr=""),
    HeaderItem(mnemonic="LOC", unit="", value="Mt Eba", descr="LOC"),
    HeaderItem(mnemonic="SRVC", unit="", value="", descr=""),
    HeaderItem(mnemonic="CTRY", unit="", value="", descr=""),
    HeaderItem(mnemonic="STAT", unit="", value="SA", descr="STAT"),
    HeaderItem(mnemonic="CNTY", unit="", value="", descr=""),
    HeaderItem(mnemonic="DATE", unit="", value="15/03/2015", descr="DATE"),
    HeaderItem(mnemonic="UWI", unit="", value="6038-187", descr="WUNT"),
    HeaderItem(mnemonic="PRMT", unit="", value="unknown", descr="")]
    

Version 0.30 (12 May 2022)

  • Fixes for #446 (Implement a numpy-based reader for the data section; `#452`_) and #444 (Provide a way to benchmark speed performance of LASFile.read; `#449`_). This leads to a more than two-fold improvement in speed (e.g. from 1091 msec to 341 msec for a large sample file).
  • Fixes for #439 (Data section containing non-numeric chars is parsed entirely as str) and #227 (NULL value replacing valid value in DEPT) by allowing different data types for different columns (PRs `#459`_, `#460`_, `#461`_)
  • Partially fix #375 (allow writing mnemonics in ~ASCII line; PRs `#466`_, `#471`_, `#465`_)
  • Partial fix for #265 (Parse comma-delimited ~ASCII sections; `#485`_)
  • Fix #83 (LAS file with more curves defined in ~C section than available in ~A section; `#480`_)
  • Improve visibility and access to the Code of Conduct (`#469`_)
  • Fix #453 (rounding issues when writing LAS file) (`#455`_)
  • Fix #268 (remove side-effects from writer) (`#447`_, `#451`_)
  • Documentation updates (`#475`_, #477, `#481`_, `#501`_, `#498`_, `#500`_)
  • Fix #473 (Header lines without a period are discarded unnecessarily)
  • Fix #472 (Detect and raise IOError exception for LiDAR files; `#482`_)
  • Fix #483 (perfomance decrease in DEBUG logging level; `#484`_)
  • Fix #478 (:1 :2 should only be appended to mnemonics when using LASFile.read) with `#479`_: Add update_curve and replace_curve_item methods to LASFile
  • Fix #490 (LAS 2.1 reading error; `#491`_)
  • Fix #486 (Adding a citation file, and maybe a DOI; `#487`_)
  • Fix #392 (ignore_comments not mentioned in documentation; `#495`_)
  • Fix #332: Describe default read_policies in docstring, with `#489`_
  • Fix #502 (NumPy type conversion alias deprecation; `#503`_)
  • minor performance improvements (`#470`_, )

Version 0.29 (14 April 2021)

  • Fix #404 (lasio changes STEP with imprecise floating-point number behaviour; `#432`_)
  • Add option len_numeric_field=-1, lhs_spacer=" ", and spacer=" " to writer.py:write (see #412; PR `#418`_)
  • Fix #271 (Read quoted strings in data section properly; `#423`_)
  • Fix #427 (Change null_policy to handle small non-zero values; `#429`_)
  • Fix #417 (Fix parsing for empty ~Other section; `#430`_)
  • Fix #402 (fixes issue when unit starts with dot; `#403`_)
  • Fix #395 (Update doc examples to reflect new HeaderItem repr; `#410`_)
  • Fix #426 (Update urllib.request to be the preferred urllib; `#428`_)
  • Add check for pushed tag version to version tests (`#396`_)
  • Update GitHub Action Python CI testing (`#399`_, `#400`_)
  • Improve las_items.py:HeaderItem.__repr__ truncation logic (`#397`_)
  • Remove codecs import (unused) and fix typo (`#406`_)
  • Exclude LAS files from GitHubs Language Stats (`#411`_)
  • Re-add try-except check around call to reader.read_data_section_iterative() (`#401`_)
  • Remove reader.py:read_file_contents - unused code (see `#401`_; `#393`_)
  • Add test for timestring with colon in ~Well section (see #419 - PR `#420`_)
  • Fix SyntaxWarning in writer.py (`#425`_)
  • Add bugfix and feature request issue templates to GitHub repository
  • Apply black code style to all Python files (`#438`_, `#398`_)
  • Update demo notebook for using logging levels with current behaviour
  • Update contributing guide (`#437`_, `#441`_)

Version 0.28 (12 September 2020)

Version 0.27 (4 September 2020)

  • Fix #380 (install failed without git installed; `#382`_)

Version 0.26 (31 August 2020)

  • This is the final version which works on Python 2.7 (#364)
  • Fix #333 (header lines not parsed when colon is in description; `#335`_)
  • Fix #359 (sections not found when leading whitespace in line; `#360`_, `#361`_)
  • Fix #350 (bug with NULL; `#352`_)
  • Fix #339 (0.1IN not recognised as index unit; `#340`_, `#349`_)
  • Fix #31 (add command-line script to convert between LAS versions; `#329`_)
  • Fix #75 (add Cyrillic variant for metres; `#330`_)
  • Fix `#326`_ (Support header-only LAS files–don’t lose the last header section before a missing ~A section)
  • Improve documentation regarding deleting items and curves (#315, `#325`_)
  • Add deprecation markers (`#331`_)
  • Align json.dumps and LASFile.to_json() (`#328`_)
  • Fixes and updates to setup.py relating to the adoption of setuptools_scm (#312, `#317`_, `#318`_)
  • Clean up and background changes related to future LAS 3.0 support: `#334`_, `#337`_, `#338`_, `#341`_, `#342`_, `#346`_, `#348`_, `#372`_

Version 0.25.1 (1 May 2020)

  • Shift to setuptools_scm (`#311`_)
  • Fix #321 (EOF character causes error on read)
  • Fix #182 (remove side-effect LASFile.write causing LASFile.version.VERS to change)
  • Fix #310 (remove LASFile.metadata which was not working)

Version 0.25 (28 March 2020)

  • Add stack_curves() method to allow joining a set of curves into a 2D array (issue #284, PR `#293`_)
  • Add lasio.examples module (`#296`_)
  • Fix #278 (leading zeroes were being stripped from API/UWI numbers)
  • Fix `#286`_ (error on trying to write a file with one row of data)
  • Fix `#258`_ (do not catch Ctrl+C when reading file)
  • Fix `#292`_ (improve error checking for when trying to write non-2D data)
  • Fix #277 (allow pathlib objects to lasio.read)
  • Fix #264 (allow periods in mnemonics to be retained in specific cases)
  • Fix #201 (adjust descr parsing in ~P section to allow times in the descr, see PR `#298`_)
  • Fix `#302`_ (change in str(datetime) handling)
  • Fixes to JSON output (`#300`_, #303)
  • Fix #304 (add column_fmt argument to LASFile.write method)

Version 0.24

  • Fix #256 (parse units in brackets and add index_unit kwarg)

Version 0.23

  • Fix #259 (error when encoding missing from URL response headers)
  • Fix #262 (broken build due to cchardet dependency)

Version 0.22

  • Fix `#252`_ (removing case sensitivity in index_unit checks)
  • Fix `#249`_ (fix bug producing df without converting to floats)
  • Attempt to fix Lasso classification on GitHub

Version 0.21

  • Fix #236 and #237 (can now read ASCII in ~Data section)
  • Fix `#239`_ (Petrel can’t read lasio output)

Version 0.20

  • Fix #233 (pickling error lost Curve.data during multiprocessing)
  • Fix #226 (do not issue warning on empty ~Parameter section)
  • Revised default behaviour to using null_policy=’strict’ (ref. #227)
  • Fix `#221`_ (depths > 10000 were being rounded by default)
  • Fix `#225`_ (file handle leaked if exception during parsing)

Version 0.19

  • Fix #223 (critical version/installation bug)

Version 0.18

  • Fix version numbering setup
  • Fix #92 (can ignore blah blah lines in ~C section)
  • Fix #209 (can now add curves with LASFile[‘mnemonic’] = [1, 2, 3])
  • Fix #213 (LASFile.data is now a lazily generated property, with setter)
  • Fix #218 (LASFile.append_curve was not adding data=[…] properly)
  • Fix #216 (LASFile now raises KeyError for missing mnemonics)
  • Fix #214 (first duplicate mnemonic when added was missing the :1)

Version 0.17

  • Add Appveyor continuous integration testing
  • Add example notebook for how to use python logging module
  • Fix #160 (add methods to LASFile for inserting curves)
  • Fix #155 (implement del keyword for header items)
  • Fix #142 (implement slicing for SectionItems)
  • Fix #135 (UWI numbers losing their leading zeros)
  • Fix #153 (fix SectionItems pprint repr in Python 3)
  • Fix #81 (accept header items with missing colon)
  • Fix #71 (add Docker build for lasio to DockerHub)
  • Fix #210 (allow upper/lowercase standardization of mnemonics on read)
  • Document recent additions (nearly up to date) (in Sphinx docs)

Version 0.16

  • Add read_policy and null_policy keywords - see documentation for details
  • Fix bugs around files with missing ~V ~W ~P or ~C sections (#84 #85 #78)
  • Fix #17 involving files with commas as a decimal mark
  • Improve LASHeaderError traceback message
  • Fix bug involving files with ~A but no data lines following
  • Fix bug with blank line at start of file
  • Fix bug involving missing or duplicate STRT, STOP and STEP mnemonics

Version 0.15.1

  • Major performance improvements with both memory and speed
  • Major improvement to read parser, now using iteration
  • Add LASFile.to_excel() and LASFile.to_csv() export methods
  • Improve las2excelbulk.py script
  • Published new and updated Sphinx documentation
  • Improved character encoding handling when chardet not installed
  • autodetect_encoding=True by default
  • Allow reading of multiple non-standard header sections (#167, `#168`_)
  • Add flexibility in reading corrupted headers (ignore_header_errors=True)
  • Add ability to avoid reading in data (ignore_data=True)
  • Remove excessive debugging messages
  • Fix bug #164 where FEET was not recognised as FT
  • Fix major globals() bug #141 affecting LASFile.add_curve
  • Add command-line version script $ lasio to show version number.

Version 0.14 and 0.15 skipped due to broken PyPI upload.

Version 0.13

  • Other minor bug fixes inc inability to rename mnemonics in written LAS file.

Version 0.11.2

  • Fix bug with not correctly figuring out units for LASFile.write()
  • Add LASFile.add_curve(CurveItem) method which automatically goes to the old method at LASFile.add_curve_raw(mnemonic=, data=, ...) if necessary, so it should be transparent to users

Version 0.11

  • Reorganise code into modules
  • various

Version 0.10

  • Internal change to SectionItems for future LAS 3.0 support
  • Added JSON encoder
  • Added examples for using pandas DataFrame (.df attribute)
  • LAS > Excel script refined (las2excel.py)

Version 0.9.1 (2015-11-11)

  • pandas.DataFrame now as .df attribute, bugfix

Version 0.8 (2015-08-20)

  • numerous bug fixes, API documentation added

Version 0.7 (2015-08-08)

  • all tests passing on Python 2.6 through 3.4

Version 0.6 (2015-08-05)

  • bugfixes and renamed from las_reader to lasio

Version 0.5 (2015-08-01)

  • Improvements to writing LAS files

Version 0.4 (2015-07-26)

  • Improved handling of character encodings, other internal improvements

Version 0.3 (2015-07-23)

  • Added Python 3 support, now reads LAS 1.2 and 2.0

Version 0.2 (2015-07-08)

  • Tidied code and published on PyPI