<p>For Gaia EDR3：</p>
<p>Note (G1): Note on magnitude errors:</p>
<p>They are obtained with a simple propagation of errors with the formulas</p>
<pre><code>e_Gmag   = sqrt((-2.5/ln(10)*e_FG/FG)**2 + sigmaG_0**2)
e_GBPmag = sqrt((-2.5/ln(10)*e_FGBP/FGBP)**2 + sigmaGBP_0**2))
e_GRPmag = sqrt((-2.5/ln(10)*e_FGRP/FGRP)**2 + sigmaGRP_0**2))
</code></pre>
<p>with the G, G_BP, G_RP zero point uncertainties</p>
<pre><code>sigmaG_0 = 0.0027553202
sigmaGBP_0 = 0.0027901700
sigmaGRP_0 = 0.0037793818
</code></pre>
<p>See <a href="https://www.cosmos.esa.int/web/gaia/edr3-passbands" rel="nofollow noreferrer">https://www.cosmos.esa.int/web/gaia/edr3-passbands</a> for more details</p>
<p><a href="https://cdsarc.unistra.fr/viz-bin/ReadMe/I/350?format=html&amp;tex=true#sRM3.63" rel="nofollow noreferrer">https://cdsarc.unistra.fr/viz-bin/ReadMe/I/350?format=html&amp;tex=true#sRM3.63</a></p>

CC BY-SA 4.0
2020-12-30T16:23:01.400Z
2020-12-30T16:23:01.400Z
Lu_astro
<p>That is because what is measured is a <em>flux</em> and the flux errors are in the DR2 catalogue.</p>
<p>Since magnitudes are based on the logarithm of the flux, then there is no straightforward correspondence (although it matters little if the error bars are less than a few hundredths if a magnitude).</p>
<p>Simple error propagation formulae give
<span class="math-container">$$|\Delta G| \simeq \frac{2.5}{\ln 10} \left(\frac{\Delta f}{f}\right),$$</span>
where <span class="math-container">$f$</span> is the flux in the G band.</p>
<p>This gives <span class="math-container">$\Delta G= 0.0023(1)$</span> for your example. Other algorithms give almost the same result, e.g. taking the average of the <span class="math-container">$\pm \Delta G$</span> from using <span class="math-container">$\pm \Delta f$</span> to calculate the magnitude.</p>
<p>If the difference between the algorithms (they do give differing results when the flux error exceeds <span class="math-container">$\sim 10$</span>%), or the fact that the true error is asymmetric in magnitude are important, then you shouldn't be using the symmetric magnitude error bar from CDS.</p>

CC BY-SA 4.0
2020-08-09T14:01:51.413Z
2020-08-09T14:01:51.413Z
ProfRob
<p>When you check an entry of the Gaia DR2 stellar catalogue in Vizier, <a href="https://vizier.u-strasbg.fr/viz-bin/VizieR-5?-ref=VIZ5f2feb328d80&amp;-out.add=.&amp;-source=I/345/gaia2&amp;-c=102.68312472662%20%2B08.72221931706,eq=ICRS,rs=2&amp;-out.orig=o" rel="nofollow noreferrer">for example this one</a>, you can see that there is a value for the G magnitude (in our case 18.0733 mag) and a value for the uncertainty on that (in our case 0.0023 mag). The thing is that the G value is part of Gaia DR2 but the uncertainty is not, it was calculated by the CDS for Vizier (using the values presented for the flux as far as I can understand). I have two small related questions:</p>
<ol>
<li><p>How does the CDS calculate the value from the uncertainty exactly? at least so that the one given by the CDS and the calculated one agree to the fourth decimal.</p>
</li>
<li><p>Is there a way in astropy or astroquery to retrieve the photometric uncertainty value from the catalog? Or do I have to calculate it as in the first question?</p>
</li>
</ol>

CC BY-SA 4.0
2023-06-19T20:08:10.740Z
Swike, please dont override my edits that remove useless salutation as policy states they should be removed
Starship
CC BY-SA 4.0
2023-06-19T21:28:14.187Z
I don't find courtesy a useless thing.  But anyways, I approve your edit if it is such a burden to have a four word "salutation".
Swike
CC BY-SA 4.0
2023-06-19T23:49:39.017Z
Others disagree
Starship
<photometry><gaia><astropy><star-catalogues>
How can I calculate the uncertainties in magnitude like the CDS does?
Swike
# How can I calculate the uncertainties in magnitude like the CDS does?

(Asked by: username_0 on 2020-08-09)

When you check an entry of the Gaia DR2 stellar catalogue in Vizier, [for example this one](https://vizier.u-strasbg.fr/viz-bin/VizieR-5?-ref=VIZ5f2feb328d80&-out.add=.&-source=I/345/gaia2&-c=102.68312472662%20%2B08.72221931706,eq=ICRS,rs=2&-out.orig=o), you can see that there is a value for the G magnitude (in our case 18.0733 mag) and a value for the uncertainty on that (in our case 0.0023 mag). The thing is that the G value is part of Gaia DR2 but the uncertainty is not, it was calculated by the CDS for Vizier (using the values presented for the flux as far as I can understand). I have two small related questions:

1. How does the CDS calculate the value from the uncertainty exactly? at least so that the one given by the CDS and the calculated one agree to the fourth decimal.
2. Is there a way in astropy or astroquery to retrieve the photometric uncertainty value from the catalog? Or do I have to calculate it as in the first question?

**Tags:** photometry, gaia, astropy, star-catalogues

> **Comments:**
> **username_1**: username_0, please dont override my edits that remove useless salutation as policy states they should be removed  
> **username_0**: I don't find courtesy a useless thing.  But anyways, I approve your edit if it is such a burden to have a four word "salutation".  
> **username_1**: Others disagree  

---

## 2 answers

### Answer by username_3 on 2020-08-09. Score: 8 | Accepted answer

That is because what is measured is a *flux* and the flux errors are in the DR2 catalogue.

Since magnitudes are based on the logarithm of the flux, then there is no straightforward correspondence (although it matters little if the error bars are less than a few hundredths if a magnitude).

Simple error propagation formulae give
$$|\Delta G| \simeq \frac{2.5}{\ln 10} \left(\frac{\Delta f}{f}\right),$$
where $f$ is the flux in the G band.

This gives $\Delta G= 0.0023(1)$ for your example. Other algorithms give almost the same result, e.g. taking the average of the $\pm \Delta G$ from using $\pm \Delta f$ to calculate the magnitude.

If the difference between the algorithms (they do give differing results when the flux error exceeds $\sim 10$%), or the fact that the true error is asymmetric in magnitude are important, then you shouldn't be using the symmetric magnitude error bar from CDS.


---

### Answer by username_2 on 2020-12-30. Score: 3

For Gaia EDR3：
Note (G1): Note on magnitude errors:
They are obtained with a simple propagation of errors with the formulas
e_Gmag   = sqrt((-2.5/ln(10)*e_FG/FG)**2 + sigmaG_0**2)
e_GBPmag = sqrt((-2.5/ln(10)*e_FGBP/FGBP)**2 + sigmaGBP_0**2))
e_GRPmag = sqrt((-2.5/ln(10)*e_FGRP/FGRP)**2 + sigmaGRP_0**2))

with the G, G_BP, G_RP zero point uncertainties
sigmaG_0 = 0.0027553202
sigmaGBP_0 = 0.0027901700
sigmaGRP_0 = 0.0037793818

See https://www.cosmos.esa.int/web/gaia/edr3-passbands for more details
https://cdsarc.unistra.fr/viz-bin/ReadMe/I/350?format=html&tex=true#sRM3.63


---

