pytsg
File reader for .tsg files generated by CSIRO's the spectral geologist
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (6.6%) to scientific vocabulary
Repository
File reader for .tsg files generated by CSIRO's the spectral geologist
Basic Info
Statistics
- Stars: 2
- Watchers: 1
- Forks: 4
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
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 \HOLEMAMEtsg.bip \HOLENAMEtsg.tsg \HOLENAMEtsgtir.bip \HOLENAMEtsgtir.tsg \HOLENAMEtsghires.dat \HOLENAMEtsgcras.bip
```
```python from matplotlib import pyplot as plt from pytsg import parse_tsg
data = parsetsg.readpackage('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 = parsetsg.readtsgbippair('ETG0187tsg.tsg','ETG0187tsg.bip','nir') tir = parsetsg.readtsgbippair('ETG0187tsgtir.tsg','ETG0187tsgtir.bip','tir')
cras file
cras = parsetsg.readcras('ETG0187tsgcras.bip')
hires dat file
lidar = parsetsg.readlidar('ETG0187tsghires.dat')
``` For convienience
Thanks
Thanks to CSIRO and in particular Andrew Rodger for his assistance in decoding the file structures.
Owner
- Name: FractalGeoAnalytics
- Login: FractalGeoAnalytics
- Kind: organization
- Website: https://www.fractalgeoanalytics.com/
- Repositories: 3
- Profile: https://github.com/FractalGeoAnalytics
Citation (CITATION.cff)
cff-version: 1.2.0
title: pytsg
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Ben
family-names: Chi
email: ben@fractalgeoanalytics.com
repository-code: 'https://github.com/FractalGeoAnalytics/pytsg'
url: 'https://www.fractalgeoanalytics.com'
abstract: File reader for CSIRO tsg file format
license: MIT
date-released: '2022-07-21'
GitHub Events
Total
- Pull request review event: 1
- Pull request event: 1
- Fork event: 1
Last Year
- Pull request review event: 1
- Pull request event: 1
- Fork event: 1
Dependencies
- alabaster 0.7.12 develop
- babel 2.10.3 develop
- black 22.6.0 develop
- certifi 2022.6.15 develop
- charset-normalizer 2.1.0 develop
- click 8.1.3 develop
- colorama 0.4.5 develop
- cycler 0.11.0 develop
- docutils 0.17.1 develop
- fonttools 4.34.4 develop
- idna 3.3 develop
- imagesize 1.4.1 develop
- importlib-metadata 4.12.0 develop
- jinja2 3.1.2 develop
- kiwisolver 1.4.4 develop
- markdown-it-py 2.1.0 develop
- markupsafe 2.1.1 develop
- matplotlib 3.5.2 develop
- mdit-py-plugins 0.3.0 develop
- mdurl 0.1.1 develop
- mypy-extensions 0.4.3 develop
- myst-parser 0.18.0 develop
- packaging 21.3 develop
- pathspec 0.9.0 develop
- platformdirs 2.5.2 develop
- pygments 2.12.0 develop
- pyparsing 3.0.9 develop
- pyyaml 6.0 develop
- requests 2.28.1 develop
- setuptools-scm 7.0.5 develop
- snowballstemmer 2.2.0 develop
- sphinx 5.1.1 develop
- sphinx-autodoc-typehints 1.19.1 develop
- sphinx-gallery 0.11.0 develop
- sphinx-rtd-theme 1.0.0 develop
- sphinxcontrib-applehelp 1.0.2 develop
- sphinxcontrib-devhelp 1.0.2 develop
- sphinxcontrib-htmlhelp 2.0.0 develop
- sphinxcontrib-jsmath 1.0.1 develop
- sphinxcontrib-qthelp 1.0.3 develop
- sphinxcontrib-serializinghtml 1.1.5 develop
- tomli 2.0.1 develop
- typing-extensions 4.3.0 develop
- urllib3 1.26.11 develop
- zipp 3.8.1 develop
- numpy 1.23.1
- pandas 1.4.3
- pillow 9.2.0
- python-dateutil 2.8.2
- pytz 2022.1
- six 1.16.0
- Sphinx ^5.1.1 develop
- black ^22.6.0 develop
- matplotlib ^3.5.2 develop
- myst-parser ^0.18.0 develop
- sphinx-autodoc-typehints ^1.19.1 develop
- sphinx-gallery ^0.11.0 develop
- sphinx-rtd-theme ^1.0.0 develop
- Pillow ^9.2.0
- numpy ^1.23
- pandas ^1.4.3
- python ^3.8
- actions/checkout v3 composite
- actions/setup-python v3 composite
- pypa/gh-action-pypi-publish 27b31702a0e7fc50959f5ad993c78deac1bdfc29 composite
- numpy ==1.23.1
- pandas ==1.4.3
- python-dateutil ==2.8.2
- pytz ==2022.1
- simplejpeg ==1.6.5
- six ==1.16.0