spedas / pyspedas

Python-based Space Physics Environment Data Analysis Software
https://pyspedas.readthedocs.io/
MIT License
143 stars 58 forks source link

Need better tests and examples for fac_matrix_make and tvector_rotate #790

Open jameswilburlewis opened 4 months ago

jameswilburlewis commented 4 months ago

I had a question from a user about doing FAC transformations in PySPEDAS. We don't seem to have a standalone notebook to demo this capability....we should probably develop one. We do have usages of fac_matrix_make in our unit tests and wave polarization notebooks, but these don't use tvector_rotate, which I think would be the preferred technique. The examples also seem to be doing linear interpolation on the rotation matrices to match the vector timestamps, which I think is incorrect -- this should be some flavor of qslerp, as is done in tvector_rotate.

We should update the examples, and add some IDL vs Python validation tests of fac_matrix_make and tvector_rotate.