# Path: wradlib/adjust.py
# class AdjustBase(ipol.IpolBase):
# class AdjustAdd(AdjustBase):
# class AdjustMultiply(AdjustBase):
# class AdjustMixed(AdjustBase):
# class AdjustMFB(AdjustBase):
# class AdjustNone(AdjustBase):
# class GageOnly(AdjustBase):
# class RawAtObs:
#     def __init__(
#         self,
#         obs_coords,
#         raw_coords,
#         nnear_raws=9,
#         stat="median",
#         mingages=5,
#         minval=0.0,
#         mfb_args=None,
#         ipclass=ipol.Idw,
#         **ipargs,
#     ):
#     def _checkip(self, ix, targets):
#     def __call__(self, obs, raw, targets=None, rawatobs=None, ix=None):
#     def _check_shape(self, obs, raw):
#     def _get_valid_pairs(self, obs, raw):
#     def xvalidate(self, obs, raw):
#     def __call__(self, obs, raw, targets=None, rawatobs=None, ix=None):
#     def __call__(self, obs, raw, targets=None, rawatobs=None, ix=None):
#     def __call__(self, obs, raw, targets=None, rawatobs=None, ix=None):
#     def __call__(self, obs, raw, targets=None, rawatobs=None, ix=None):
#     def __call__(self, obs, raw, targets=None, rawatobs=None, ix=None):
#     def __call__(self, obs, raw, targets=None, rawatobs=None, ix=None):
#     def __init__(self, obs_coords, raw_coords, nnear=9, stat="median"):
#     def __call__(self, raw, obs=None):
# def _get_neighbours_ix(obs_coords, raw_coords, nnear):
# def _get_statfunc(funcname):
#         def newfunc(x, y):
# def best(x, y):


import numpy as np
import pytest
from wradlib import adjust

class Data:
    # Arguments to be used throughout all test classes
    raw_x, raw_y = np.meshgrid(np.arange(4).astype("f4"), np.arange(4).astype("f4"))
    raw_coords = np.vstack((raw_x.ravel(), raw_y.ravel())).T
    obs_coords = np.array([[1.0, 1.0], [2.0, 1.0], [1.0, 3.5], [3.5, 3.0]])
    raw = np.array(
        [
            [
                1.0,
                2.0,
                1.0,
                0.0,
                1.0,
                2.0,
                1.0,
                2.0,
                1.0,
                0.0,
                0.0,
                3.0,
                4.0,
                0.0,
                4.0,
                0.0,
            ],
            [
                1.0,
                2.0,
                1.0,

# Path: wradlib/adjust.py
# class AdjustBase(ipol.IpolBase):
# class AdjustAdd(AdjustBase):
# class AdjustMultiply(AdjustBase):
# class AdjustMixed(AdjustBase):
# class AdjustMFB(AdjustBase):
# class AdjustNone(AdjustBase):
# class GageOnly(AdjustBase):
# class RawAtObs:
#     def __init__(
#         self,
#         obs_coords,
#         raw_coords,
#         nnear_raws=9,
#         stat="median",
#         mingages=5,
#         minval=0.0,
#         mfb_args=None,
#         ipclass=ipol.Idw,
#         **ipargs,
#     ):
#     def _checkip(self, ix, targets):
#     def __call__(self, obs, raw, targets=None, rawatobs=None, ix=None):
#     def _check_shape(self, obs, raw):
#     def _get_valid_pairs(self, obs, raw):
#     def xvalidate(self, obs, raw):
#     def __call__(self, obs, raw, targets=None, rawatobs=None, ix=None):
#     def __call__(self, obs, raw, targets=None, rawatobs=None, ix=None):
#     def __call__(self, obs, raw, targets=None, rawatobs=None, ix=None):
#     def __call__(self, obs, raw, targets=None, rawatobs=None, ix=None):
#     def __call__(self, obs, raw, targets=None, rawatobs=None, ix=None):
#     def __call__(self, obs, raw, targets=None, rawatobs=None, ix=None):
#     def __init__(self, obs_coords, raw_coords, nnear=9, stat="median"):
#     def __call__(self, raw, obs=None):
# def _get_neighbours_ix(obs_coords, raw_coords, nnear):
# def _get_statfunc(funcname):
#         def newfunc(x, y):
# def best(x, y):


# Path: wradlib/tests/test_adjust.py
import numpy as np
import pytest
from wradlib import adjust


class Data:
    # Arguments to be used throughout all test classes
    raw_x, raw_y = np.meshgrid(np.arange(4).astype("f4"), np.arange(4).astype("f4"))
    raw_coords = np.vstack((raw_x.ravel(), raw_y.ravel())).T
    obs_coords = np.array([[1.0, 1.0], [2.0, 1.0], [1.0, 3.5], [3.5, 3.0]])
    raw = np.array(
        [
            [
                1.0,
                2.0,
                1.0,
                0.0,
                1.0,
                2.0,
                1.0,
                2.0,
                1.0,
                0.0,
                0.0,
                3.0,
                4.0,
                0.0,
                4.0,
                0.0,
            ],
            [
                1.0,
                2.0,
                1.0,

                0.0,