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

Call sourcextractor++ from Python #522

Open ayllon opened 1 year ago

ayllon commented 1 year ago

SourceXtractorDemo.py can help you see how it can be used.

Closes #179

ayllon commented 1 year ago

The last commits should make the handling of errors and multi-threading somewhat more reliable. Not yet supported: error interception from a custom output handler (you can write one, but context does not expose the errors, should be relatively easy to do so, though), nor custom segmentation.

ayllon commented 1 year ago

Not yet supported: error interception from a custom output handler (you can write one, but context does not expose the errors, should be relatively easy to do so, though), nor custom segmentation.

Both done! But no custom grouping yet.

CustomSegmentationDemo.py is an example of a very naive custom segmentation that sends sources to sourcextractor++. Good for the demo?

Of course, you can not rely on this custom segmentation, but looking at the cross-match

crossmatch

the rest of the pipeline seems to pick well on these objects.

ayllon commented 1 year ago

And a primitive custom grouping.

ayllon commented 1 year ago

And here is the live preview demo

It is not intended for production. I have my doubts it will scale! It may be better to add the pixels by hand rather than having one artist per source, but you can get an idea of how to do it.