Measuring length in Map objects

42 views
Skip to first unread message

Soumya Roy

unread,
Jun 30, 2022, 4:48:58 PM6/30/22
to SunPy
Hi all
I was just wondering if there was some way of measuring lengths in SunPy Map objects in Mm or some similar length units. For example in the following map I want to measure the length along one of the red lines marked.
Screen Shot 2022-06-30 at 4.46.47 PM.png

will.t...@gmail.com

unread,
Jul 1, 2022, 4:04:48 PM7/1/22
to SunPy
If those red lines overlaid on your image are represented as astropy SkyCoord objects, you can use the separation method (https://docs.astropy.org/en/stable/coordinates/matchsep.html#offsets) on each SkyCoord to calculate the plane-of-sky angular separation represented by that coordinate. Given the distance to the observer that defines the frame of the image, you could then estimate the physical distance associated with each angular separation.

If the red lines are only given in pixel coordinates, you could use the approach shown in the following example to convert each to a SkyCoord: https://docs.sunpy.org/projects/sunkit-image/en/stable/generated/gallery/tracing_loops.html#sphx-glr-generated-gallery-tracing-loops-py.

I hope that is helpful!

Will
Reply all
Reply to author
Forward
0 new messages