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 = 31-31 lines in 2 locations

voltcycle/core.py 1 location

@@ 406-436 (lines=31) @@
403
    # first value is the top, second value is the bottom
404
    return index_list
405
406
def peak_values(dataframe_x, dataframe_y):
407
    """Outputs x (potentials) and y (currents) values from data indices
408
        given by peak_detection function.
409
410
       ----------
411
       Parameters
412
       ----------
413
       DataFrame_x : should be in the form of a pandas DataFrame column.
414
         For example, df['potentials'] could be input as the column of x
415
         data.
416
417
        DataFrame_y : should be in the form of a pandas DataFrame column.
418
          For example, df['currents'] could be input as the column of y
419
          data.
420
421
       Returns
422
       -------
423
       Result : numpy array of coordinates at peaks in the following order:
424
         potential of peak on top curve, current of peak on top curve,
425
         potential of peak on bottom curve, current of peak on bottom curve"""
426
    index = peak_detection_fxn(dataframe_y)
427
    potential1, potential2 = split(dataframe_x)
428
    current1, current2 = split(dataframe_y)
429
    peak_values = []
430
    peak_values.append(potential2[(index[0])])  # TOPX (bottom part of curve is
431
    # the first part of DataFrame)
432
    peak_values.append(current2[(index[0])])  # TOPY
433
    peak_values.append(potential1[(index[1])])  # BOTTOMX
434
    peak_values.append(current1[(index[1])])  # BOTTOMY
435
    peak_array = np.array(peak_values)
436
    return peak_array
437
438
439
def del_potential(dataframe_x, dataframe_y):

voltcycle/calculations.py 1 location

@@ 6-36 (lines=31) @@
3
import numpy as np
4
from . import core
5
6
def peak_values(dataframe_x, dataframe_y):
7
    """Outputs x (potentials) and y (currents) values from data indices
8
        given by peak_detection function.
9
10
       ----------
11
       Parameters
12
       ----------
13
       DataFrame_x : should be in the form of a pandas DataFrame column.
14
         For example, df['potentials'] could be input as the column of x
15
         data.
16
17
        DataFrame_y : should be in the form of a pandas DataFrame column.
18
          For example, df['currents'] could be input as the column of y
19
          data.
20
21
       Returns
22
       -------
23
       Result : numpy array of coordinates at peaks in the following order:
24
         potential of peak on top curve, current of peak on top curve,
25
         potential of peak on bottom curve, current of peak on bottom curve"""
26
    index = core.peak_detection_fxn(dataframe_y)
27
    potential1, potential2 = core.split(dataframe_x)
28
    current1, current2 = core.split(dataframe_y)
29
    peak_values = []
30
    peak_values.append(potential2[(index[0])])  # TOPX (bottom part of curve is
31
    # the first part of DataFrame)
32
    peak_values.append(current2[(index[0])])  # TOPY
33
    peak_values.append(potential1[(index[1])])  # BOTTOMX
34
    peak_values.append(current1[(index[1])])  # BOTTOMY
35
    peak_array = np.array(peak_values)
36
    return peak_array
37
38
39
def del_potential(dataframe_x, dataframe_y):