I am working to calculate and plot velocity vs distance for large GAIA DR3 data sets. Are there any efficient code blocks in Astropy to help with this or do I need to code it step by step? I am working with ra, dec, parallax, pmra, and pmdec as well as their errors. I have been looking for coding communities as this project is my introduction to Astropy. Any suggestions or resources are greatly appreciated.
Are you talking about tangential velocities derived from proper motions? I think most of the functionality you need is implemented in astropy.coordinates
’ SkyCoord
, which you can use for entire sets of GAIA sources, see e.g. the example on converting to Cartesian coordinates. Note that the full 3D transformation will of course require radial velocity information, but assuming that to be 0 you’d still be able to extract the tangential component.
You may also want to check out the tips on efficient vectorisation.
HTH
Thank you.
That’s what I’ve been doing, so that’s good. It doesn’t sound like there is a more elegant efficient way to block the code.
I’ll stay on my current path.
Lisa