{"id":31740310,"url":"https://github.com/scienxlab/unmap","last_synced_at":"2025-10-09T10:17:52.042Z","repository":{"id":59492225,"uuid":"537538695","full_name":"scienxlab/unmap","owner":"scienxlab","description":"Unmap data from a pseudocolor image, with or without knowing the colormap.","archived":false,"fork":false,"pushed_at":"2023-04-04T21:20:19.000Z","size":15930,"stargazers_count":18,"open_issues_count":8,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-13T06:16:16.409Z","etag":null,"topics":["plotting","python","recovering-data","reproducible-research","reproducible-science"],"latest_commit_sha":null,"homepage":"https://scienxlab.org/unmap","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scienxlab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.md","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-09-16T16:35:06.000Z","updated_at":"2025-08-29T19:52:25.000Z","dependencies_parsed_at":"2025-04-12T12:34:25.610Z","dependency_job_id":"89a2d575-12b0-4d24-9cb3-bea457003366","html_url":"https://github.com/scienxlab/unmap","commit_stats":null,"previous_names":["kwinkunks/unmap"],"tags_count":7,"template":false,"template_full_name":"agilescientific/snowfake","purl":"pkg:github/scienxlab/unmap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scienxlab%2Funmap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scienxlab%2Funmap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scienxlab%2Funmap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scienxlab%2Funmap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scienxlab","download_url":"https://codeload.github.com/scienxlab/unmap/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scienxlab%2Funmap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001323,"owners_count":26083040,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["plotting","python","recovering-data","reproducible-research","reproducible-science"],"created_at":"2025-10-09T10:17:45.036Z","updated_at":"2025-10-09T10:17:52.034Z","avatar_url":"https://github.com/scienxlab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# unmap\n\n[![Run tests](https://github.com/scienxlab/unmap/actions/workflows/run-tests.yml/badge.svg)](https://github.com/scienxlab/unmap/actions/workflows/run-tests.yml)\n[![Build docs](https://github.com/scienxlab/unmap/actions/workflows/build-docs.yml/badge.svg)](https://github.com/scienxlab/unmap/actions/workflows/build-docs.yml)\n[![PyPI version](https://img.shields.io/pypi/v/unmap.svg)](https://pypi.org/project/unmap//)\n[![PyPI versions](https://img.shields.io/pypi/pyversions/unmap.svg)](https://pypi.org/project/unmap//)\n[![PyPI license](https://img.shields.io/pypi/l/unmap.svg)](https://pypi.org/project/unmap/)\n\nUnmap data from pseudocolor images, with or without knowledge of the colourmap. This tool has 2 main components:\n\n1. Guess the colourmap that was used for a pseudocolour visualization, in cases where it's unknown and a colourbar is not included in the image.\n2. 'Unmap' a pseudocolour visualization, separating the data from the image; essentially this is the opposite of what `plt.imshow()` does. \n\n\n## Similar projects\n\nThere are some other approaches to both Task 1 (above) and Task 2:\n\n- [`unmap`](https://github.com/jperryhouts/unmap) (I swear I didn't know about this tool when I named mine!) \u0026mdash; does the data ripping part. The colourmap must be provided, but the tool also provides a way to interactively identify a colourbar in the image.\n- [Poco et al.](https://ieeexplore.ieee.org/document/8017646) ([GitHub](https://github.com/uwdata/rev)) attempts to both find the colourbar in a visualization, then use it to perform Task 2. The visualization must contain a colourbar.\n- [Yuan et al.](https://github.com/yuanlinping/deep_colormap_extraction) attempts Task 1 using deep learning. The prediction from a CNN is refined with either Laplacian eigenmapping (manifold+based dimensionality reduction, for continuous colourmaps) or DBSCAN (for categorical colourmaps).\n\nOf these projects, only Yuan et al. ('deep colormap extraction') requires no _a priori_ knowledge of the colourmap. \n\n\n## Stack Exchange questions about this topic\n\n- [Can I get numeric data from a color map?](https://datascience.stackexchange.com/questions/27247/can-i-get-numeric-data-from-a-color-map)\n- [How to extract a colormap from a colorbar image and use it in a heatmap?](https://stackoverflow.com/questions/71090534/how-to-extract-a-colormap-from-a-colorbar-image-and-use-it-in-a-heatmap)\n- [Given a JPG of 2D colorplot colorbar how can I sample the image to extract data?](https://stackoverflow.com/questions/63233529/given-a-jpg-of-2d-colorplot-colorbar-how-can-i-sample-the-image-to-extract-n)\n- [How to reverse a colormap image to scalar values?](https://stackoverflow.com/questions/3720840/how-to-reverse-a-color-map-image-to-scalar-values)\n- [Extract color table values?](https://stackoverflow.com/questions/62267694/extract-color-table-values)\n- [Invert not reverse a colormap in maptplotlib](https://stackoverflow.com/questions/14445102/invert-not-reverse-a-colormap-in-matplotlib)\n\n\n## Installation\n\nYou can install this package with `pip`:\n\n    pip install unmap\n\nThere are `dev`, `test` and `docs` options for installing dependencies for those purposes, eg `pip install unmap[dev]`.\n\n\n## Documentation\n\nRead [the documentation](https://scienxlab.org/unmap), especially [the examples](https://scienxlab.org/unmap/userguide/Unmap_data_from_an_image.html).\n\n\n## Contributing\n\nTake a look at [`CONTRIBUTING.md`](https://github.com/scienxlab/unmap/blob/main/CONTRIBUTING.md).\n\n\n## Testing\n\nAfter cloning this repository and installing the dependencies required for testing, you can run the tests (requires `pytest` and `pytest-cov`) with\n\n    pytest\n\n\n## Building\n\nThis repo uses PEP 517-style packaging, with the entire build system and requirements defined in the `pyproject.toml` file. [Read more about this](https://setuptools.pypa.io/en/latest/build_meta.html) and [about Python packaging in general](https://packaging.python.org/en/latest/tutorials/packaging-projects/).\n\nBuilding the project requires `build`, so first:\n\n    pip install build\n\nThen to build `unmap` locally:\n\n    python -m build\n\nThe builds both `.tar.gz` and `.whl` files, either of which you can install with `pip`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscienxlab%2Funmap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscienxlab%2Funmap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscienxlab%2Funmap/lists"}