qcodes/tests/legacy/test_qcmatplotlib_functions.py
def make_simulated_xyz(xrange: np.ndarray,
                       yrange: np.ndarray,
                       step: int,
                       interrupt_at: int=0) -> Tuple[np.ndarray,
                                                     np.ndarray,
                                                     np.ndarray]:
    """
    Make x, y, and z np.arrays like a Loop measurement would. In particular
    get the positions of nans right.

    Args:
        xrange: a 1D array with inner loop set values
        yrange: a 1D array with outer loop set values
        step: is the outer loop (y) step, describes how far we are in the
          measurement (0: all NaNs, len(y): all data)
        interrupt_at: inner loop step to interrupt at

    Returns:
        (x, y, z) where z is random noise
    """
    y = yrange.copy()
    y[step:] = np.nan

    x = np.empty((len(yrange), len(xrange)))
    x.fill(np.nan)
    z = x.copy()
    for stepind in range(step):
        xrow =  xrange.copy()
        if stepind == step - 1:
            xrow[interrupt_at:] = np.nan
        zrow = np.random.randn(len(xrange))
        if stepind == step - 1:
            zrow[interrupt_at:] = np.nan
        x[stepind, :] = xrow
        z[stepind, :] = zrow

    return x, y, z

    Make x, y, and z np.arrays like a Loop measurement would. In particular
    get the positions of nans right.

    Args:
        xrange: a 1D array with inner loop set values
        yrange: a 1D array with outer loop set values
        step: is the outer loop (y) step, describes how far we are in the
          measurement (0: all NaNs, len(y): all data)
        interrupt_at: inner loop step to interrupt at

    Returns:
        (x, y, z) where z is random noise
    
Make x, y, and z np.arrays like a Loop measurement would. In particular
get the positions of nans right.
Make x y and z np . arrays like a Loop measurement would . In particular get the positions of nans right .
def make_simulated_xyz(xrange: np.ndarray,
                       yrange: np.ndarray,
                       step: int,
                       interrupt_at: int=0) -> Tuple[np.ndarray,
                                                     np.ndarray,
                                                     np.ndarray]:
    y = yrange.copy()
    y[step:] = np.nan
    x = np.empty((len(yrange), len(xrange)))
    x.fill(np.nan)
    z = x.copy()
    for stepind in range(step):
        xrow =  xrange.copy()
        if stepind == step - 1:
            xrow[interrupt_at:] = np.nan
        zrow = np.random.randn(len(xrange))
        if stepind == step - 1:
            zrow[interrupt_at:] = np.nan
        x[stepind, :] = xrow
        z[stepind, :] = zrow
    return x, y, z
def make_simulated_xyz ( xrange : np . ndarray , yrange : np . ndarray , step : int , interrupt_at : int = 0 ) -> Tuple [ np . ndarray , np . ndarray , np . ndarray ] : y = yrange . copy ( ) y [ step : ] = np . nan x = np . empty ( ( len ( yrange ) , len ( xrange ) ) ) x . fill ( np . nan ) z = x . copy ( ) for stepind in range ( step ) : xrow = xrange . copy ( ) if stepind == step - 1 : xrow [ interrupt_at : ] = np . nan zrow = np . random . randn ( len ( xrange ) ) if stepind == step - 1 : zrow [ interrupt_at : ] = np . nan x [ stepind , : ] = xrow z [ stepind , : ] = zrow return x , y , z
Make x, y, and z np.arrays like a Loop measurement would.
Make x y and z np . arrays like a Loop measurement would .
"""
    Make x, y, and z np.arrays like a Loop measurement would. In particular
    get the positions of nans right.

    Args:
        xrange: a 1D array with inner loop set values
        yrange: a 1D array with outer loop set values
        step: is the outer loop (y) step, describes how far we are in the
          measurement (0: all NaNs, len(y): all data)
        interrupt_at: inner loop step to interrupt at

    Returns:
        (x, y, z) where z is random noise
    """
(x, y, z) where z is random noise
( x y z ) where z is random noise
xrange
np.ndarray
a 1D array with inner loop set values
a 1D array with inner loop set values
yrange
np.ndarray
a 1D array with outer loop set values
a 1D array with outer loop set values
step
int
None
interrupt_at
int
inner loop step to interrupt at
inner loop step to interrupt at