Name | pytsg JSON |
Version |
0.4.13
JSON |
| download |
home_page | None |
Summary | Library to read .tsg file package |
upload_time | 2024-09-30 13:24:35 |
maintainer | None |
docs_url | None |
author | Ben |
requires_python | <4.0,>=3.9 |
license | MIT |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# pytsg
## Rationale
The spectral geologist (TSG) is an industry standard software for hyperspectral data analysis
https://research.csiro.au/thespectralgeologist/
pytsg is an open source one function utility that imports the spectral geologist file package into a simple object.
## Installation
Installation is via pip
```pip install pytsg```
## Usage
If using the top level importer the data is assumed to follow this structure
```
\HOLENAME
\HOLEMAME_tsg.bip
\HOLENAME_tsg.tsg
\HOLENAME_tsg_tir.bip
\HOLENAME_tsg_tir.tsg
\HOLENAME_tsg_hires.dat
\HOLENAME_tsg_cras.bip
```
```python
from matplotlib import pyplot as plt
from pytsg import parse_tsg
data = parse_tsg.read_package('example_data/ETG0187')
plt.plot(data.nir.wavelength, data.nir.spectra[0, 0:10, :].T)
plt.plot(data.tir.wavelength, data.tir.spectra[0, 0:10, :].T)
plt.xlabel('Wavelength nm')
plt.ylabel('Reflectance')
plt.title('pytsg reads tsg files')
plt.show()
```
If you would prefer to have full control over importing individual files the following syntax is what you need
```python
# bip files
nir = parse_tsg.read_tsg_bip_pair('ETG0187_tsg.tsg','ETG0187_tsg.bip','nir')
tir = parse_tsg.read_tsg_bip_pair('ETG0187_tsg_tir.tsg','ETG0187_tsg_tir.bip','tir')
# cras file
cras = parse_tsg.read_cras('ETG0187_tsg_cras.bip')
# hires dat file
lidar = parse_tsg.read_lidar('ETG0187_tsg_hires.dat')
```
For convienience
## Thanks
Thanks to CSIRO and in particular Andrew Rodger for his assistance in decoding the file structures.
Raw data
{
"_id": null,
"home_page": null,
"name": "pytsg",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": null,
"author": "Ben",
"author_email": "ben@fractalgeoanalytics.com",
"download_url": "https://files.pythonhosted.org/packages/4b/0c/b4547d5e659aa343e32e056a4d1fe13c9a94bf63511ee63d00d20eea86ce/pytsg-0.4.13.tar.gz",
"platform": null,
"description": "# pytsg\n## Rationale\nThe spectral geologist (TSG) is an industry standard software for hyperspectral data analysis\nhttps://research.csiro.au/thespectralgeologist/\n\npytsg is an open source one function utility that imports the spectral geologist file package into a simple object.\n\n## Installation\nInstallation is via pip\n```pip install pytsg```\n\n## Usage\n\nIf using the top level importer the data is assumed to follow this structure\n```\n\\HOLENAME\n \\HOLEMAME_tsg.bip\n \\HOLENAME_tsg.tsg\n \\HOLENAME_tsg_tir.bip\n \\HOLENAME_tsg_tir.tsg\n \\HOLENAME_tsg_hires.dat\n \\HOLENAME_tsg_cras.bip\n\n```\n\n```python\nfrom matplotlib import pyplot as plt\nfrom pytsg import parse_tsg\n\ndata = parse_tsg.read_package('example_data/ETG0187')\n\nplt.plot(data.nir.wavelength, data.nir.spectra[0, 0:10, :].T)\nplt.plot(data.tir.wavelength, data.tir.spectra[0, 0:10, :].T)\nplt.xlabel('Wavelength nm')\nplt.ylabel('Reflectance')\nplt.title('pytsg reads tsg files')\nplt.show()\n\n```\n\nIf you would prefer to have full control over importing individual files the following syntax is what you need\n\n```python\n\n# bip files\nnir = parse_tsg.read_tsg_bip_pair('ETG0187_tsg.tsg','ETG0187_tsg.bip','nir')\ntir = parse_tsg.read_tsg_bip_pair('ETG0187_tsg_tir.tsg','ETG0187_tsg_tir.bip','tir')\n\n# cras file\ncras = parse_tsg.read_cras('ETG0187_tsg_cras.bip')\n\n# hires dat file\nlidar = parse_tsg.read_lidar('ETG0187_tsg_hires.dat')\n\n\n```\nFor convienience \n## Thanks\nThanks to CSIRO and in particular Andrew Rodger for his assistance in decoding the file structures.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Library to read .tsg file package",
"version": "0.4.13",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "91a870e7536d9d942077c0ffbe18723c512dff0afe9fb87fc98aae1b03e8261a",
"md5": "81ff86481f981b36639ff6d0ca771047",
"sha256": "dadd647d635f343c38f90bbe0aa309d642cae5f03571d0a37963f1ac7220e27f"
},
"downloads": -1,
"filename": "pytsg-0.4.13-py3-none-any.whl",
"has_sig": false,
"md5_digest": "81ff86481f981b36639ff6d0ca771047",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 16405,
"upload_time": "2024-09-30T13:24:33",
"upload_time_iso_8601": "2024-09-30T13:24:33.729799Z",
"url": "https://files.pythonhosted.org/packages/91/a8/70e7536d9d942077c0ffbe18723c512dff0afe9fb87fc98aae1b03e8261a/pytsg-0.4.13-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4b0cb4547d5e659aa343e32e056a4d1fe13c9a94bf63511ee63d00d20eea86ce",
"md5": "d42e40a58b519cf3164b5ea8059df855",
"sha256": "a7c0566379656bba0d478f2bd32d5ee18b25f7b7b8cd3dbe470c8e837c98d6ae"
},
"downloads": -1,
"filename": "pytsg-0.4.13.tar.gz",
"has_sig": false,
"md5_digest": "d42e40a58b519cf3164b5ea8059df855",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 16044,
"upload_time": "2024-09-30T13:24:35",
"upload_time_iso_8601": "2024-09-30T13:24:35.106528Z",
"url": "https://files.pythonhosted.org/packages/4b/0c/b4547d5e659aa343e32e056a4d1fe13c9a94bf63511ee63d00d20eea86ce/pytsg-0.4.13.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-30 13:24:35",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "pytsg"
}