sunpy.wcs.convert_data_to_pixel(x, y, scale, reference_pixel, reference_coordinate)[source] [edit on github]

Deprecated since version 0.8.0: The convert_data_to_pixel function is deprecated and may be removed in a future version. Use instead.

Calculate the pixel indices for a given data coordinate.

  • y (x,) – Data coordinate in same units as reference coordinate
  • scale (2d ndarray) – The size of a pixel (dx,dy) in data coordinates (equivalent to WCS/CDELT)
  • reference_pixel (2d ndarray) – The reference pixel (x,y) at which the reference coordinate is given (equivalent to WCS/CRPIX)
  • reference_coordinate (2d ndarray) – The data coordinate (x, y) as measured at the reference pixel (equivalent to WCS/CRVAL)

out (ndarray) – The pixel coordinates (x,y) at that data coordinate.