Skip to content

Run the LIME model, simulate lunar observations and compare them with real remote sensing data.

License

Notifications You must be signed in to change notification settings

LIME-ESA/lime_tbx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LIME Toolbox

Version 1.1.0 License: LGPL 3.0 Issues Stargazers


LIME logo

lime_tbx

Run the LIME model, simulate lunar observations and compare them with real remote sensing data.
Explore the docs »

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Development Guide
  6. License
  7. Authors

About the project

The lime_tbx is a Python package that provides a comprehensive toolbox for utilizing the Lunar Irradiance Model of ESA (LIME) to simulate lunar observations and compare them with remote sensing data of the Moon.

LIME is the Lunar Irradiance Model of the European Space Agency (ESA), which aims to determine an improved lunar irradiance model with sub-2% radiometric uncertainty.

This project is managed, financed and supported by the European Space Agency (ESA).

More information about LIME can be found on lime.uva.es.

Built with

  • Python
  • Qt
  • SPICE
  • EOCFI
  • CoMet Toolkit

Getting started

The LIME Toolbox is designed as an standalone desktop application that one can directly install without the need of installing Python or any other kind of software used in its development.

Prerequisites

The LIME Toolbox is compatible with the following operating systems and architectures:

  • Windows 10 with x86_64 arch.
  • Linux with GLIBC >= 2.23 and x86_64 arch.
  • Mac with x86_64 arch. or with ARM64 arch. and Rosetta interpreter.

Installation

One can download and install LIME TBX as a standalone desktop application on lime.uva.es/downloads.

Another option is installing the python package and its dependencies by using:

pip install -e .

Usage

Download the User Guide to fully explore the capabilities of the toolbox.

Roadmap

  • Toolbox compilation through Docker
    • Linux
    • Windows
    • Mac
  • Allow coefficients of more than six wavelengths, being as flexible as possible. (NFR107)
    • The TBX must accept coefficients that also include data for the 1088 CIMEL photometer's 2130 nm band. (NFR107-A)
    • The TBX must accept coefficients made for any response function specified in the coefficients file. (NFR107-B)
  • Improve the speed of uncertainties calculation. (NFR306)
  • Fully migrate project to GitHub (issues, CI pipeline, etc.)
  • Allow users to simulate series of lunar observations, where not only the time varies. (FR107)

See the open issues for a full list of proposed features (and known issues).

Development Guide

If you wish to contribute to the lime_tbx project, please check the Contributing Guide.

1. Setting Up the Environment

To prepare your development environment, follow these steps:

  1. Install Pre-commit Hooks
    Install the pre-commit hooks to automatically check code styling:
pre-commit install  
  • When you commit changes, black will check your code for styling errors.
  • If errors are found, they will be corrected, and the commit will be aborted to allow you to review the changes.
  • If you're satisfied, reattempt the commit.
  1. Install Python Dependencies
    Install the python package dependencies, preferably in a python virtual enironment:
pip install -r requirements.txt  

2. Project Structure

The structure of the lime_tbx Python package is visualized in the simplified composite structure diagram:

Refer to quality_documentation/uml/composite_structure.png for details about the organization of the components of the python package.


3. Testing

Run the following commands to ensure the code works as expected:

  1. Unit Tests
    To perform unit tests:
python3 -m unittest  
  1. Coverage Tests
    To generate a coverage report:
./coverage_run.sh  

4. Deployment

Deployed with:

  • Docker
  • PyInstaller
  • InnoSetup

The desktop app can be deployed automatically or manually. The first step of the deployment process is compiling the C code that accesses the EOCFI library. This step is not automated for some platforms like Windows. After that, one has to build the app bundle and create the installer, which is can be completely automated through Docker.

Automatic deployment (Recommended)

This process is automated through the usage of Docker, so the it first requires to build the docker image at least once, and then to run it each time one wants to deploy the app.

Linux

To build the image:

cd deployment
docker build .. -t lime_compiler -f Linux.Dockerfile

To run the container and deploy the app:

docker run -v $(dirname $(pwd)):/usr/src/app/repo lime_compiler
Windows

Windows automatic deployment doesn't perform the EOCFI C code compilation step. If one wishes to perform this step, please refer to the manual deployment section, step 1.

To build the image:

docker build . -t lime_compiler -f Windows.Dockerfile

To run the container and deploy the app:

for %F in ("%cd%") do set dirname=%~dpF
docker run -v %dirname%:C:\repo lime_compiler
Mac

The Mac automatic deployment is not available yet.

Manual deployment

Follow these steps to manually create a production-ready build for your machine:

Requirements:
  • Python 3.8 (Linux) or Python 3.9 (Mac and Windows).
  • pyinstaller installed outside of the virtual environment.
Show steps
  1. Compile C code for EOCFI

This step compiles the EOCFI C code and generates a binary that will be called from the toolbox. This isn't necessary unless the C source code has been modified or the former binary doesn't work for one's system.

In Linux or Mac:

cd lime_tbx\eocfi_adapter\eocfi_c
cp MakefileLinux Makefile # Linux
cp MakefileDarwin Makefile # Mac
make

In Windows:

cd lime_tbx\eocfi_adapter\eocfi_c
copy make.mak Makefile
nmake
  1. Create a Virtual Environment
    It's strongly recommended to use a virtual environment (venv) to minimize application size:
python -m venv .venv
source .venv/bin/activate  # For Linux/Mac  
.venv\Scripts\activate     # For Windows  
pip install -r requirements.txt  
  1. Build the App Bundle
    Use pyinstaller to create a desktop app-bundle for your OS:
pyinstaller lime_tbx.spec  

Deactivate the virtual environment when the build is complete.

  1. Create an Installer
    Use the appropriate method for your operating system:
  • Windows: Use "InnoSetup" and run inno_installer_builder.iss.
  • Mac: Execute build_mac_installer.sh.
  • Linux: Execute build_linux_installer.sh.
  • Debian: Execute build_deb.sh after creating the Linux installer.

Additional Information:

For more details on recommended environments for building TBX binaries, check the installer directory.

License

Distributed under the LGPL-v3 License. See LGPL v3 for more information.

Authors


ESA logoLogo of UVaLogo of NPLLogo of VITO

About

Run the LIME model, simulate lunar observations and compare them with real remote sensing data.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •