Change frame of attitude quaternions from TOD to GCRS

Hello,
I’m completely new to orekit and have the following problem.
Ich have a satellites attitude data, a csv with quaternions (s,x,y,z) in TOD and would like to change the reference frame from TOD to GCRS.
I cannot find a good tutorial or explanation on how to do this.
Can someone help me out what steps are necessary to do this using orekit?
→ I am using orekit with python
Thank you so much

Hi @EM1996 welcome,

You can try something along these lines (not a proper program, just some hints):

  Frame tod = FramesFactory.getTOD(IERSConventions.IERS2010, true);
  Frame gcrf = FramesFactory.getGCRF();
  loop for each line on your quaternion ephemeris
    Attitude aTod = new Attitude(date,
                                 tod,
                                 new Rotation(q0, q1, q2, q3, true),
                                 Vector3D.ZERO,
                                 Vector3D.ZERO);
    Attitude aGcrf = aTod.withReferenceFrame(gcrf);

If you want to write again the converted quaternion, you can retrieve the components using aGcrf.getRotation().getQ0(), aGcrf.getRotation().getQ1(), aGcrf.getRotation().getQ2(), and aGcrf.getRotation().getQ3() .

@luc Thank you so much!
It worked and helped me a lot.