Giter Club home page Giter Club logo

hyperspectral-notebooks's Introduction

Hyperspectral Notebook Examples

This repo contains a range of example for working with hyperspectral data.

Note that on EASI, you must save your Earthdata token as a text file and set up a custom Python environment with some extra packages installed. See below for instructions on how to do these two steps.

Notebooks that have been developed include the following:

There are examples in the pixxel folder that show how to use that data. And there are some notebooks with XX at the start of their name that are less developed.

Code in this repository is available under the Apache 2.0 license unless otherwise noted in the file.

Selecting granules to load

Each notebook has a cell at the top that loads data. You can change the granule variable to load a difference granule. To find other granules, you can explore the STAC API or the Data Portal.

A selection of reasonably cloud-free scenes have been listed below.

EMIT_L2A_RFL_001_20230316T045211_2307503_006  # Canberra
EMIT_L2A_RFL_001_20230330T000831_2308815_009  # Menindee
EMIT_L2A_RFL_001_20230312T230451_2307115_002  # Chowilla
EMIT_L2A_RFL_001_20230111T084724_2301105_003  # Jurien Bay
EMIT_L2A_RFL_001_20230316T045133_2307503_005  # Lake Hume
EMIT_L2A_RFL_001_20230401T014442_2309101_005  # Pilbara Coast west of Port Hedland
EMIT_L2A_RFL_001_20230316T045223_2307503_007  # Warragamba Dam and hazard reduction burn
EMIT_L2A_RFL_001_20230401T232248_2309115_011  # Coopers Creek
EMIT_L2A_RFL_001_20230116T044730_2301603_002  # Coorong
EMIT_L2A_RFL_001_20220901T022845_2224402_005  # Limmen Bight
EMIT_L2A_RFL_001_20230115T053714_2301503_007  # Lake Frome
EMIT_L2A_RFL_001_20230111T084712_2301105_002  # Pinnacles Cal/Val site
EMIT_L2A_RFL_001_20230322T031752_2308102_008  # St Vincent Gulf seagrass
EMIT_L2A_RFL_001_20230202T222219_2303314_009  # Bowen
EMIT_L2A_RFL_001_20230324T014237_2308301_002  # Melbourne
EMIT_L2A_RFL_001_20230112T062510_2301204_003  # Murray Mouth
EMIT_L2A_RFL_001_20230303T021147_2306201_022  # Quilpie
EMIT_L2A_RFL_001_20230310T012147_2306901_002  # Hamelin Pools
EMIT_L2A_RFL_001_20230401T014249_2309101_003  # Shark Bay Mid
EMIT_L2A_RFL_001_20230401T014301_2309101_004  # Shark Bay North
EMIT_L2A_RFL_001_20230131T221923_2303114_008  # Kerang Lakes

Authentication using a token from NASA Earth Data

To set up authentication so that you can load EMIT data, do the following:

  1. Register for an account at https://urs.earthdata.nasa.gov/home
  2. Visit the user_tokens page (the "Generate Token" tab)
  3. Generate a token and copy/save the string
  4. Either:
    1. Export it as an environment variable, export EARTHDATA_TOKEN=abcd... or add it to your .bashrc so that it's permanently exported; or
    2. Save it to a text file in your home directory, echo "abcd..." > ~/EARTHDATA_TOKEN.txt (or the equivalent on your platform)
  5. There's a function in the utils.py file that will load the token from these two locations for use in the notebooks.

Using Segment Anything on EASI

To use Segment Anything you need to use a GPU instance on EASI. To start a GPU instance, you'll need to stop your current notebook environment (go to the "Hub Control Panel" in the "File" menu and choose "Stop My Server") and then when that's finished shutting down, launch a new server and choose a "Resource Request" that includes a GPU. If you don't have a GPU option, please contact EASI Support.

When you have a GPU instance running, you should activate your custom environment (see below) and then the example notebooks should work.

Installing extra packages

For local development, you should be able to install the requirements listed in requirements.txt by running pip install -r requirements.txt.

Using EASI (the CSIRO Jupyter platform) you can set up a virtual environment following their instructions.

Custom requirements we need include:

pip install segment-geospatial leafmap localtileserver python-geohash odc-stac>=0.3.6

hyperspectral-notebooks's People

Contributors

alexgleith avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.