Sextractor deblending

Robert Lancaster rlancaste at gmail.com
Tue Apr 14 14:35:27 BST 2020


Hi Akarsh,

Plate solving is a very interesting topic.  It is very complex and yes there are many options, in fact so many that it almost becomes an art more than a science.  There are many packages that can plate solve today, but chief among them is astrometry.net <http://astrometry.net/> and other code based on astrometry.net <http://astrometry.net/>.  There are a couple of parts to plate solving an image:

1. Acquire and load the image 
2. Find the stars in the image
3. Compare the star positions to known star positions to find where it is in the sky.

So steps 1 and 2 sound easy enough, but they really aren’t as easy as you think.  Astrometry.net <http://astrometry.net/> and over solvers typically rely on other programs to accomplish those tasks and then just focus on step 3.  For astrometry.net <http://astrometry.net/>, if you give it an image, it uses python code, external image libraries and programs like cfitsio, netpbm, libjpeg, and others to load the image and then do the star extraction.  The biggest challenge I have found to getting astrometry.net <http://astrometry.net/> working on MacOS, Windows and other machines is just getting it set up and configured correctly so that it can run with all of these external programs.  On Linux, which astrometry.net <http://astrometry.net/> was designed for, you can just specify those as dependencies and it will just work.  So in February of this year, when I was helping yet another user trying to get python working properly on his MacOs machine, I got frustrated and decided to seek out a different method that wouldn’t require python and so many external programs that are a pain to install.   I found that sextractor could work wonderfully for this purpose and could basically replace python, netpbm, and most of the external code and configuration steps.  So I introduced that into KStars as an alternate option users could choose if they had trouble with astrometry.net’s traditional configuration.  In terms of the options for sextractor that I used, at the time I didn’t worry about most of them since the defaults would probably be fine and I just got it running with the most basic options and settings possible.  I was really shocked when we found out that in fact my alternative solution, not only solved the problem I was trying to address, but actually worked better than the traditional way of using astrometry.net <http://astrometry.net/>.  It solved images in significantly less time.  So there are many options to sextractor, but most of them can be left to the defaults for now.  I am currently exploring the other settings to see what difference they can make.

So based on my initial success with using Sextractor combined with Astrometry.net <http://astrometry.net/>, I got to thinking that in fact we already were using a library version of Sextractor called SEP in KStars to do a number of tasks and I was wondering if it might be possible to do something similar with astrometry.net <http://astrometry.net/>.  Using these programs as internal libraries would save the user from having to install/configure them, would simplify the installation of KStars, would avoid having to use external program calls to accomplish tasks, etc.  But I knew that if I started trying to do that in KStars, I would get slowed down by all of the other distractions in KStars, so I decided that the best approach would be to take all of the code that is relevant to loading images, extracting them, and solving them into a separate program so that I could just play around and see what I could do with it.  And even if it wasn’t possible to make astrometry.net <http://astrometry.net/> a library, we could just use this program to try to perfect the algorithms and settings for loading, sextracting, and plate solving images to make KStars do it better.   As I started playing with that, I found that it was working pretty well, and I kept increasing the scope of what I was trying to do.  Also, I knew that the reason we can’t do plate solving as easily on windows computers is because of all of the reliance on POSIX code, running external programs, and similar issues.  But as I explored the astrometry code, I found that quite a lot of the code could just be eliminated if we used sextractor to get the stars from the image and just focus astrometry.net <http://astrometry.net/> on solving only.  So I got even more bold and after about a month of work in my spare time, I managed to get it working on windows!   So now, after about 2 months of work, I have created a package that works on Mac, Windows, and Linux, that can be run as an internal library in KStars, that makes no external temporary files, doesn’t run any external programs, and can be used to thoroughly test all of those settings so that we can perfect them for KStars.  I am calling it SexySolver because it combines the library version of Sextractor and the astrometry.net <http://astrometry.net/> solver engine to make it work.

So now my plan is to put some finishing touches on it and send out my tester program so that people can start testing this on images, playing with settings so that we can perfect those settings, fix problems etc.  After we get it perfected, then we can plop the internal libraries into KStars and use that for star extraction, HFR calculations, plate solving, focusing, and maybe even guiding

Some Useful Links:

Astrometry.net <http://astrometry.net/> Documentation: http://astrometry.net/doc/readme.html <http://astrometry.net/doc/readme.html>
Sextractor/SEP Documentation: https://sep.readthedocs.io/en/v1.0.x/ <https://sep.readthedocs.io/en/v1.0.x/>
Sextractor Manual: https://www.astromatic.net/pubsvn/software/sextractor/trunk/doc/sextractor.pdf <https://www.astromatic.net/pubsvn/software/sextractor/trunk/doc/sextractor.pdf>

My new SexySolver tester and Library: https://github.com/rlancaste/sexysolver-tester <https://github.com/rlancaste/sexysolver-tester>

Thanks,

Rob



> On Apr 14, 2020, at 4:44 AM, Akarsh Simha <akarsh at utexas.edu> wrote:
> 
> Sorry this is going slightly OT, but I'm a newbie to all of this, and am trying to get a sense of how to plate solve. Would you be able to point me to some documentation / information about all of these options to sextractor, what SexySolver is, etc.?
> 
> Regards
> Akarsh
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kstars-devel/attachments/20200414/cf1f47e6/attachment.html>


More information about the Kstars-devel mailing list