<p>Unfortunately, simple photon counts are not going to get you to stellar magnitudes, because the response of the telescope is not perfectly linear or set to a consistent zeropoint. The <a href="https://www.stsci.edu/hst/instrumentation/wfc3/data-analysis/psf" rel="nofollow noreferrer">point-spread function</a> of a telescope describes how the light from a point source, like a star, will be warped, spread out, and recorded by the CCD. This needs to be modeled using software like e.g. <a href="http://americano.dolphinsim.com/dolphot/" rel="nofollow noreferrer">DOLPHOT</a> or DAOPHOT in order to extract magnitudes for the stars in your field.</p>

CC BY-SA 4.0
2023-10-09T08:49:31.363Z
Your answer is not wrong but is not the whole story. It is possible with a few reasonable simplifying assumptions to derive stellar magnitudes from the photon counts - this is the basis of aperture photometry. With the assumption that the PSF doesn't vary much across the field of view and it can be well captured within a circle of a particular radius, you can derive *instrumental* magnitudes from $-2.5\times\log_{10}(counts)$ and compare these with catalog magnitudes to determine the zeropoint and calibrated mags. How good these will be depends a lot on the details of the observing system
astrosnapper
CC BY-SA 4.0
2023-10-09T11:15:48.383Z
I agree wit @astrosnapper - you should be able to take the log of the number of adu determined by aperture photometry (so long as the aperture is big enough to contain most of the PSF) as being the magnitude, with a zero-point offset which you don't care about if you're just trying to find the period (unless the zero point varies with time). If there is non-linearity then I guess that only would affect the amplitude of the pulsation period you determined, not its period.
ProfRob
CC BY-SA 4.0
2023-10-09T17:25:48.727Z
That's great, thanks all for helping to clear things up.
ergoldan675
CC BY-SA 4.0
2023-10-09T08:09:29.017Z
2023-10-09T08:19:11.313Z
2023-10-09T08:19:11.313Z
Elias
<p>I'm currently working on a project which involves measuring several Cepheids to determine the distance to a galaxy. I have been using 12 images from the Hubble telescope taken over a period of about a month. I have been recording the data shown in the attached image using ds9 software. I'm unsure what to do with this data, does the 'sum' correspond to number of photons counted on the CCD? If so how would one convert this to a magnitude?</p>
<p>Any help is greatly appreciated.</p>
<p><a href="https://i.sstatic.net/pLIbC.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/pLIbC.png" alt="ds9 statistics window" /></a></p>

CC BY-SA 4.0
2023-10-07T07:40:57.727Z
you need to know the units of the date you're using. Did you check the header of the image in DS9. You can do it by going to File>Prism.
mysterium
CC BY-SA 4.0
2023-10-07T09:40:57.863Z
Hi, yea I recorded the dates of each images, in units of modified Julian date.
ergoldan675
CC BY-SA 4.0
2023-10-07T22:12:12.663Z
sorry, i meant the units of the data you're using. What are the units of the flux in your images?
mysterium
CC BY-SA 4.0
2023-10-09T17:45:28.520Z
I think its DN, does this sound right?
ergoldan675
CC BY-SA 4.0
2023-10-11T18:50:53.480Z
sounds about right, but you need to be able to convert the DN counts to a useful radiometric quantity to make meaningful measurements.
mysterium
CC BY-SA 4.0
2023-10-11T21:27:39.303Z
Yea, I found a conversion from counts to magnitude in one of the project documents. Thanks a lot for your help.
ergoldan675
<galaxy><magnitude><cepheids><ds9>
Measuring magnitudes in ds9
ergoldan675
# Measuring magnitudes in ds9

(Asked by: username_0 on 2023-10-06)

I'm currently working on a project which involves measuring several Cepheids to determine the distance to a galaxy. I have been using 12 images from the Hubble telescope taken over a period of about a month. I have been recording the data shown in the attached image using ds9 software. I'm unsure what to do with this data, does the 'sum' correspond to number of photons counted on the CCD? If so how would one convert this to a magnitude?

Any help is greatly appreciated.

[![ds9 statistics window](https://i.sstatic.net/pLIbC.png)](https://i.sstatic.net/pLIbC.png)

**Tags:** galaxy, magnitude, cepheids, ds9
> **Comments:**
> **username_1**: you need to know the units of the date you're using. Did you check the header of the image in DS9. You can do it by going to File>Prism.  
> **username_0**: Hi, yea I recorded the dates of each images, in units of modified Julian date.  
> **username_1**: sorry, i meant the units of the data you're using. What are the units of the flux in your images?  
> **username_0**: I think its DN, does this sound right?  
> **username_1**: sounds about right, but you need to be able to convert the DN counts to a useful radiometric quantity to make meaningful measurements.  
> **username_0**: Yea, I found a conversion from counts to magnitude in one of the project documents. Thanks a lot for your help.  

---

## 1 answers

### Answer by username_2 on 2023-10-09. Score: 2

Unfortunately, simple photon counts are not going to get you to stellar magnitudes, because the response of the telescope is not perfectly linear or set to a consistent zeropoint. The [point-spread function](https://www.stsci.edu/hst/instrumentation/wfc3/data-analysis/psf) of a telescope describes how the light from a point source, like a star, will be warped, spread out, and recorded by the CCD. This needs to be modeled using software like e.g. [DOLPHOT](http://americano.dolphinsim.com/dolphot/) or DAOPHOT in order to extract magnitudes for the stars in your field.

> **Comments:**
> **username_3**: Your answer is not wrong but is not the whole story. It is possible with a few reasonable simplifying assumptions to derive stellar magnitudes from the photon counts - this is the basis of aperture photometry. With the assumption that the PSF doesn't vary much across the field of view and it can be well captured within a circle of a particular radius, you can derive *instrumental* magnitudes from $-2.5\times\log_{10}(counts)$ and compare these with catalog magnitudes to determine the zeropoint and calibrated mags. How good these will be depends a lot on the details of the observing system  
> **username_4**: I agree wit @astrosnapper - you should be able to take the log of the number of adu determined by aperture photometry (so long as the aperture is big enough to contain most of the PSF) as being the magnitude, with a zero-point offset which you don't care about if you're just trying to find the period (unless the zero point varies with time). If there is non-linearity then I guess that only would affect the amplitude of the pulsation period you determined, not its period.  
> **username_0**: That's great, thanks all for helping to clear things up.  

---

