litebird / litebird_sim

Simulation tools for LiteBIRD
GNU General Public License v3.0
18 stars 13 forks source link

Spacecraft velocity seems to be wrt the CMB, not the Sun #295

Closed eirikgje closed 5 months ago

eirikgje commented 5 months ago

Using the 1.3 version of the IMo, I have the following issue:

In the documentation of the object that is returned from `spacecraft_pos_and_vel, it says that this object is meant to be used for the orbital dipole and the velocity given is the velocity of the spacecraft with respect to the Solar system. However, the velocities we get out of this looks like

pos_vel = lbs.spacecraft_pos_and_vel(orbit, start_time=time_now, time_span_s=10000) In [48]: pos_vel.velocities_km_s Out[48]: array([[-353.27391186, 23.03000566, -71.48893456], [-353.21497432, 23.04234818, -71.48882948]])

Which are more of the order of the velocity derived from the Solar dipole, not the orbital one.

paganol commented 5 months ago

Hi @eirikgje, you are right the documentation was written before adding the solar dipole and then it was not updated. Thanks for spotting this!

eirikgje commented 5 months ago

Okay! Is there a way to get the actual velocity wrt the sun? We need to know the predicted orbital dipole.

paganol commented 5 months ago

Sure, you can set solar_velocity_km_s to zero when you initialize lbs.SpacecraftOrbit or, if you use high level interface of the class Simulation, when you invoke sim.compute_pos_and_vel.