GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Code Duplication    Length = 21-21 lines in 2 locations

voltcycle/functions_and_tests/core.py 1 location

@@ 327-347 (lines=21) @@
324
    return y_base
325
326
327
def linear_background(vec_x, vec_y):
328
    """
329
    This function is wrapping function for calculating linear fitted line.
330
    It takes x and y values of the cv data, returns the fitted baseline.
331
    ----------
332
    Parameters
333
    ----------
334
    x : Output of the split vector function. x value of the cyclic voltammetry data.
335
    y : Output of the split vector function. y value of the cyclic voltammetry data.
336
    -------
337
    Returns
338
    -------
339
    List of constructed y_labels.
340
    """
341
    assert isinstance(vec_x, np.ndarray), "Input of the function should be numpy array"
342
    assert isinstance(vec_y, np.ndarray), "Input of the function should be numpy array"
343
    idx = critical_idx(vec_x, vec_y) + 5 #this is also arbitrary number we can play with.
344
    m_val, b_val = (linear_coeff(vec_x[(idx - int(0.5 * idx)) : (idx + int(0.5 * idx))],
345
                                 vec_y[(idx - int(0.5 * idx)) : (idx + int(0.5 * idx))]))
346
    y_base = y_fitted_line(m_val, b_val, vec_x)
347
    return y_base
348
349
350
def peak_detection_fxn(data_y):

voltcycle/functions_and_tests/baseline.py 1 location

@@ 168-188 (lines=21) @@
165
    return y_base
166
167
168
def linear_background(vec_x, vec_y):
169
    """
170
    This function is wrapping function for calculating linear fitted line.
171
    It takes x and y values of the cv data, returns the fitted baseline.
172
    ----------
173
    Parameters
174
    ----------
175
    x : Output of the split vector function. x value of the cyclic voltammetry data.
176
    y : Output of the split vector function. y value of the cyclic voltammetry data.
177
    -------
178
    Returns
179
    -------
180
    List of constructed y_labels.
181
    """
182
    assert isinstance(vec_x, np.ndarray), "Input of the function should be numpy array"
183
    assert isinstance(vec_y, np.ndarray), "Input of the function should be numpy array"
184
    idx = critical_idx(vec_x, vec_y) + 5 #this is also arbitrary number we can play with.
185
    m_val, b_val = (linear_coeff(vec_x[(idx - int(0.5 * idx)) : (idx + int(0.5 * idx))],
186
                                 vec_y[(idx - int(0.5 * idx)) : (idx + int(0.5 * idx))]))
187
    y_base = y_fitted_line(m_val, b_val, vec_x)
188
    return y_base
189