problem with applying space motion on coord
See original GitHub issueThis fails:
from astropy import coordinates as coord
import astropy.units as u
my_coord = coord.SkyCoord(0, 0, unit='deg', pm_ra_cosdec=1*u.mas/u.year, pm_dec=1*u.mas/u.year)
my_coord.apply_space_motion(dt=-50*u.Myr)
Tried cur_oc_coord.apply_space_motion(dt=-50*u.Myr)
(astropy > 3)
and failed with
---------------------------------------------------------------------------
ErfaError Traceback (most recent call last)
<ipython-input-7-7045e831345c> in <module>
----> 1 my_coord.apply_space_motion(dt=-50*u.Myr)
~/miniconda/envs/casa_siblings/lib/python3.6/site-packages/astropy/coordinates/sky_coordinate.py in apply_space_motion(self, new_obstime, dt)
524 t1 = Time('J2000')
525 new_obstime = None # we don't actually know the inital obstime
--> 526 t2 = t1 + dt
527 else:
528 t2 = t1 + dt
~/miniconda/envs/casa_siblings/lib/python3.6/site-packages/astropy/time/core.py in __add__(self, other)
1828
1829 # Go back to left-side scale if needed
-> 1830 out._set_scale(self.scale)
1831
1832 return out
~/miniconda/envs/casa_siblings/lib/python3.6/site-packages/astropy/time/core.py in _set_scale(self, scale)
720
721 conv_func = getattr(erfa, sys1 + sys2)
--> 722 jd1, jd2 = conv_func(*args)
723
724 if self.masked:
~/miniconda/envs/casa_siblings/lib/python3.6/site-packages/astropy/_erfa/core.py in taiutc(tai1, tai2)
15623 """
15624 utc1, utc2, c_retval = ufunc.taiutc(tai1, tai2)
> 15625 check_errwarn(c_retval, 'taiutc')
15626 return utc1, utc2
15627
~/miniconda/envs/casa_siblings/lib/python3.6/site-packages/astropy/_erfa/core.py in check_errwarn(statcodes, func_name)
95
96 emsg = ', '.join(['{0} of "{1}"'.format(errcounts[e], errmsgs[e]) for e in errcodes])
---> 97 raise ErfaError('ERFA function "' + func_name + '" yielded ' + emsg)
98
99 elif numpy.any(statcodes>0):
ErfaError: ERFA function "taiutc" yielded 1 of "unacceptable date"
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (11 by maintainers)
Top Results From Across the Web
3.4 Motion in Space - Calculus Volume 3 | OpenStax
This situation, with an object moving with an initial velocity but with no forces acting on it other than gravity, is known as...
Read more >Robotic Motion Planning: Configuration Space
The space of all configurations is the configuration space or C- space. ... Inverse kinematics -- finding joint angles from Cartesian coordinates.
Read more >Chapter 6. Inverse kinematics
The reason is that certain end effector motions can only be attained by a coordinated, simultaneous motion of two or more joints, and...
Read more >Proper Time, Coordinate Systems, Lorentz Transformations
This is the classical Galilean principle of 'relativity of motion'. Roughly stated, this means that uniform motion through space has no effect on...
Read more >Coordinate Systems - LearnOpenGL
To transform the coordinates from one space to the next coordinate space we'll ... your cube may end up at a different location...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ah! Well, the short answer is that we don’t support dates beyond what ERFA supports, so that won’t work. But there is also a major conceptual issue:
apply_space_motion()
assumes linear space motion, but over a timespan as long as 50 Myr, we would need to numerically integrate the solar position backwards in time along with all other stars in order to get the sky positions of the stars correct. For stars without full phase-space information (most stars), we can’t do that, and for stars with full 6D information, we don’t know the gravitational potential of the Galaxy precisely enough to do that.For a visual example of why the linear space motion assumption would be bad over this timescale, I grabbed 8 random stars from Gaia DR2 with full 6D information within a few hundred pc (sky position, distance, proper motions, radial velocity), and numerically integrated their orbits along with the Sun’s with gala:
If you wanted to ignore the uncertainty in the Milky Way force field, and the uncertainty in the stellar kinematics, you could take the example above with gala, define a new solar coordinate system at the location of the sun from 50 Myr ago, and look at where the stars are on the sky 😃
Although… why would sabertooth era be unacceptable by ERFA? 🤔