translate_wcs

xpolbeamline.events.translate_wcs(evt, colnames=['X', 'Y'])[source]

Translate the WCS from image to event list

Header keywords for WCS are different for images vs. event lists. This function translates from image to event list. It does not deal with all possible keywords, just those that are relevant in the context of this beamline.

It drops the third dimension of the WCS and instead adds a time column based on frame number.

Parameters:

evt : astropy.table.Table

Event table with one or more image-type WCSs in the header.

colnames : list of two strings

Column names in the events list that the imaging WCS applies to.