{"id":13407860,"url":"https://github.com/kinverarity1/lasio","last_synced_at":"2025-06-15T03:13:04.289Z","repository":{"id":12742041,"uuid":"15415111","full_name":"kinverarity1/lasio","owner":"kinverarity1","description":"Python library for reading and writing well data using Log ASCII Standard (LAS) files","archived":false,"fork":false,"pushed_at":"2025-03-31T06:38:12.000Z","size":5267,"stargazers_count":363,"open_issues_count":52,"forks_count":155,"subscribers_count":33,"default_branch":"main","last_synced_at":"2025-06-03T18:51:52.691Z","etag":null,"topics":["data-format","data-management","data-mining","geology","geophysics","geotechnical-engineering","groundwater","io","las-files","lasio","log-ascii-standard","mineral-exploration","petroleum","python","swung-t21","well-log","well-logs","wireline"],"latest_commit_sha":null,"homepage":"https://lasio.readthedocs.io/en/latest/","language":"Lasso","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kinverarity1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2013-12-24T08:56:49.000Z","updated_at":"2025-05-25T18:43:09.000Z","dependencies_parsed_at":"2024-06-18T13:47:45.171Z","dependency_job_id":"9fb2b1f3-85cb-422e-94dd-72ea5dcbc15e","html_url":"https://github.com/kinverarity1/lasio","commit_stats":{"total_commits":949,"total_committers":41,"mean_commits":"23.146341463414632","dds":0.5184404636459431,"last_synced_commit":"128de5129e20258d511fced1836d96f0eeacec8f"},"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"purl":"pkg:github/kinverarity1/lasio","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kinverarity1%2Flasio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kinverarity1%2Flasio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kinverarity1%2Flasio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kinverarity1%2Flasio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kinverarity1","download_url":"https://codeload.github.com/kinverarity1/lasio/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kinverarity1%2Flasio/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259914961,"owners_count":22931333,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-format","data-management","data-mining","geology","geophysics","geotechnical-engineering","groundwater","io","las-files","lasio","log-ascii-standard","mineral-exploration","petroleum","python","swung-t21","well-log","well-logs","wireline"],"created_at":"2024-07-30T20:00:49.077Z","updated_at":"2025-06-15T03:13:04.235Z","avatar_url":"https://github.com/kinverarity1.png","language":"Lasso","funding_links":[],"categories":["Software","Jupyter Notebook"],"sub_categories":["Petrophysics","Well Log"],"readme":"# lasio\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://lasio.readthedocs.io/en/stable/\"\u003e\u003cstrong\u003eDocumentation\u003c/strong\u003e (stable)\u003c/a\u003e •\n\u003ca href=\"https://lasio.readthedocs.io/en/latest/\"\u003e\u003cstrong\u003eDocumentation\u003c/strong\u003e (main branch)\u003c/a\u003e\n\u003c/p\u003e\n\n[![Run tests](https://github.com/kinverarity1/lasio/actions/workflows/ci-tests.yml/badge.svg)](https://github.com/kinverarity1/lasio/actions/workflows/ci-tests.yml)\n[![PyPI version](https://img.shields.io/pypi/v/lasio.svg)](https://pypi.python.org/pypi/lasio/)\n[![Code Style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://black.readthedocs.io/en/stable/the_black_code_style/index.html)\n[![License](http://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/kinverarity1/lasio/blob/master/LICENSE)\n\nRead and write Log ASCII Standard files with Python.\n\nThis is a Python 3.7+ package to read and write Log ASCII Standard\n(LAS) files, used for borehole data such as geophysical, geological, or\npetrophysical logs. It's compatible with versions 1.2 and 2.0 of the LAS file\nspecification, published by the [Canadian Well Logging\nSociety](https://www.cwls.org/products/#products-las). Support for LAS 3 is \n[being worked on](https://github.com/kinverarity1/lasio/issues/5).\n\nlasio is primarily for reading and writing data and metadata to and from \nLAS files. It is designed to read as many LAS files as possible, including\nthose containing common errors and non-compliant formatting. It can be used\ndirectly, but you may want to consider using some other packages, depending\non your priorities:\n\n- [welly](https://github.com/agile-geoscience/welly) is a Python package that \n  uses lasio for I/O but provides a **lot** more functionality aimed at working\n  with curves, wells, and projects. I would recommend starting there in most \n  cases, to avoid re-inventing the wheel!\n- [lascheck](https://github.com/MandarJKulkarni/lascheck) is focused on\n  checking whether your LAS file meets the specifications.\n- [lasr](https://github.com/donald-keighley/lasr) is an R package which \n  is designed to read large amounts of data quickly from LAS files; this is \n  a great thing to check out if speed is a priority for you, as lasio is not \n  particularly fast.\n- LiDAR surveys are also called \"LAS files\", but they are quite different and\n  lasio will not help you -- check out [laspy](https://github.com/laspy/laspy)\n  instead.\n\nlasio [stopped](https://github.com/kinverarity1/lasio/issues/364) \nsupporting Python 2.7 in August 2020. The final version of lasio with Python 2.7 support \nis version 0.26.\n\n## Code of conduct\n\nSee our [code of conduct](https://lasio.readthedocs.io/en/latest/contributing.html#code-of-conduct).\n\n## Quick start\n\nFor the minimum working requirements, you'll need numpy installed. Install\nlasio with:\n\n```bash\n$ pip install lasio\n```\n\nTo make sure you have everything, use this to ensure pandas, chardet, and\nopenpyxl are also installed:\n\n```bash\n$ pip install lasio[all]\n```\n\nExample session:\n\n```python\n\u003e\u003e\u003e import lasio\n```\n\nYou can read the file using a filename, file-like object, or URL:\n\n```python\n\u003e\u003e\u003e las = lasio.read(\"sample_rev.las\")\n```\n\nData is accessible both directly as numpy arrays\n\n```python\n\u003e\u003e\u003e las.keys()\n['DEPT', 'DT', 'RHOB', 'NPHI', 'SFLU', 'SFLA', 'ILM', 'ILD']\n\u003e\u003e\u003e las['SFLU']\narray([ 123.45,  123.45,  123.45, ...,  123.45,  123.45,  123.45])\n\u003e\u003e\u003e las['DEPT']\narray([ 1670.   ,  1669.875,  1669.75 , ...,  1669.75 ,  1670.   ,\n        1669.875])\n```\n\nand as ``CurveItem`` objects with associated metadata:\n\n```python\n\u003e\u003e\u003e las.curves\n[CurveItem(mnemonic=DEPT, unit=M, value=, descr=1  DEPTH, original_mnemonic=DEPT, data.shape=(29897,)),\nCurveItem(mnemonic=DT, unit=US/M, value=, descr=2  SONIC TRANSIT TIME, original_mnemonic=DT, data.shape=(29897,)),\nCurveItem(mnemonic=RHOB, unit=K/M3, value=, descr=3  BULK DENSITY, original_mnemonic=RHOB, data.shape=(29897,)),\nCurveItem(mnemonic=NPHI, unit=V/V, value=, descr=4   NEUTRON POROSITY, original_mnemonic=NPHI, data.shape=(29897,)),\nCurveItem(mnemonic=SFLU, unit=OHMM, value=, descr=5  RXO RESISTIVITY, original_mnemonic=SFLU, data.shape=(29897,)),\nCurveItem(mnemonic=SFLA, unit=OHMM, value=, descr=6  SHALLOW RESISTIVITY, original_mnemonic=SFLA, data.shape=(29897,)),\nCurveItem(mnemonic=ILM, unit=OHMM, value=, descr=7  MEDIUM RESISTIVITY, original_mnemonic=ILM, data.shape=(29897,)),\nCurveItem(mnemonic=ILD, unit=OHMM, value=, descr=8  DEEP RESISTIVITY, original_mnemonic=ILD, data.shape=(29897,))]\n```\n\nHeader information is parsed into simple HeaderItem objects, and stored in a\ndictionary for each section of the header:\n\n```python\n\u003e\u003e\u003e las.version\n[HeaderItem(mnemonic=VERS, unit=, value=1.2, descr=CWLS LOG ASCII STANDARD -VERSION 1.2, original_mnemonic=VERS),\nHeaderItem(mnemonic=WRAP, unit=, value=NO, descr=ONE LINE PER DEPTH STEP, original_mnemonic=WRAP)]\n\u003e\u003e\u003e las.well\n[HeaderItem(mnemonic=STRT, unit=M, value=1670.0, descr=, original_mnemonic=STRT),\nHeaderItem(mnemonic=STOP, unit=M, value=1660.0, descr=, original_mnemonic=STOP),\nHeaderItem(mnemonic=STEP, unit=M, value=-0.125, descr=, original_mnemonic=STEP),\nHeaderItem(mnemonic=NULL, unit=, value=-999.25, descr=, original_mnemonic=NULL),\nHeaderItem(mnemonic=COMP, unit=, value=ANY OIL COMPANY LTD., descr=COMPANY, original_mnemonic=COMP),\nHeaderItem(mnemonic=WELL, unit=, value=ANY ET AL OIL WELL #12, descr=WELL, original_mnemonic=WELL),\nHeaderItem(mnemonic=FLD, unit=, value=EDAM, descr=FIELD, original_mnemonic=FLD),\nHeaderItem(mnemonic=LOC, unit=, value=A9-16-49, descr=LOCATION, original_mnemonic=LOC),\nHeaderItem(mnemonic=PROV, unit=, value=SASKATCHEWAN, descr=PROVINCE, original_mnemonic=PROV),\nHeaderItem(mnemonic=SRVC, unit=, value=ANY LOGGING COMPANY LTD., descr=SERVICE COMPANY, original_mnemonic=SRVC),\nHeaderItem(mnemonic=DATE, unit=, value=25-DEC-1988, descr=LOG DATE, original_mnemonic=DATE),\nHeaderItem(mnemonic=UWI, unit=, value=100091604920, descr=UNIQUE WELL ID, original_mnemonic=UWI)]\n\u003e\u003e\u003e las.params\n[HeaderItem(mnemonic=BHT, unit=DEGC, value=35.5, descr=BOTTOM HOLE TEMPERATURE, original_mnemonic=BHT),\nHeaderItem(mnemonic=BS, unit=MM, value=200.0, descr=BIT SIZE, original_mnemonic=BS),\nHeaderItem(mnemonic=FD, unit=K/M3, value=1000.0, descr=FLUID DENSITY, original_mnemonic=FD),\nHeaderItem(mnemonic=MATR, unit=, value=0.0, descr=NEUTRON MATRIX(0=LIME,1=SAND,2=DOLO), original_mnemonic=MATR),\nHeaderItem(mnemonic=MDEN, unit=, value=2710.0, descr=LOGGING MATRIX DENSITY, original_mnemonic=MDEN),\nHeaderItem(mnemonic=RMF, unit=OHMM, value=0.216, descr=MUD FILTRATE RESISTIVITY, original_mnemonic=RMF),\nHeaderItem(mnemonic=DFD, unit=K/M3, value=1525.0, descr=DRILL FLUID DENSITY, original_mnemonic=DFD)]\n```\n\nThe data is stored as a 2D numpy array:\n\n```python\n\u003e\u003e\u003e las.data\narray([[ 1670.   ,   123.45 ,  2550.   , ...,   123.45 ,   110.2  ,   105.6  ],\n       [ 1669.875,   123.45 ,  2550.   , ...,   123.45 ,   110.2  ,   105.6  ],\n       [ 1669.75 ,   123.45 ,  2550.   , ...,   123.45 ,   110.2  ,   105.6  ],\n       ...,\n       [ 1669.75 ,   123.45 ,  2550.   , ...,   123.45 ,   110.2  ,   105.6  ],\n       [ 1670.   ,   123.45 ,  2550.   , ...,   123.45 ,   110.2  ,   105.6  ],\n       [ 1669.875,   123.45 ,  2550.   , ...,   123.45 ,   110.2  ,   105.6  ]])\n```\n\nYou can also retrieve and load data as a ``pandas`` DataFrame, build LAS files\nfrom scratch, write them back to disc, and export to Excel, amongst other\nthings.\n\nSee the [package documentation](https://lasio.readthedocs.io/en/latest/) for\nmore details.\n\n## Contributing\n\nContributions are invited and welcome.\n\nSee [Contributing](https://lasio.readthedocs.io/en/latest/contributing.html) for how to get started.\n\n## License\n\n[MIT](https://github.com/kinverarity1/lasio/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkinverarity1%2Flasio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkinverarity1%2Flasio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkinverarity1%2Flasio/lists"}