One of the nice things about the frame classes is that you can specify a representation class, and the expected kwarg names change accordingly:
>>> icrs = coord.ICRS(x=1*u.pc, y=2*u.pc, z=3*u.pc,
... representation=coord.CartesianRepresentation)
>>> icrs
<ICRS Coordinate: (x, y, z) in pc
( 1., 2., 3.)>
I had originally made it so that this would work with a differential class as well, but that no longer seems to be the case (because of some changes @mhvk made in #6219). An implication of this is that the velocity components always have to be specified with the component names corresponding to the default differential. For most frame classes, this is SphericalCosLatDifferential, so proper motions always have to be coslat. However, it would be nice to be able to do something this:
icrs = coord.ICRS(ra=8.67*u.degree, dec=53.09*u.degree,
pm_ra=4.8*u.mas/u.yr, pm_dec=-15.16*u.mas/u.yr,
differential_cls={'s': coord.SphericalDifferential})
when someone doesn't want to include the cos(dec).
Or, for cartesian components:
icrs = coord.ICRS(x=1*u.pc, y=2*u.pc, z=3*u.pc,
v_x=10*u.km/u.s, v_y=11*u.km/u.s, v_z=12*u.km/u.s,
representation=coord.CartesianRepresentation,
differential_cls={'s': coord.CartesianDifferential})
cc @eteq @mhvk
One of the nice things about the frame classes is that you can specify a representation class, and the expected kwarg names change accordingly:
I had originally made it so that this would work with a differential class as well, but that no longer seems to be the case (because of some changes @mhvk made in #6219). An implication of this is that the velocity components always have to be specified with the component names corresponding to the default differential. For most frame classes, this is
SphericalCosLatDifferential, so proper motions always have to becoslat. However, it would be nice to be able to do something this:when someone doesn't want to include the
cos(dec).Or, for cartesian components:
cc @eteq @mhvk