# estimate_pixel_scale_ratio

drizzle.utils.estimate_pixel_scale_ratio(wcs_from, wcs_to, refpix_from=None, refpix_to=None)

  Compute the ratio of the pixel scale of the “to” WCS at the `refpix_to` position to the pixel scale of the “from” WCS at the `refpix_from` position. Pixel scale ratio, when requested, is computed near the centers of the bounding box (a property of the WCS object) or near `refpix_*` coordinates if supplied.

  Pixel scale is estimated as the square root of pixel’s area, i.e., pixels are assumed to have a square shape at the reference pixel position. If input reference pixel position for a WCS is None, it will be taken as the center of the bounding box if `wcs_*` has a bounding box defined, or as the center of the box defined by the `pixel_shape` attribute of the input WCS if `pixel_shape` is defined (not None), or at pixel coordinates `(0, 0)`.

  Parameters:

    - wcs_from (wcs) – A WCS object representing the coordinate system you are converting from. This object must have `pixel_shape` property defined.

    - wcs_to (wcs) – A WCS object representing the coordinate system you are converting to.

    - refpix_from (numpy.ndarray, tuple, list) – Image coordinates of the reference pixel near which pixel scale should be computed in the “from” image. In FITS WCS this could be, for example, the value of CRPIX of the `wcs_from` WCS.

    - refpix_to (numpy.ndarray, tuple, list) – Image coordinates of the reference pixel near which pixel scale should be computed in the “to” image. In FITS WCS this could be, for example, the value of CRPIX of the `wcs_to` WCS.

  Returns:

    pixel_scale_ratio – Estimate the ratio of “to” to “from” WCS pixel scales. This value is returned only when `estimate_pixel_scale_ratio` is True.

  Return type:

    float