Skip to main content

No project description provided

Project description

DOI

MoonIndex

MoonIndex is a Python library that creates spectral indexes from the Moon Mineralogy Mapper (M3). The majority of indexes were collected from the literature, some were formulated in this work. The tool uses map-projected hyperspectral cubes and common Python libraries to generate the indexes. The general process of the tool consists of: preparation, filtration, continuum removal, and creation of the indexes (Tested on Python 3.11).

alt text

Requirements

To use the package you first need map-projected (M3) cubes. This can be achieved using the USGS Integrated Software for Imagers and Spectrometers (ISIS), see https://github.com/DOI-USGS/ISIS3. Moonindex requires Python 3.10 or higher.

Installation

The installation can be done via PyPI using pip:

pip install MoonIndex

Or after downloading the MoonIndex-3.0.0.tar.gz file under dist:

pip install MoonIndex-3.0.0.tar.gz

Example

The notebooks under scripts details the workflow followed to obtain the indexes. We recommend slicing the cubes before creating the indexes since the process is intensive. The sample cube used in these notebook can be found at: https://zenodo.org/records/10810407

Straighforward processing

First import the cube and the Wavelegnths.txt file using rioxarray and numpy:

input_cube=rioxarray.open_rasterio('input_cube.tiff')
wavelengths=numpy.loadtxt('Wavelength.txt', delimiter=",") wavelengths=(wavelengths).astype(numpy.float32)

Then a function to prepare the data:

M3_cube=MoonIndex.preparation.attach_wave(input_cube,wavelengths)

If you desire to crop the cube, you can use:

M3_cube=MoonIndex.preparation.crop_cube(M3_cube,x1,y1,x2,y2) Where x and y are the coordinates in the reference system of your cube.

And then, to create the indexes. This function can be paralelized, as well al other individual calculation fo indexes, please be careful with the amount of cores you use (-2 means all cores except 2, -3 all cores except 3, and None means no paralelization):

M3_full_CH=MoonIndex.indexes.indexes_total_CH(M3_cube,wavelengths, n_jobs= None) With the convex hull continuum-removal method.

Or:

M3_full_SAFO=MoonIndex.indexes.indexes_total_SAFO(M3_cube,wavelengths,2,1, n_jobs= None) With the second-and-first-order fit continuum removal method (the last two variables are the polynomial order for the fit around the 1000 and 2000 nm bands).

List of indexes

Index Name Abrev. Name Product type Source
Reflectance at 540 nm R540 Parameter Adams and McCord (1971)
Band center at 1 µm BCI Parameter Adams (1974)
Band center at 2 µm BCII Parameter Adams (1974)
Band depth at 1 µm BDI Parameter Adams (1974)
Band deepth at 2 µm BDII Parameter Adams (1974)
Spectral slope at 1 µm SS Parameter Hazen et al. (1978)
Clementine-like red channel Clem RED Parameter Lucey et al. (2000)
Clementine-like green channel Clem GREEN Parameter Lucey et al. (2000)
Clementine-like blue channel Clem BLUE Parameter Lucey et al. (2000)
Band depth at 1.9 µm BD1900 Parameter Bretzfelder et al. (2020)
Integrated band depth at 1 µm IBDI Parameter Bretzfelder et al. (2020)
Integrated band depth at 2 µm IBDII Parameter Bretzfelder et al. (2020)
Band area at 1 µm BAI Parameter Cloutis et al. (1986)
Band area at 2 µm BAII Parameter This papper
Band asymmetry at 1 µm ASYI Parameter Cloutis et al. (1986)
Band asymmetry at 2 µm ASYII Parameter This papper
Olivine parameter Ol Parameter Corley et al. (2018)
Spinel ratio Sp1 Parameter Pieters et al. (2014)
Spinel ratio Sp2 Parameter Moriarty III et al. (2022)
Pyroxene ratio Px Parameter Pieters et al. (2014)
Pure anorthosite ratio An Parameter Pieters et al. (2014)
Band depth at 950 nm BD950 Parameter Besse et al. (2011)
Band depth at 1.05 µm BD1050 Parameter Besse et al. (2011)
Band depth at 1.25 µm BD1250 Parameter Besse et al. (2011)
Reflectance at 1.58 µm R1580 Parameter Besse et al. (2011)
Iron oxide parameter Fe Parameter Wu et al. (2012)
Titanium parameter Ti Parameter Wu et al. (2012)
Chromite parameter Cr Parameter This paper
RGB Clementine-like color composite Clem RGB composite Lucey et al,( 2000)
Color composite 1 RGB 1 RGB composite Zambon et al. (2020)
Color composite 2 RGB 2 RGB composite Zambon et al. (2020)
Color composite 2 RGB 3 RGB composite Zambon et al. (2020)
Color composite of band area RGB4 RGB composite Horgan et al. (2014)
Color composite of band asymmetry RGB5 RGB composite Horgan et al. (2014)
Color composite 6 RGB6 RGB composite Besse et al. (2011)
Color composite 7 RGB7 RGB composite Besse et al. (2011)
Near infrarred color composite RGB8 RGB composite Bretzfelder et al. (2020)
Color composite of spinel Spanpx RGB composite Moriarty III et al. (2022)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

moonindex-3.0.4.tar.gz (32.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

moonindex-3.0.4-py3-none-any.whl (34.3 kB view details)

Uploaded Python 3

File details

Details for the file moonindex-3.0.4.tar.gz.

File metadata

  • Download URL: moonindex-3.0.4.tar.gz
  • Upload date:
  • Size: 32.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for moonindex-3.0.4.tar.gz
Algorithm Hash digest
SHA256 fa00492be15304699a206dd7ea79b9f219079143f31a3668d5caa5acc3c9719a
MD5 d04ece63d5c1a1f33ef9ddbf6e6cb7d5
BLAKE2b-256 a3413a7d3e14090ca0c8da0aba3883a5d40bcc7633a441fd9b9e9536a05b6f8f

See more details on using hashes here.

File details

Details for the file moonindex-3.0.4-py3-none-any.whl.

File metadata

  • Download URL: moonindex-3.0.4-py3-none-any.whl
  • Upload date:
  • Size: 34.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for moonindex-3.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c277f96b64da4a29b2f2bf13179ea1ce784cb2a82d444bc4071bd15f180ff5ef
MD5 b1f2b588e3eb3ab8d4597295fc91ef10
BLAKE2b-256 733d79f9512fc5b79e48dd85d0fd7f5a3ea66457d8f60401d73ba4ea0a8a01dc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page