Isolating extragalactic stars

Alan BrunelleTony GondolaAnaTa
29 replies763 views
Tony Gondola avatar

Is there a way in PI to selectively isolate the dimmest stars in an image. What I’m trying to do is to see just the stars in an image that are actually in a galaxy rather than field stars. I can see patterns of dim stars that follow the geometry of the spiral arms of certain Galaxies and would love to find a way to isolate them. Any ideas?

Well written Respectful Engaging
Billy Buchanan avatar

You could try generating a star mask filtered by apparent magnitude in combination with SXT to remove and then only put back sufficiently bright stars.

Tony Gondola avatar

I’ve been trying it that way but the process is very hard to control. I can sort of do what I want but the extracted faint stars are always bloated.

Willem Jan Drijfhout avatar

Why would dim stars belong to the galaxy?


What you’re looking for is some sort of selection based on distance. The only tool I know of that can do that is the Herzsprung Russell diagram tool from CosmicPhotons. It is designed to separate field stars from stars that belong to a star cluster or something like that. It does this by looking up the distance and direction of movement from each star in the Simbad database. There are several parameters that let you set limits for what is included in the results. The goal of the tool is to plot those in an HR diagram, not select stars. So you’ll probably still somehow have to select stars manually based on the info that the tool will give you.

But do you expect much/any stars? Most if not all galaxies will be much too far away to see any individual stars.

Well written Helpful Engaging Supportive
Roger Ménard avatar

I understand what you are saying Tony. All those stars aligned in the spiral arms of the galaxies can not belong to our own galaxy. This would be an improbable chance alignment. Especially when those stars are blue and we know that spiral arms usually host young stars. But how to select them automatically, I don’t have a clue. Similar question for the Andromeda galaxy. Our hi-res photos reveal thousands of stars that surely belong to that galaxy just looking at the way they are distributed. But again how to separate them? no clue. I’m eager to hear others on this.

Well written Respectful Engaging
TiffsAndAstro avatar

Stars in other galaxies are to far away to be individually resolved, surely?

Supernovae excepted :)

Tony Gondola avatar

Willem Jan Drijfhout · May 20, 2026, 06:05 PM

Why would dim stars belong to the galaxy?


What you’re looking for is some sort of selection based on distance. The only tool I know of that can do that is the Herzsprung Russell diagram tool from CosmicPhotons. It is designed to separate field stars from stars that belong to a star cluster or something like that. It does this by looking up the distance and direction of movement from each star in the Simbad database. There are several parameters that let you set limits for what is included in the results. The goal of the tool is to plot those in an HR diagram, not select stars. So you’ll probably still somehow have to select stars manually based on the info that the tool will give you.

But do you expect much/any stars? Most if not all galaxies will be much too far away to see any individual stars.

It’s subjective of course but when you see a lot of dim stars following the outline of the spiral arms and none or very few in the surrounding field, it’s a pretty safe bet that it’s not just random line of sight.

As for actually resolving stars it depends on aperture. With 150mm aperture you can certainly do it in the few close examples like M33 and M31.

I didn’t know about that HR tool so that’s a good tip, I’ll take a look at it.

Well written Helpful Respectful Concise Engaging Supportive
Tony Gondola avatar

It should be noted that the brightest stars in M33 and M31come in at around magnitude 15.5

With the high QE cameras we have today that should be well within reach.

Helpful Concise
Roger Ménard avatar

Absolutely. I reach mag 20.9 with my stacks of 6-min subs and my C14.

Alan Brunelle avatar

TiffsAndAstro · May 20, 2026, 06:52 PM

Stars in other galaxies are to far away to be individually resolved, surely?

Supernovae excepted :)

Actually, not true. Even in relatively small aperature telescopes, super giant stars can be seen in our closest galactic neighbors, such as M31. For M31, such aperatures such as 14 inch optics will start to resolve some of the less bright field stars, making M31 outskirts begin to show a granular nature because of the improved resolution.

Helpful
Wei-Hao Wang avatar

Those are actually star clusters, unless you are talking about galaxies in the local group like M31 and M33.

Well written Concise
Alan Brunelle avatar

Tony Gondola · May 20, 2026, 04:19 PM

Is there a way in PI to selectively isolate the dimmest stars in an image. What I’m trying to do is to see just the stars in an image that are actually in a galaxy rather than field stars. I can see patterns of dim stars that follow the geometry of the spiral arms of certain Galaxies and would love to find a way to isolate them. Any ideas?

I have not figured a way to do so, so will be monitoring the answers on this thread for a good resolution. So far, I have seen none. In any case, it is a worthy goal. If you look at my M31, particularly this one (https://app.astrobin.com/i/4emmpp), you will see my M31 in what I title my series of ExtraGalactic Traveler’s View images. This image, with a 91mm refractor has the goal of including all objects that are not part of the Milky Way, including the stars of M31 that are visible. The process for this image took me more than 6 weeks of work. It is tedious and painstaking work, but exact and accurate. Luckily, the online sources include the M31 stars and accurately assigns them to M31. And there are not so many MW stars as to be impossible. However, the many resolvable globular clusters of M31 are a challenge, but are mostly also charted. These would also need to be included, if accuracy is an issue. See here: https://app.astrobin.com/i/h941n7d Luckily for me, at 91mm, mostly only the supergiant stars are notably visible. This make the work easier. It is a worthy effort, whether anyone is interested in an extragalactic view image, or even if including MW stars for a traditional presentation. The reason I say this is that nearly 90% of M31 images are flawed when the processor choosed to use star-reduction to lower the influence of MW stars. Doing so using most methods almost always causes the stars of M31 to be greatly diminished, or, not uncommonly, removed entirely! How often do you see an M31 with NGC 206 looking nothing more than a faint, diffuse bluish patch?! The stars of m31 properly processed gives M31 the sparkle that these supergiants and OB associations deserve. These are truly visible features, much more real than the overblown HII regions that often get overstretched and added back to M31 images.

For M31, I processed data from Hellas-Sky’s 14 inch RASA with the hope of doing an ExtraGalactic Traveler"‘s View image, however, the 14 inch RASA turned out to resolve, not just the supergiant Blue, Red and Yellow stars, but also many of the field stars of M31, M110, etc. in the frame. See here: https://app.astrobin.com/i/t0c0d6 With the description showing the resolution and the reason that seeing thiese field stars made my process impossible to execute on this data. If I was going to do a faithful representation, it would take me years.

For the rest of my ExtraGalactic catalogue, I have done images of objects too far away to resolve any stars at the distance of the objects being presented. Still, it is a challenge to remove all MW stars without removing the still visible globular clusters and distant star-like galaxies, which I want to preserve in these presentations. Additionally, StarXTerminator is notorious for removing almost all disant galaxies, and even a good number of plainly obvious galaxies, which make my work a challenge. Doing these images takes me a lot of time, with my 14 inch RASA 2-panel Virgo Cluster ExtraGalactic presentation (https://app.astrobin.com/i/gkudu5) and the Virgo Cluster visual maps that I published this year over 5 months to process. BTW, for accuracy, I do check my work against the catalogs to ensure some level of accuracy, but doing this work makes me bug-eyed and I make no guarantees!

So if you come up with a better way, let me know! What I would like (and apparently also you) would be a StarXTerminator that would check each star removal against the GAIA, NED, etc. catalogs and then return or leave objects that it fails to confirm is a star.

Good luck!

Alan

Alan Brunelle avatar

I should add, that just retaining the dimmest stars during a StarX process will not work, for the reasons stated above by me and others. But it might get you part of the way there. In any case, there are just too many stars that are faint and part of the MW and any such global tricks are likely to contain errors. However, if accuracy is not the primary objective, then it might be acceptable to you to try this approach. For my M31 image, there were MW stars within some of the OB association super giants that looked every bit like one of those OB giants, but was MW. Nothing to do, but cross-check with the catalogs. If you don’t care about accuracy, the effect of leaving those few MW stars is not so bad. With the 14 inch image I processed, the issues become magnitudes more challenging.

Oh, and I forgot to mention in my previous post, that I am happy to share my process with anyone. It just is not a lesson that I can do with a simple text reply. When I mention that it took me 5-6 months to do the Virgo Cluster, no one has ever asked me to teach them!

Alan Brunelle avatar

Wei-Hao Wang · May 20, 2026, 10:55 PM

Those are actually star clusters, unless you are talking about galaxies in the local group like M31 and M33.

No doubt, some are actually star clusters. Some are in fact stars. Checked and bona fide! And M31, etc are what I was referring too. See my other comments with links. Certainly more distant would only be clusters, depending on distance and aperature used.

Mikołaj Wadowski avatar

You can achieve this quite easily with a very repeatable method:

  1. Extract stars with starx/starnet

  2. Use the CatalogStarGenerator script to create a star mask. Gaia DR3 works best if you have the full database downloaded locally, but Gaia DR2 should be fine otherwise.
    Background = 25mag
    Max mag = 25mag
    Saturation mag = >15
    FWHM = your image FWHM in arcseconds
    Beta = 3

  3. Stretch the mask image linearly until the faintest stars in the mask have clipped cores plus a little bit more. Keep the background dark but not clipped

  4. Apply the mask to the star-only image. At this stage it should protect the star cores. If it doesn’t CRTL + SHIFT + I inverts the mask in Pixinsight

  5. Remove large scale MMT layers, I usually go for >=32px or sometimes >=64px. This should remove the overall “glow” and halos from the star-only image

  6. Stretch the mask image linearly so it’s 10-20x brighter while still keeping the background very dark. Invert the mask and use pixelmath with just 0 as the expression on the star-only image. This should remove all of the stars from the star-only image while leaving non-stellar stuff behind. Ideally, there shouldn’t be any star halos left.

  7. Add the "star only" image back to the starless image.

For the closest galaxies this might not work perfectly. Gaia has a lot of M33 and M31 stars/star clusters in the database for instance making it effectively useless. Occasionally galaxies or clearly extragalactic stars are included in the database. In these cases you can clone stamp them out from the mask manually. When it comes to diffraction spikes, I would just clone stamp them out, though I suppose you could add a diffraction spikes model to the star mask if you wanted to.
Not all stars will be removed as it seems like the limiting magnitude of Gaia DR3 is slightly dimmer than 21mag, but at that point most dots in your image are galaxies anyway. For most of them you can tell as they’re just ever so slightly elongated.

Here’s how the results should look like with an admittedly sloppy clone stamp job on the brighter spikes.
image.pngimage.png

Well written Helpful Engaging Supportive
Tony Gondola avatar

Wei-Hao Wang · May 20, 2026, 10:55 PM

Those are actually star clusters, unless you are talking about galaxies in the local group like M31 and M33.

That’s exactly what’s being discussed.

Alan Brunelle avatar

Mikołaj Wadowski · May 21, 2026, 12:28 AM

You can achieve this quite easily with a very repeatable method:

  1. Extract stars with starx/starnet

  2. Use the CatalogStarGenerator script to create a star mask. Gaia DR3 works best if you have the full database downloaded locally, but Gaia DR2 should be fine otherwise.
    Background = 25mag
    Max mag = 25mag
    Saturation mag = >15
    FWHM = your image FWHM in arcseconds
    Beta = 3

  3. Stretch the mask image linearly until the faintest stars in the mask have clipped cores plus a little bit more. Keep the background dark but not clipped

  4. Apply the mask to the star-only image. At this stage it should protect the star cores. If it doesn’t CRTL + SHIFT + I inverts the mask in Pixinsight

  5. Remove large scale MMT layers, I usually go for >=32px or sometimes >=64px. This should remove the overall “glow” and halos from the star-only image

  6. Stretch the mask image linearly so it’s 10-20x brighter while still keeping the background very dark. Invert the mask and use pixelmath with just 0 as the expression on the star-only image. This should remove all of the stars from the star-only image while leaving non-stellar stuff behind. Ideally, there shouldn’t be any star halos left.

  7. Add the "star only" image back to the starless image.

For the closest galaxies this might not work perfectly. Gaia has a lot of M33 and M31 stars/star clusters in the database for instance making it effectively useless. Occasionally galaxies or clearly extragalactic stars are included in the database. In these cases you can clone stamp them out from the mask manually. When it comes to diffraction spikes, I would just clone stamp them out, though I suppose you could add a diffraction spikes model to the star mask if you wanted to.
Not all stars will be removed as it seems like the limiting magnitude of Gaia DR3 is slightly dimmer than 21mag, but at that point most dots in your image are galaxies anyway. For most of them you can tell as they’re just ever so slightly elongated.

Here’s how the results should look like with an admittedly sloppy clone stamp job on the brighter spikes.
image.pngimage.png

Thanks! This is an interesting process. I have a few worries, but won't even think of being critical until I give it a try. And a good college try at that! I may revisit the RASA 36 data of M31 that I have as a great test. With that, I am not so worried about dealing with listed stars that are at the location of M31. I have methods that deal with those just fine. But if I can separate the discrete stars (both MW and even M31 stars) from the field stars, then I can do it and just replace the M31 stars manually. The issue I had with StarXTerminator is that SXT recognized and removed about half of the dim field stars of M31, m110, etc and those likely numbered in the hundreds of thousands to maybe a million. I might be able to remove those from the stars-only image/mask with some trickery.

Well written Respectful Engaging Supportive
AnaTa avatar

Resolution depends on seeing and scope-camera cambo - providing image scale. There is no need in 14” scope for image scale 0.5”/pixel.

Alan Brunelle avatar

AnaTa · May 21, 2026, 05:35 AM

Resolution depends on seeing and scope-camera cambo - providing image scale. There is no need in 14” scope for image scale 0.5”/pixel.

I’m not sure I understand what you are trying to say. If you read my post of the M31 image from the 14 inch RASA, you will see practically that field stars are visible and resolvable in areas of the galaxies discussed that are not so dense as to suffer from a high degree of overlap, such as closer to the galaxy cores. For example, it can clearly be seen that M110 more resembles a huge globular cluster than what is normally seen as a very smooth stellar gradient. This is a practical result, not a calculation of what theoretically can be seen under ideal situations. The data was purchased data and I don't have any idea what the seeing was like, nor do I need to know.

Some might wish to believe that what I am seeing in the data is simply noise. I can assure you that I tested that hypothesis. It is not. And I chose several specific areas to examine stellar patterns of the field stars and confirmed they were stars by finding the same ones in images from much more powerful telescopes that more clearly and definitively resolved these stars.

Well written
AnaTa avatar

Resolution (FWHM) depends on image scale not size of scope, which defines SNR. It doesn’t matter what you see on photo. I am telling about actual resolution. For example, 10 closely positioned dim stars could be detected by your RASA as one dim star.

Helpful Concise
John Hayes avatar

Putting aside why you want to do this, here’s the approach I would use to mask out the brightest stars.

1) Apply SXT to create a stars only image

2) Use MMT to filter out the smallest stars leaving only the larger stars.

3) Use PixelMath to subtract the large stars from the stars only image.

4) Use PixelMath to screen the stars back into the object only image.

I’m leaving out a few details that might be sticky but in general, this sort of approach should work.

John

Well written Helpful Respectful Concise Engaging Supportive
Don Woelz avatar

To image a star in M31, the closest galaxy to us, you would need a telescope capable of 0.1 to 0.3 arcsec resolution. You are probably not seeing individual stars, only clusters or bright reflection nebulae being illuminated by star clusters. And magnitude is not a measure of distance unless you know the intrinsic brightness of the star. The only star you are likely to see in a remote galaxy with most amateur equipment is a supernova.

Well written Helpful Engaging
Tony Gondola avatar

I’m not sure I agree. My thinking is it’s not a matter of resolution but of magnitude limits. Point sources like stars are never actually resolved in the sense of not being imaged as a point source so I don’t know why that would be a constraint. Yes, I do agree that very compact associations of bright stars that are below the resolution limit can look like a single star in an image but I don’t think this is always the case.

Helpful Respectful Concise Engaging
AnaTa avatar

This is not entirely correct. In NGC 206, separation between stars can reach 1.5”. Their magnitude is 17-20. I separated them. You could see my astrophoto of NGC 206.

Clear Skies!

Helpful
Tony Gondola avatar

John Hayes · May 21, 2026, 03:11 PM

Putting aside why you want to do this, here’s the approach I would use to mask out the brightest stars.

1) Apply SXT to create a stars only image

2) Use MMT to filter out the smallest stars leaving only the larger stars.

3) Use PixelMath to subtract the large stars from the stars only image.

4) Use PixelMath to screen the stars back into the object only image.

I’m leaving out a few details that might be sticky but in general, this sort of approach should work.

John

Honest answer is that it’s been such a long run of cloudy weather here in Oklahoma, I’m suffering from processing withdrawal.

Just started thinking if there was way a way to just remove just the stars that are part of our Galaxy from an old image of M33 I had. Here’s what I get when doing a star subtraction based solely on size. Mouse over to see original and star reduced versions.

https://app.astrobin.com/i/2u80zg?r=E

Of course, not being based on catalog data it’s not going to be perfect. Also, finding the right maximum star size needs to be refined. Some star like objects that should be there have been removed so that needs some work. anyway, it’s a fun exercise for a cloudy afternoon.

Well written Respectful Concise Engaging