# Measure the deprojected distance between two points?

I have an image of a protoplanetary disk, from which I would like to measure the distance of various points from the centre. See below image for an example, where I would like to measure the distance between the green x's.

It is straightforward to measure the distances as projected on the sky, since I know the distance to the disk (110pc), and the angular separation in arcsecs.

However, the disk is inclined (i=43$$^\text{o}$$) and rotated by a position angle (PA=146$$^\text{o}$$). I would like to know how to calculate the deprojected distance between two points.

• It can be done in one rotation, just rotate to make the incline 90 degrees. Apr 29, 2022 at 15:13
• I'm not able to adjust the inclination/position angle myself, these are just inferred quantities from the ALMA observation. I'm just looking to find a way to take the separation between points as measured in the image, and deproject to the 'true' separation, based on the inferred inclination and PA. Apr 29, 2022 at 17:07
• different but potentially related: What (actually) is the " deprojected half-light radius" of this almost-all-dark-matter Galaxy?
– uhoh
Apr 29, 2022 at 19:28

@Greg Miller's point is that the rotation angle doesn't count. The only measurement you care about is the inclination. It makes a point's arc distance from the major axis of the apparent ellipse cos(43) times the distance you'd see if the protoplanet was not inclined. Take the square root of the sum of the squares of its arc distance from the minor axis and its corrected distance from the major axis and you'll have the "deprojected" distance.

BTW, unless your object is very near the celestial equator you won't have the same scale for your axes. It's just a labeling problem though: you can't say your X axis is right ascension.

• Thanks, yes you're right, I think I thought the problem was more complicated than it actually was. I've posted my solution in case it's helpful to anyone. Apr 30, 2022 at 13:23

My eventual solution was to rotate the image using the 2D rotation matrix, then deproject by accounting for the inclination. In Python, this looks like:

def sky_to_disk(x, y, inc, PA):

# Rotate (x, y) by PA (deg)

# Deproject (x_rot, y_rot) by inc (deg)
x_d, y_d  = x_rot, y_rot / np.cos(np.radians(inc))

return x_d, y_d

• When you add a solution to your own question you should identify it as the right answer so you'll get the credit. Apr 30, 2022 at 17:08
• @stretch disagree about "getting credit" or there being a specific "should" at all. Accepting a particular answer or no answer at all is completely up to the OP and there are several considerations they may evaluate before choosing a corse of action. It is helpful to the site and to future readers if we eventually choose a best answer to accept, but that's strictly up to the OP to decide.
– uhoh
May 2, 2022 at 21:50
• I didn't know that someone else could decide which answer is best. Who is it that makes the decision? May 3, 2022 at 2:02
• In stack exchange we try to think as much about future readers as possible and much less about who gets the "credit" or reputation points. So if there's an answer post that best answers the question we usually accept it no matter who the author is. That way when the question shows up in future searches folks will see that there's an accepted answer and which one it is, and search engines will see that acceptance as well.
– uhoh
May 23, 2022 at 19:25
• Okay thanks, I have accepted my own answer incase it may help others in the future May 24, 2022 at 10:40