3D numpy array and axes

26 views
Skip to first unread message

dorai iyer

unread,
Sep 22, 2020, 3:27:22 PM9/22/20
to Glue users
Hi,
I am having a problem that appears to have been discussed at least twice with the link to 

My data is in the form of 3D numpy array [260,128,256] where the 260 are the 260 points where I change the electrical bias from negative to  positive values through 0 in mV and the other two  are simply typical image coordinates in microns. 

I  have been able to visualize the data as array points now I would like to put the coordinates in and this is where things got really difficult for me.

I am not able to translate the coordinates to WCS in 3D. it is most probably because i am not familiar with WCS. Is there an example other than the abstract concept in the docs?

One way out would be to convert each slice into a FITS image but then I would still be struggling to label the bias axis.

Thanks in advance

Dorai


Thomas Robitaille

unread,
Nov 14, 2024, 9:15:42 AM11/14/24
to glue...@googlegroups.com
Hi Dorai,

(Apologies for the very delayed reply to your question - even though this may no longer be useful for you, I am replying in case anyone has the same question)

Since you sent this, the coordinate handling in glue has improved, and you can use for example the AffineCoordinates class:


to set up a transformation between pixel and world coordinates, if the transformation is indeed an affine transform. If it is a more complex transformation, you can use CustomCoordinates:


Neither of these requires any knowledge of WCS transformations.

Cheers,
Tom

--
You received this message because you are subscribed to the Google Groups "Glue users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to glue-viz+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/glue-viz/8a9ceb33-35a0-4b40-9933-bb53ee6dc5can%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages