def get_object_xy_in_layer(cur,cell,layer):
    """
    Returns (object_num,x,y) coordinates of cell object in layer

    Parameters
    ----------
    cur : MySQLdb cursor
    cell : str
      Name of cell
    layer : str
      Layer/image name
    """

    sql = ("select OBJ_Name,OBJ_X,OBJ_Y "
           "from object "
           "join contin on "
           "contin.CON_Number = object.CON_Number "
           "where contin.CON_AlternateName like '%s' "
           "and object.IMG_Number like '%s'"
           %(cell,layer))
    cur.execute(sql)
    return [(int(a[0]),int(a[1]),int(a[2])) for a in cur.fetchall()]