Function lsst::afw::image::positionToIndex(double&, double)

Function Documentation

int lsst::afw::image::positionToIndex(double &residual, double pos)

Parameters
  • residual: fractional part of index

  • pos: image position

Convert image position to index (nearest integer and fractional parts)

The LSST indexing convention is:

  • the index of the bottom left pixel is 0,0

  • the position of the center of the bottom left pixel is PixelZeroPos, PixelZeroPos

Note: in python this is called positionToIndexAndResidual

Return

nearest integer index