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
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.
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.
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.
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 .
Download the User Guide to fully explore the capabilities of the toolbox.
- 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).
If you wish to contribute to the lime_tbx project, please check the Contributing Guide.
To prepare your development environment, follow these steps:
- 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.
- Install Python Dependencies
Install the python package dependencies, preferably in a python virtual enironment:
pip install -r requirements.txt
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.
Run the following commands to ensure the code works as expected:
- Unit Tests
To perform unit tests:
python3 -m unittest
- Coverage Tests
To generate a coverage report:
./coverage_run.sh
Deployed with:
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.
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.
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 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
The Mac automatic deployment is not available yet.
Follow these steps to manually create a production-ready build for your machine:
- Python 3.8 (Linux) or Python 3.9 (Mac and Windows).
pyinstaller
installed outside of the virtual environment.
Show steps
- 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
- 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
- Build the App Bundle
Usepyinstaller
to create a desktop app-bundle for your OS:
pyinstaller lime_tbx.spec
Deactivate the virtual environment when the build is complete.
- 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.
For more details on recommended environments for building TBX binaries, check the installer
directory.
Distributed under the LGPL-v3 License. See LGPL v3 for more information.
- Javier Gatón Herguedas - GOA-UVa
- Pieter De Vis - NPL
- Stefan Adriaensen - VITO
- Jacob Fahy - NPL
- Ramiro González Catón - GOA-UVa
- Carlos Toledano - GOA-UVa
- África Barreto - AEMET
- Agnieszka Bialek - NPL
- Marc Bouvet - ESA