astrorama / SourceXtractorPlusPlus

SourceXtractor++, the next generation SExtractor
https://astrorama.github.io/SourceXtractorPlusPlus/
GNU Lesser General Public License v3.0
72 stars 9 forks source link

Refactor the dictionaries on the Python side #503

Closed ayllon closed 1 year ago

ayllon commented 1 year ago

Refactor the global dictionaries as attributes of a class, and make a global instance so the current API can be preserved. These global can be problematic to call sourcextractor from Python, specially if someone wants to call sourcextractor from notebooks or ipython.

There are some dirty hacks in place to keep API compatibility, though.

Eventually, the call to setupContext that recovers the global could be replaced with an explicit setupContext(context)