Skip to content

Commit

Permalink
add usage readme
Browse files Browse the repository at this point in the history
  • Loading branch information
lcvl41 committed Nov 29, 2024
1 parent e62973a commit 9ec8c59
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,64 @@ main use cases.
properties as a fast alternative to [[https://biosnicar.vercel.app/][biosnicar]].
- *inverse mode*: infer surface properties from snow spectral albedo
observations.

* Installation

=snowlaps= can be installed via the command line with [[https://docs.conda.io/en/latest/][conda]] and [[https://pip.pypa.io/en/stable/][pip]]:

#+begin_src shell :results verbatim

# clone repository in the folder of your choice
git clone [email protected]:openosmia/snowlaps.git

# move into snowlaps directory
cd snowlaps

# create conda environment
conda env create -f environment.yml

# activate conda environment
conda activate snowlaps

# install snowlaps
pip install -e .

#+end_src

Installation can be sped up using the fast cross-platform package
manager [[https://mamba.readthedocs.io/en/latest/][mamba]] (reimplementation of the conda package manager in C++),
simply use =mamba= instead of =conda= in the instructions above.

* Usage

=snowlaps= can be used directly as a Python package or interactively
via a Streamlit app.

** Running the code

Example scripts are provided in [[https://github.com/openosmia/snowlaps/tree/main/examples][snowlaps/examples]].

- *example 1*: forward run of the snowlaps emulator
- *example 2*: inversion of hyperspectral albedo measurements
- *example 3*: comparison of snowlaps and biosnicar predictions

** Using the app

The Streamlit app can be run locally via the terminal:

#+begin_src shell :results verbatim

# move into snowlaps directory
cd snowlaps

# start Streamlit app on http://localhost:8501
./start_app.sh

#+end_src


[[./data/assets/app_forward.png]]




Binary file added data/assets/app_forward.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9ec8c59

Please sign in to comment.