3
$\begingroup$

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?

enter image description here

I obtained this instead of the third column:

0      19.179401
1       6.227679
2       0.740455
3      44.901469
4       7.598273
$\endgroup$
1
  • 1
    $\begingroup$ 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? $\endgroup$ Commented Jul 8, 2022 at 7:53

1 Answer 1

3
$\begingroup$

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.

$\endgroup$
2
  • 2
    $\begingroup$ Thank you so much $\endgroup$
    – Anna-Kat
    Commented Jul 8, 2022 at 11:26
  • 2
    $\begingroup$ @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 :) $\endgroup$
    – pela
    Commented Jul 8, 2022 at 12:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .