Skip to content

Conversation

@mreineck
Copy link
Collaborator

No description provided.

@ziotom78
Copy link
Member

Hi @mreineck , sorry for the delay in my comments. This implementation looks very handy!

One minor point: I see that PyPointingProvider::pyget_rotated_quaternions allocates the array where to store the result. Would it make sense to provide a similar method where the result array is passed as argument? In this way one could allocate the array once and then iterate the call to pyget_rotated_quaternions while re-using the same array, reducing the time needed for memory allocation.

@mreineck
Copy link
Collaborator Author

Sure, that can be done easily!

@mreineck
Copy link
Collaborator Author

An implementation-detail question for @tskisner: what is the internal storage format for quaternions in TOAST? w,x,y,z or x,y,z,w? I'm trying to avoid confusion wherever possible, so I'd like to use the same order.

@mreineck
Copy link
Collaborator Author

I should perhaps note that functionality which is very similar to the PointingProvider can be emulated using scipy.spatial.transform (I just noticed this while writing unit tests). It appears to be roughly a factor of 10 slower, but this is not necessarily a big deal. So if there is preference for using scipy here, that's absolutely fine with me.

In any case I'll use the (x,y,z,w) ordering for quaternions in my code to be compatible with scipy in that respect.

@tskisner
Copy link
Member

Hello @mreineck , sorry for the delayed response. TOAST currently uses "scalar last" format, but there have been requests to support "scalar first" as well (used by Boost quaternions). Our issue for tracking that (which I just updated) is here: hpc4cmb/toast#335

@mreineck
Copy link
Collaborator Author

Thanks! Scalar-last it is then, at least for the time being.

@mreineck mreineck merged commit 758f5d3 into ducc0 Jul 27, 2020
@mreineck mreineck deleted the quaternions branch July 27, 2020 12:53
mreineck added a commit that referenced this pull request Apr 23, 2021
sharp: add getters to sharp_geom_info
mreineck added a commit that referenced this pull request Aug 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants