This Library provides a C++ interface querying, reading and writing Naif SPICE kernels. Built on the [Naif Toolkit](https://naif.jpl.nasa.gov/naif/toolkit.html).
## Building The Library
The library leverages anaconda to maintain all of its dependencies. So in order to build SpiceQL, you'll need to have Anaconda installed.
## Getting Started
> **NOTE**:If you already have Anaconda installed, skip to step 3.
We reccomend installing using [miniforge](https://github.com/conda-forge/miniforge)
1. Download either the Anaconda or Miniconda installation script for your OS platform. Anaconda is a much larger distribtion of packages supporting scientific python, while Miniconda is a minimal installation and not as large: Anaconda installer, Miniconda installer
1. If you are running on some variant of Linux, open a terminal window in the directory where you downloaded the script, and run the following commands. In this example, we chose to do a full install of Anaconda, and our OS is Linux-based. Your file name may be different depending on your environment.
* If you are running Mac OS X, a pkg file (which looks similar to Anaconda3-5.3.0-MacOSX-x86_64.pkg) will be downloaded. Double-click on the file to start the installation process.
1. Open a Command line prompt and run the following commands:
```
mamba install -c conda-forge spiceql
```
```bash
# Clone the Github repo, note the recursive flag, this library depends on
# submodules that also need to be cloned. --recurse-submodules enables this and
You can disable different components of the build by setting the CMAKE variables `SPICEQL_BUILD_DOCS`, `SPICEQL_BUILD_TESTS`, `SPICEQL_BUILD_BINDINGS`, or `SPICEQL_BUILD_LIB` to `OFF`. For example, the following cmake configuration command will not build the documentation or the tests:
# Make a query and it will return the kernels used
The SpiceQL API is available via Python bindings in the module `pyspiceql`. The bindings are built using SWIG and are on by default. You can disable the bindings in your build by setting `SPICEQL_BUILD_BINDINGS` to `OFF` when configuring your build.
### Online Interface
## Memoization Header Library
Some functions allow for running over the web, these contain the optional parameter `useWeb`. See the [function list](SpiceQLCPPAPI/namespace_spice_q_l.md) for a list of functions with this parameter.
SpiceQL has a simple memoization header only library at `Spiceql/include/memo.h`. This can cache function results on disk using a binary archive format mapped using a combined hash of a function ID and its input parameters.
=== "Python"
TLDR
```C++
#include "memo.h"
```python
import pyspiceql as psql
int func(int) { ... }
memoization::disk c("cache_path");
# Make a query and it will return the kernels used