-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
While you can convert and array of coordinates based on a single attitude:
c = SkyCoord(l = [45,50]*u.deg, b = [45,10]*u.deg, frame = "galactic")
xp_with_frame = SkyCoord(l=0*u.deg, b=0*u.deg, frame='galactic')
yp_with_frame = SkyCoord(l=90*u.deg, b=0*u.deg, frame='galactic')
attitude = Attitude.from_axes(x=xp_with_frame, y=yp_with_frame, frame = 'galactic')
c.transform_to(SpacecraftFrame(attitude = attitude))
If the attitude is also an array it will fail:
c = SkyCoord(l = 45*u.deg, b = 45*u.deg, frame = "galactic")
xp_with_frame = SkyCoord(l=[0,10]*u.deg, b=[0,0]*u.deg, frame='galactic')
yp_with_frame = SkyCoord(l=[90,100]*u.deg, b=[0,0]*u.deg, frame='galactic')
attitude = Attitude.from_axes(x=xp_with_frame, y=yp_with_frame, frame = 'galactic')
c.transform_to(SpacecraftFrame(attitude = attitude))
This kind of conversion will be very common, by I wonder how to handle it with astropy. transform_to converts to a single frame, which is defined by an attitude (in order to make the conversion possible). I guess it should convert to an attitude-less SC frame?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels