Getting Started¶
A word on notation: All example code preceded by a $ is to be run on your terminal,
while >>> indicates that this code should be run in a python interpreter or a python
script.
Installation¶
classy is available on the python package index as
space-classy. To get the complete package and all dependencies, run
$ pip install space-classy[gui] # install complete version
The feature detection and preprocessing modules of classy require the
pyqtgraph and pyside6 packages, which depend on the large (in terms of
filesize) Qt library. You might want to opt out of these installs if you do
not intend to make use of these parts of classy (though usage will be quite
limited). In this case, you can run
$ pip install space-classy # install lite version
The minimum python version is 3.8.
After installing, the classy command is available on your command line.
If you run it without argument, the help text will appear, as shown below. Typically, you will
later add an argument such as status, spectra, or classify, which are explained in
later parts of this documentation.
In python, you can import the classy module after installation.
$ classy
Usage: classy [OPTIONS] COMMAND [ARGS]...
CLI for minor body classification.
Options:
--version Show the version and exit.
--help Show this message and exit.
Commands:
add Add a local spectra collection.
classify Classify spectra in classy index.
docs Open documentation in browser.
features Run interactive feature detection for selected spectra.
smooth Run interactive smoothing for selected spectra.
spectra Search for spectra in classy index.
status Manage the index of asteroid spectra.
>>> import classy
Adding Spectra¶
classy revolves around reflectance spectra. To get started, you can
retrieve all public asteroid spectra by running the following
command on your terminal:
$ classy status
At the shown prompt, type 2 and hit Enter to download public spectra.[1]
$ classy status
Contents of /home/max/.cache/classy:
0 asteroid reflectance spectra from 0 sources
Choose one of these actions:
[0] Do nothing [1] Manage the cache [2] Retrieve all spectra (0): 2
Alternatively, you can add you own observations.
Once you have populated the classy database, you can start exploring it.