get_xy_pos¶
- tessilator.aperture.get_xy_pos(targets, head)[source]¶
Locate the X-Y position for targets in a given Sector/CCD/Camera mode
The function reads in the RA and DEC positions of each target, and the metadata (header) of the input fits frame containing the WCS information. A WCS transformation is attempted first, which uses the
world_to_array_indexmodule to assign pixel values that match the indexing order of numpy arrays. If the WCS transformation fails, then theXposandYposcolumns from the input table are used. IfXposandYposare not available, the function returns an error.- Parameters:
- targets
astropy.table.Table The table of input data with celestial coordinates.
- head
astropy.io.fits The fits header containing the WCS coordinate details.
- targets
- Returns:
- positions
tuple A tuple of X-Y pixel positions for each target.
- positions