Python Forum
Find the centroids of all the stars in a fits image
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Find the centroids of all the stars in a fits image
#1
I have a fits image including multiple stars, for each of which I want to find the centroid.
Here is an example image file.

Image file(fits format): https://www.dropbox.com/s/dm6rnse41a7sum....fits?dl=0

The python code below gives a 2D density map of the image file above:
fits_filename = 'imgData.fits'
self.pixels = astropy.io.fits.getdata(fits_filename)
plt.figure()
plt.imshow(self.pixels)
plt.show()
The result: https://www.dropbox.com/s/ry22u9v91wdxzf...1.png?dl=0

I'm a beginner in Python and a stranger for a vast variety of Python functions. Therefore I want to see many ideas. How do you guys implement this purpose in Python?
Reply
#2
Looking at the result picture, can you explain a little bit more detailed what you want to do with it.
I don´t understand "finding the centroid".
Reply
#3
(Jul-26-2019, 03:17 PM)ThomasL Wrote: Looking at the result picture, can you explain a little bit more detailed what you want to do with it.
I don´t understand "finding the centroid".

You can see many dots(stars) in the image. I want to get the centroid position of each star in the image.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020