{"id":22322547,"url":"https://github.com/josestg/las-converter","last_synced_at":"2025-08-01T15:34:18.468Z","repository":{"id":62575175,"uuid":"173584053","full_name":"josestg/Las-converter","owner":"josestg","description":"A Python package that helps you to convert Log ASCII Standard file into Python Data Structure and JSON format","archived":false,"fork":false,"pushed_at":"2023-11-09T02:49:39.000Z","size":112,"stargazers_count":4,"open_issues_count":2,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-01-06T04:03:13.413Z","etag":null,"topics":["json","python"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/las-converter/","language":"Python","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/josestg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-03T14:16:18.000Z","updated_at":"2023-11-09T02:49:45.000Z","dependencies_parsed_at":"2022-11-03T20:06:21.423Z","dependency_job_id":null,"html_url":"https://github.com/josestg/Las-converter","commit_stats":null,"previous_names":["josestnggng/las-converter"],"tags_count":1,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josestg%2FLas-converter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josestg%2FLas-converter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josestg%2FLas-converter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josestg%2FLas-converter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/josestg","download_url":"https://codeload.github.com/josestg/Las-converter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228024144,"owners_count":17857628,"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":["json","python"],"created_at":"2024-12-04T01:07:46.370Z","updated_at":"2024-12-04T01:07:47.156Z","avatar_url":"https://github.com/josestg.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## LAS 2.0 Reader and Converter\n\n[![Build Status](https://travis-ci.org/josestg/Las-converter.svg?branch=master)](https://travis-ci.org/josestg/Las-converter)\n\nThis package useful for reading and converting the LAS file to python `dict` and `json`.\n\nLAS (Log ASCII Standard) is a structured ASCII file containing log curve data and header information. For more [detail](http://www.cwls.org/wp-content/uploads/2017/02/Las2_Update_Feb2017.pdf).\n\n### LAS File Example\n\n```\n~VERSION INFORMATION\n VERS.                 2.0 :   CWLS LOG ASCII STANDARD - VERSION 2.0\n WRAP.                  NO :   SINGLE LINE PER DEPTH STEP\n CREA.                 1/30/2018 12:24:47 PM\n#CREATED USING IP VERSION 3.6.2010.102 BY LELY ON 1/30/2018 12:24:47 PM\n~WELL INFORMATION\n#MNEM.UNIT       DATA                          DESCRIPTION MNEMONIC\n#---------      ---------------------------   --------------------------\n STRT    .M         23.6220                   : START DEPTH\n STOP    .M         1522.1713                 : STOP DEPTH\n STEP    .M         0.1524                    : STEP VALUE\n NULL    .      -999.0000                     : NULL VALUE\n SRVC    .      SCH                           : Service Company/Logging company\n DATE    .      1/30/2018                     : LAS file Creation Date\n WELL    .      JPN-A                         : Well Name\n COMP    .      PT. Pertamina EP              : Company\n FLD     .      JEPON                         : Field\n STATE   .      JAWA TENGA                    : State\n COUNT   .      Indonesia                     : Country\n LOC     .      X                             : Location\n LATI    .      -6.9952777778                 : Latitude/Northing\n LONG    .      111.5247222222                : Longitude/Easting\n PDAT    .      MSL                           : Permanent Datum\n EPDAT   .      0.0000                        : Elevation of Permanent Datum\n LGMEA   .      KB                            : Log Measured from\n APDAT   .      169.0000                      : Elevation Above Permanent Datum\n RWS     .      -999                          : Def_Rw\n WST     .      -999                          : Def_Rwt\n CNTY    .      OW 700/39                     : County\n\n~CURVE INFORMATION\n#MNEM          UNIT     API CODE   Curve Type Comments\n#---------- ---------- ----------  ---------- --------\n DEPTH     .M                    : Depth\n Perm      .md                   : perm\n\n~A Log data section\n#  DEPTH      Perm\n  23.6220    0.0000\n  23.7744 3001.4817\n  23.9268 3001.4556\n  24.0792 3030.4937\n  24.2316 3028.0435\n  24.3840 2960.1401\n\n ~Other  Information Section\nThe log digits for this well were hand digitized from poor half scale log\nprints.  This  was  the  best  information  available  at  the  time.  Every attempt should be made to track down the original films. .Dec. 12,1990  John Doe, Petrophysics\n\n```\n\nsee full LAS file [here](https://github.com/josestnggng/Las-converter/blob/master/files/sample3.las).\n\n### Installation\n\n```bash\npip install las-converter\n```\n\n### How to use\n\nLAS converter with `file` input. see [here](https://github.com/josestnggng/Las-converter/blob/master/files).\n\n```py\nfrom LAS import Converter\n\nc = Converter() # create converter object\n\nlog = c.set_file(\"file.las\") #return LogWrapper\n\n# get section\ndata      = log.data\nversion   = log.version\ncurve     = log.curve\nparameter = log.parameter\nwell      = log.well\nother     = log.other\n\n# or get dictionary\nlog_in_dict = log.get_dict()\n# or print on json format and save to disk\nlog_in_json = log.get_json(\"outfile_name\")\n```\n\n### Server app (Flask)\n\nLAS converter with `stream` input. see [here](https://github.com/josestnggng/Las-converter/blob/master/test/expected.py).\n\n```py\n# server app for handling upload\nfrom flask import request\nfrom LAS import Converter\n\n@app.route('/upload', methods=['GET', 'POST'])\ndef upload_file():\n    if request.method == \"POST\":\n        f = request.files['file']\n\n        # read stream\n        stream = f.stream.readlines()\n\n        # code for Las Converter\n        c = Converter()\n        log  = c.set_stream(stream)\n\n        # or get only assci/data\n        data = log.data\n```\n\n### Output\n\n##### JSON\n\n```json\n(log = {\n  \"data\": {\n    \"depth\": [23.622, 23.7744, 23.9268, 24.0792, 24.2316, 24.384],\n    \"perm\": [0.0, 3001.4817, 3001.4556, 3030.4937, 3028.0435, 2960.1401]\n  }\n})\n```\n\n##### Python dict\n\nsee [detail](https://github.com/josestnggng/Las-converter/blob/master/outfile.json).\n\n```py\nlog.data = {\n    'depth': [23.622, 23.7744, 23.9268, 24.0792, 24.2316, 24.384],\n    'perm': [0.0, 3001.4817, 3001.4556, 3030.4937, 3028.0435, 2960.1401]\n}\n```\n\nsee [detail](https://github.com/josestnggng/Las-converter/blob/master/test/expected.py).\n\n### Contributors\n\n- [Asido Saputra Sigalingging](https://github.com/asidosaputra)\n- [Jose Sitanggang](https://github.com/josestnggng)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosestg%2Flas-converter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjosestg%2Flas-converter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosestg%2Flas-converter/lists"}