<p>Your conversion is correct, and Python agrees with you:</p>
<pre><code>import numpy as np
from astropy import units as u
d = np.array([99.32459277,
             431.7789292,
            7751.937984,
              35.25471532,
             346.2603878]) * u.pc
D = np.array([1.905,
              2.689,
              5.74,
              1.583,
              2.631]) * u.AU
theta = D/d * u.rad
for t in theta:
    print('{:9.6f}'.format(t.to(u.mas)))
</code></pre>
<p>which outputs</p>
<pre><code>19.179540 mas
 6.227724 mas
 0.740460 mas
44.901795 mas
 7.598328 mas
</code></pre>
<p>You should probably check what the third column actually represents.</p>

CC BY-SA 4.0
2022-07-08T12:04:06.163Z
@Anna-Kat You're welcome! If you don't yet know `astropy` (in particular its use of units), I highly recommend starting to use it. It's a fantastic tool, under continuous development, and well documented :)
pela
CC BY-SA 4.0
2022-07-08T08:35:18.507Z
2022-07-08T08:35:18.507Z
pela
<p>I am trying to verify whether the third column is correct. The second column is radius of orbit with period corresponding to Gaia DR2 observing window duration.</p>
<pre><code>d_pc         OrbG2  Orb_mas
99.32459277  1.905  0.356777803
431.7789292  2.689  6.227724
7751.937984  5.74   0.74046
35.25471532  1.583  0.835263191
346.2603878  2.631  7.598328
</code></pre>
<p>What is wrong with this conversion, please?</p>
<p><a href="https://i.sstatic.net/Qu1ov.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Qu1ov.png" alt="enter image description here" /></a></p>
<p>I obtained this instead of the third column:</p>
<pre><code>0      19.179401
1       6.227679
2       0.740455
3      44.901469
4       7.598273
</code></pre>

CC BY-SA 4.0
2022-07-08T07:53:02.477Z
You have to be a bit more verbose in what you do. Just writing a formula without explanation doesn't cut it. What are the columns and your units in your table, and are they what you think they are?
planetmaker
<orbit><astronomical-unit>
Conversion from au to mas
Anna-Kat
# Conversion from au to mas

(Asked by: username_0 on 2022-07-08)

I am trying to verify whether the third column is correct. The second column is radius of orbit with period corresponding to Gaia DR2 observing window duration.
d_pc         OrbG2  Orb_mas
99.32459277  1.905  0.356777803
431.7789292  2.689  6.227724
7751.937984  5.74   0.74046
35.25471532  1.583  0.835263191
346.2603878  2.631  7.598328

What is wrong with this conversion, please?

I obtained this instead of the third column:
0      19.179401
1       6.227679
2       0.740455
3      44.901469
4       7.598273

**Tags:** orbit, astronomical-unit
> **Comments:**
> **username_1**: You have to be a bit more verbose in what you do. Just writing a formula without explanation doesn't cut it. What are the columns and your units in your table, and are they what you think they are?  

---

## 1 answers

### Answer by username_2 on 2022-07-08. Score: 3 | Accepted answer

Your conversion is correct, and Python agrees with you:
import numpy as np
from astropy import units as u
d = np.array([99.32459277,
             431.7789292,
            7751.937984,
              35.25471532,
             346.2603878]) * u.pc
D = np.array([1.905,
              2.689,
              5.74,
              1.583,
              2.631]) * u.AU
theta = D/d * u.rad
for t in theta:
    print('{:9.6f}'.format(t.to(u.mas)))

which outputs
19.179540 mas
 6.227724 mas
 0.740460 mas
44.901795 mas
 7.598328 mas

You should probably check what the third column actually represents.

> **Comments:**
> **username_2**: @Anna-Kat You're welcome! If you don't yet know `astropy` (in particular its use of units), I highly recommend starting to use it. It's a fantastic tool, under continuous development, and well documented :)  

---

