Skip to content
Discussion options

You must be logged in to vote

Exactly, one galaxy per image. But in some cases, it can contain secondary objects to be ignored. I need to consider only the main object (galaxy) in the center.

I see. So the problem is that ideally sep.extract would return exactly one object (len(objs) == 1). However, you may have other detections in the image due to noise, or other galaxies you wish to ignore. If you know where on the image the object of interest is, I'd recommend selecting it from the array of objects based on position, like

mask = (objs["x"] > xmin) & (objs["x"] < xmax) &  (objs["y"] > ymin) & (objs["y"] < ymax)
objects_in_box = objs[mask]
object_of_interest = objects_in_box[0]  # hopefully exactly one galaxy is in…

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@igorkolesnikov13
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@igorkolesnikov13
Comment options

Answer selected by igorkolesnikov13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants