def map_pixel(point_x, point_y, cellx, celly, xmin, ymax):
point_x = np.asarray(point_x)<EOL>point_y = np.asarray(point_y)<EOL>col = np.floor((point_x - xmin) / cellx).astype(int)<EOL>row = np.floor((point_y - ymax) / celly).astype(int)<EOL>return row, col<EOL>
Usage:
    map_pixel(xcoord, ycoord, x_cell_size, y_cell_size, xmin, ymax)

where:
    xmin is leftmost X coordinate in system

    ymax is topmost Y coordinate in system

Example:
        raster = HMISea.tif

        ndv, xsize, ysize, geot, projection, datatype = get_geo_info(raster)

        row, col = map_pixel(x,y,geot[1],geot[-1], geot[0],geot[3])