{"id":13734269,"url":"https://github.com/arthur-e/unmixing","last_synced_at":"2026-01-06T06:53:38.578Z","repository":{"id":39617321,"uuid":"85334057","full_name":"arthur-e/unmixing","owner":"arthur-e","description":"Interactive tools for spectral mixture analysis of multispectral raster data in Python","archived":false,"fork":false,"pushed_at":"2019-12-19T22:42:24.000Z","size":5658,"stargazers_count":108,"open_issues_count":6,"forks_count":24,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-11-15T02:34:38.284Z","etag":null,"topics":["earth-observation","lsma","multispectral-images","raster","remote-sensing","satellite-data","satellite-imagery","spectral-mixture-analysis"],"latest_commit_sha":null,"homepage":"","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/arthur-e.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.md","codeowners":null,"security":null,"support":null}},"created_at":"2017-03-17T16:43:27.000Z","updated_at":"2024-10-14T07:07:50.000Z","dependencies_parsed_at":"2022-09-15T21:42:23.900Z","dependency_job_id":null,"html_url":"https://github.com/arthur-e/unmixing","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arthur-e%2Funmixing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arthur-e%2Funmixing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arthur-e%2Funmixing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arthur-e%2Funmixing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arthur-e","download_url":"https://codeload.github.com/arthur-e/unmixing/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253045703,"owners_count":21845761,"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":["earth-observation","lsma","multispectral-images","raster","remote-sensing","satellite-data","satellite-imagery","spectral-mixture-analysis"],"created_at":"2024-08-03T03:00:54.038Z","updated_at":"2026-01-06T06:53:38.521Z","avatar_url":"https://github.com/arthur-e.png","language":"Python","funding_links":[],"categories":["`Python` processing of optical imagery (non deep learning)","Python"],"sub_categories":["Processing imagery - post processing"],"readme":".. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.3585979.svg\n   :target: https://doi.org/10.5281/zenodo.3585979\n\n==========================\nInteractive Unmixing Tools\n==========================\n\nOverview\n========\n\nThis is a library of interactive tools and functions for performing linear spectral mixture analysis (LSMA) and spatially adaptive spectral mixture analysis (SASMA).\nIt supports parallel fully constrained least-squares (FCLS) mixture analysis over multiple processes, allowing for very efficient mapping of endmember abundances, both in the spatially adaptive approach and in regular LSMA.\nIn detail, the `unmixing` module includes tools and functions to support:\n\n- Stacking raster bands from any GDAL file format, including HDF;\n- Applying a mask or a combination of masks to a raster;\n- Generating raster masks from saturated pixels or using density slicing (e.g., to mask water pixels);\n- Applying CFMask output and other quality assurance layers from the USGS;\n- Band-wise compositing of reflectance (or fraction/ abundance images);\n- Tasseled cap transformation and other indices including NDVI and RNDSI;\n- Dimensionality reduction through the Minimum Noise Fraction (MNF);\n- Radiometric rectification of a raster time series;\n- Visualizing the mixing space of a moderate resolution raster;\n- Interactive selection of pixels in the mixing space, which are then captured in a KML file;\n- Endmember induction and plotting of endmembers for linear spectral mixture analysis (LSMA);\n- Fully constrained least squares (FCLS) unmixing;\n- Spatial interpolation of endmembers for spatially adaptive spectral mixture analysis (SASMA);\n- Learning of endmember candidates for SASMA using classification and regression trees (CART);\n- Validation of unmixing through a forward model of reflectance;\n\n**For an overview and tutorial on how to use this library, check out the iPython Notebook(s) in the** ``docs/`` **folder:**\n\n- \u003chttps://github.com/arthur-e/unmixing/blob/master/docs/Overview_LSMA_in_Python.ipynb\u003e\n- \u003chttps://github.com/arthur-e/unmixing/blob/master/docs/Example_Spatially_Adaptive_Spectral_Mixture_Analysis_SASMA.ipynb\u003e\n\nInstallation and Setup\n======================\n\nBecause this is a scientific library, there are complex dependencies that may be difficult to install.\nFor GNU/Linux systems, particularly Ubuntu, look at ``install.sh`` for a guide on installing the system dependencies required for the Python dependencies.\n\nAt this time, installation is intended for development purposes only.\nAs such, ``unmixing`` should be installed in \"editable\" mode using ``pip``; see \u003chttps://packaging.python.org/distributing/#working-in-development-mode\u003e.\nFrom the ``unmixing`` directory, where ``setup.py`` is found::\n\n    $ pip install -e .\n\nDependencies\n------------\n\n* ``numpy``\n* ``scipy``\n* ``matplotlib``\n* ``pysptools``\n* ``GDAL``\n* ``pykml``\n* ``scikit-learn`` (For SASMA)\n\nUse System Dependencies\n-----------------------\n\nMany of the core packages, particularly NumPy and SciPy, have wide adoption and use.\nThey also take a lot of time and clock cycles to compile into a virtual environment.\nConsequently, it is recommended that these libraries be installed globally (system-wide).\n\nOther packages should be installed only in the virtual environment.\nTo use both system-wide and local packages within a virtual environment, the virtual environment must be set up with the ``--system-site-packages`` option::\n\n    sudo apt-get install python3-numpy python3-scipy python3-matplotlib python3-zmq\n    virtualenv -p /usr/bin/python3.5 --system-site-packages \u003cvirtualenv_path\u003e\n\nThe local packages can be installed within the virtual environment via ``pip``::\n\n    source /my/virtualenv/bin/activate\n    pip install -r REQUIREMENTS\n\n\nDocumentation\n=============\n\nPython Dependencies\n-------------------\n\nSome resources on the dependencies can be found:\n\n* ``matplotlib`` \u003chttp://matplotlib.org/contents.html\u003e\n* PySptools \u003chttp://pysptools.sourceforge.net/index.html\u003e\n* PySptools on PyPI \u003chttps://pypi.python.org/pypi/pysptools/0.13.0\u003e\n\nThird-Party Tools\n-----------------\n\nDocumentation on related (but not required) third-party tools can be found:\n\n* Fmask \u003chttps://code.google.com/p/fmask/\u003e\n* CFmask \u003chttps://code.google.com/p/cfmask/\u003e (A C version of Fmask)\n* LEDAPS \u003chttps://code.google.com/p/ledaps/\u003e\n\nFoundations\n===========\n\nHyperspectral Imaging (HSI) Cubes\n---------------------------------\n\nMany of the tools in this library are designed to work with HSI cubes.\nWhile the raster arrays read in from GDAL are ``p x m x n`` arrays, HSI cubes are ``n x m x p`` arrays, where ``m`` is the row index, `n` is the column index, and ``p`` is the spectral band number.\nIt is important to note that the row index `n` corresponds to the latitude while the column index `m` corresponds to the longitude.\nThus, the coordinates ``(n, m)`` can be converted directly to a longitude-latitude pair.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farthur-e%2Funmixing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farthur-e%2Funmixing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farthur-e%2Funmixing/lists"}