Coder Social home page Coder Social logo

classy's Introduction

Max Mahlke | arXiv | Thesis | CV | Contact

I'm an astronomer studying the minor bodies of the Solar System. My repositories include several open-source tools for the minor-body community and for researchers in general.

I'm available for PostDoc starting December 2024. Please do not hesitate to get in touch should you or someone you know offer a position that may apply to my research profile.

Minor Bodies

  • rocks - A python and command-line interface to all kinds of asteroid data except for reflectance spectra. GitHub Repo stars
  • classy - A python and command-line interface to asteroid reflectance spectra. And it classifies them, too. GitHub Repo stars
  • ssos - Pipeline for automatic detection and recovery of minor bodies in astronomical images. GitHub Repo stars
  • mpc - Make local queries to the observations database of the Minor Planet Center. GitHub Repo stars
  • Les Houches Index of Small-Body Tools - Maintained index of tools for Asteroids, Comets, and Meteorites GitHub Repo stars
  • Timeline of the asteroid taxonomy

General

  • fuzzy-ads - A command-line interface to NASA ADS GitHub Repo stars
  • mcfa - A python implementation of Mixture of Common Factor Analyzers dimensionality reduction / clustering GitHub Repo stars
  • re-research - A TeX publication template focused on reproducible research GitHub Repo stars
  • Solar-System Orbiter - Simulation of Solar System including Hohmann transfers between planets GitHub Repo stars

classy's People

Contributors

aripollak avatar maxmahlke avatar siltala avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

siltala

classy's Issues

Classy 0.6.3 silently depends on Qt libraries?

After upgrading from classy 0.6.1 to 0.6.3, running classy or importing it raises an ImportError:

% pipx run space-classy
NOTE: running app 'classy' from 'space-classy'
Traceback (most recent call last):
  File "/home/ari/.local/pipx/.cache/e893fcbad53a08d/bin/classy", line 5, in <module>
    from classy.cli import cli_classy
  File "/home/ari/.local/pipx/.cache/e893fcbad53a08d/lib/python3.11/site-packages/classy/__init__.py", line 7, in <module>
    from .core import Spectrum
  File "/home/ari/.local/pipx/.cache/e893fcbad53a08d/lib/python3.11/site-packages/classy/core.py", line 15, in <module>
    from classy import plotting
  File "/home/ari/.local/pipx/.cache/e893fcbad53a08d/lib/python3.11/site-packages/classy/plotting.py", line 12, in <module>
    from classy import taxonomies
  File "/home/ari/.local/pipx/.cache/e893fcbad53a08d/lib/python3.11/site-packages/classy/taxonomies/__init__.py", line 1, in <module>
    from . import bus, demeo, mahlke, tholen
  File "/home/ari/.local/pipx/.cache/e893fcbad53a08d/lib/python3.11/site-packages/classy/taxonomies/demeo.py", line 12, in <module>
    from classy import preprocessing
  File "/home/ari/.local/pipx/.cache/e893fcbad53a08d/lib/python3.11/site-packages/classy/preprocessing.py", line 6, in <module>
    from classy import gui
  File "/home/ari/.local/pipx/.cache/e893fcbad53a08d/lib/python3.11/site-packages/classy/gui.py", line 8, in <module>
    from matplotlib.backends.qt_compat import QtGui
  File "/home/ari/.local/pipx/.cache/e893fcbad53a08d/lib/python3.11/site-packages/matplotlib/backends/qt_compat.py", line 135, in <module>
    raise ImportError(
ImportError: Failed to import any of the following Qt binding modules: PyQt6, PySide6, PyQt5, PySide2

AttributeError when importing tensforflow probability

Hi Max,

I just installed classy on a Ubuntu system through pip and the Juno example on the Github readme does not work correctly on my end.

>>> import classy                                                                                                                                                                                                                          
>>> test = classy.Spectra(3)                                                                                                                                                                                                               
>>> test.classify()                                                                                                                                                                                                                        
Traceback (most recent call last):                                                                                                                                                                                                         
  File "<stdin>", line 1, in <module>                                                                                                                                                                                                      
  File "/home/lauri/.local/lib/python3.10/site-packages/classy/core.py", line 709, in classify                                                                                                                                             
    spec.classify(taxonomy=taxonomy)                                                                                                                                                                                                       
  File "/home/lauri/.local/lib/python3.10/site-packages/classy/core.py", line 294, in classify                                                                                                                                             
    getattr(taxonomies, taxonomy).classify(self)                                                                                                                                                                                           
  File "/home/lauri/.local/lib/python3.10/site-packages/classy/taxonomies/mahlke.py", line 59, in classify                                                                                                                                 
    model = data.load("mcfa")                                                                                                                                                                                                              
  File "/home/lauri/.local/lib/python3.10/site-packages/classy/data.py", line 90, in load                                                                                                                                                  
    return _load_mcfa()                                                                                                                                                                                                                    
  File "/home/lauri/.local/lib/python3.10/site-packages/classy/data.py", line 124, in _load_mcfa                                                                                                                                           
    import mcfa  # skip the heavy tensorflow import if it can be avoided                                                                                                                                                                   
  File "/home/lauri/.local/lib/python3.10/site-packages/mcfa/__init__.py", line 2, in <module>                                                                                                                                             
    from .core import MCFA                                                                                                                                                                                                                 
  File "/home/lauri/.local/lib/python3.10/site-packages/mcfa/core.py", line 18, in <module>                                                                                                                                                
    import tensorflow_probability as tfp                                                                                                                                                                                                   
  File "/home/lauri/.local/lib/python3.10/site-packages/tensorflow_probability/__init__.py", line 20, in <module>                                                                                                                          
    from tensorflow_probability import substrates                                                                                                                                                                                          
  File "/home/lauri/.local/lib/python3.10/site-packages/tensorflow_probability/substrates/__init__.py", line 17, in <module>                                                                                                               
    from tensorflow_probability.python.internal import all_util                                                                                                                                                                            
  File "/home/lauri/.local/lib/python3.10/site-packages/tensorflow_probability/python/__init__.py", line 138, in <module>                                                                                                                  
    dir(globals()[pkg_name])  # Forces loading the package from its lazy loader.                                                                                                                                                           
  File "/home/lauri/.local/lib/python3.10/site-packages/tensorflow_probability/python/internal/lazy_loader.py", line 57, in __dir__                                                                                                        
    module = self._load()
  File "/home/lauri/.local/lib/python3.10/site-packages/tensorflow_probability/python/internal/lazy_loader.py", line 40, in _load
    module = importlib.import_module(self.__name__)
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/home/lauri/.local/lib/python3.10/site-packages/tensorflow_probability/python/experimental/__init__.py", line 31, in <module>
    from tensorflow_probability.python.experimental import bijectors
  File "/home/lauri/.local/lib/python3.10/site-packages/tensorflow_probability/python/experimental/bijectors/__init__.py", line 17, in <module>
    from tensorflow_probability.python.bijectors.ldj_ratio import forward_log_det_jacobian_ratio
  File "/home/lauri/.local/lib/python3.10/site-packages/tensorflow_probability/python/bijectors/__init__.py", line 19, in <module>
    from tensorflow_probability.python.bijectors.absolute_value import AbsoluteValue
  File "/home/lauri/.local/lib/python3.10/site-packages/tensorflow_probability/python/bijectors/absolute_value.py", line 19, in <module>
    from tensorflow_probability.python.bijectors import bijector
  File "/home/lauri/.local/lib/python3.10/site-packages/tensorflow_probability/python/bijectors/bijector.py", line 34, in <module>
    from tensorflow_probability.python.math import generic as math_generic
  File "/home/lauri/.local/lib/python3.10/site-packages/tensorflow_probability/python/math/__init__.py", line 19, in <module>
    from tensorflow_probability.python.math import psd_kernels
  File "/home/lauri/.local/lib/python3.10/site-packages/tensorflow_probability/python/math/psd_kernels/__init__.py", line 18, in <module>
    from tensorflow_probability.python.math.psd_kernels.changepoint import ChangePoint
  File "/home/lauri/.local/lib/python3.10/site-packages/tensorflow_probability/python/math/psd_kernels/changepoint.py", line 28, in <module>
    from tensorflow_probability.python.math.psd_kernels import positive_semidefinite_kernel as psd_kernel
  File "/home/lauri/.local/lib/python3.10/site-packages/tensorflow_probability/python/math/psd_kernels/positive_semidefinite_kernel.py", line 1130, in <module>
    class AutoCompositeTensorPsdKernel(PositiveSemidefiniteKernel,
  File "/home/lauri/.local/lib/python3.10/site-packages/tensorflow_probability/python/math/psd_kernels/positive_semidefinite_kernel.py", line 1123, in __new__
    return auto_composite_tensor.auto_composite_tensor(
  File "/home/lauri/.local/lib/python3.10/site-packages/tensorflow_probability/python/internal/auto_composite_tensor.py", line 598, in auto_composite_tensor
    @type_spec_register(type_spec_name)
  File "/home/lauri/.local/lib/python3.10/site-packages/tensorflow_probability/python/internal/auto_composite_tensor.py", line 441, in type_spec_register
    if allow_overwrite and name in type_spec._NAME_TO_TYPE_SPEC:
AttributeError: module 'tensorflow.python.framework.type_spec' has no attribute '_NAME_TO_TYPE_SPEC'

classy status shows

classy status

Contents of /home/lauri/.cache/classy:

    68024 asteroid reflectance spectra from 11 sources
      
    24CAS      286    52CAS      146    AKARI       64    ECAS       589
    Gaia     60518    MITHNEOS  1905    Misc       877    PRIMASS    437
    S3OS2      820    SCAS       126    SMASS     2256

Choose one of these actions:
[0] Do nothing [1] Clear the cache [2] Retrieve all spectra (0): 

so the spectra are definitely in the cache.

Let me know if you need more details!

Feature request: sixel graphics

HI Max,

I like to work with the terminal and often over ssh. Especially with the latter, it means I cannot trivially get pretty plots of asteroid spectra.
My terminal of choice supports displaying graphics on the terminal (including over ssh!) through the sixel protocol, and I would love to have the ability to display graphics that way. I see you use matplotlib for creating these plots which has a sixel backend available, so I think in theory it should be easy to set up. If you want and think this is something you wouldn't mind having, I can see if I can hack something together on that front myself also.

Cheers,
Lauri

Pip install and dependencies

Hi Max, thanks for writing this project, I want to do statistics on the taxonomy of a couple dynamical families (given the asteroid numbers). After, I might try to ask for the taxonomy of some new spectra. But first, I'm trying to get space-classy to work with pip. There's some dependency issues.

pip install space-classy
python -m IPython
import classy

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
Cell In[1], line 1
----> 1 import classy

File ~/otherRepos/classy/classy/__init__.py:6
      2 import os
      4 os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3"
----> 6 from .log import set_log_level
      7 from .core import Spectrum
      8 from .core import Spectra

File ~/otherRepos/classy/classy/log.py:4
      1 """Configuration of classy logging messages."""
      3 import logging
----> 4 from rich.logging import RichHandler
      6 # Use rich to have colourful logging messages
      7 handler = RichHandler(rich_tracebacks=True, show_path=False, show_time=False)

ModuleNotFoundError: No module named 'rich'

I tried to see what all of the dependencies are by doing (see below), but the only requirement as jinja2.

pip show space-classy
Name: space-classy
Version: 0.1
Summary: classification tool for minor bodies using reflectance spectra and visual albedos
Home-page: https://github.com/maxmahlke/classy
Author: Max Mahlke
Author-email: [email protected]
License: MIT
Location: /opt/homebrew/lib/python3.10/site-packages
Requires: jinja2
Required-by: 

For traceability, my package version's are the following:

!python --version

Python 3.10.10
!pip list

Package            Version
------------------ ---------
appnope            0.1.3
artpop             0.1.1
astropy            5.2.1
asttokens          2.2.1
backcall           0.2.0
certifi            2022.12.7
charset-normalizer 3.1.0
comm               0.1.2
contourpy          1.0.7
cycler             0.11.0
debugpy            1.6.6
decorator          5.1.1
executing          1.2.0
fast-histogram     0.11
fonttools          4.38.0
galpy              1.8.1
h5py               3.8.0
idna               3.4
ipykernel          6.20.2
ipython            8.9.0
jedi               0.18.2
Jinja2             3.0.3
julia              0.6.1
jupyter_client     8.0.2
jupyter_core       5.2.0
kiwisolver         1.4.4
llvmlite           0.39.1
markdown-it-py     2.2.0
MarkupSafe         2.1.2
matplotlib         3.6.3
matplotlib-inline  0.1.6
mdurl              0.1.2
nest-asyncio       1.5.6
numba              0.56.4
numpy              1.23.5
packaging          23.0
pandas             1.5.3
parso              0.8.3
pexpect            4.8.0
pickleshare        0.7.5
Pillow             9.4.0
pip                23.0.1
platformdirs       2.6.2
prompt-toolkit     3.0.36
psutil             5.9.4
ptyprocess         0.7.0
pure-eval          0.2.2
pyerfa             2.0.0.3
Pygments           2.14.0
pyparsing          3.0.9
python-dateutil    2.8.2
pytz               2022.7.1
PyYAML             6.0
pyzmq              25.0.0
requests           2.28.2
rich               13.3.3
scipy              1.10.0
setuptools         67.2.0
six                1.16.0
space-classy       0.1
stack-data         0.6.2
tornado            6.2
traitlets          5.9.0
urllib3            1.26.15
wcwidth            0.2.6
wheel              0.38.4
zmq                0.0.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.