Skip to content

astrophysics - transform sf from equatorial to galactic coordinates

2 messages · Eugene Hickey, Barry Rowlingson

#
Hi
Does anyone know of a way to transform an sf from equatorial (RA, DEC) into galactic (b, l) coordinates please?


Thanks
Eugene

This email originated from TU Dublin. If you received this email in error, please delete it from your system. Please note that if you are not the named addressee, disclosing, copying, distributing or taking any action based on the contents of this email or attachments is prohibited.

Is ? OT Baile ?tha Cliath a th?inig an r?omhphost seo. M? fuair t? an r?omhphost seo tr? earr?id, scrios de do ch?ras ? le do thoil. Tabhair ar aird, mura t? an seola? ainmnithe, go bhfuil dianchosc ar aon nochtadh, aon ch?ipe?il, aon d?ileadh n? ar aon ghn?omh a dh?anfar bunaithe ar an ?bhar at? sa r?omhphost n? sna hiat?in seo.
1 day later
#
Eugene,

I don't think this can be done using the PROJ library that does most
coordinate transformations for sf objects. The `astrolibR` package has
functions for converting coordinates on various astronomical systems

 https://cran.r-project.org/web/packages/astrolibR/astrolibR.pdf

but you have to feed it vectors of RA and declination rather than entire
spatial objects. This isn't much of a problem if you are dealing with
points (extract coords with st_coordinates, convert, make a new geometry)
but for lines of polygons you need to extract all the vertex points,
convert them, then rebuild the features.

You might also have problems if you have lines or polygons going across the
cosmic coordinate equivalent of the -180/+180 longitude line...

 Having another look, it *might* be possible to do this with PROJ by
constructing an appropriate spherical rotated coordinate system,  and you
might even be able to convert degrees to RA hours with a +units parameter...

Barry



On Sat, Mar 21, 2020 at 6:06 PM Eugene Hickey <Eugene.Hickey at tudublin.ie>
wrote: