| @@ 404-434 (lines=31) @@ | ||
| 401 | return index_list |
|
| 402 | ||
| 403 | ||
| 404 | def peak_values(DataFrame_x, DataFrame_y): |
|
| 405 | """Outputs x (potentials) and y (currents) values from data indices |
|
| 406 | given by peak_detection function. |
|
| 407 | ||
| 408 | ---------- |
|
| 409 | Parameters |
|
| 410 | ---------- |
|
| 411 | DataFrame_x : should be in the form of a pandas DataFrame column. |
|
| 412 | For example, df['potentials'] could be input as the column of x |
|
| 413 | data. |
|
| 414 | ||
| 415 | DataFrame_y : should be in the form of a pandas DataFrame column. |
|
| 416 | For example, df['currents'] could be input as the column of y |
|
| 417 | data. |
|
| 418 | ||
| 419 | Returns |
|
| 420 | ------- |
|
| 421 | Result : numpy array of coordinates at peaks in the following order: |
|
| 422 | potential of peak on top curve, current of peak on top curve, |
|
| 423 | potential of peak on bottom curve, current of peak on bottom curve""" |
|
| 424 | index = peak_detection_fxn(DataFrame_y) |
|
| 425 | potential1, potential2 = split(DataFrame_x) |
|
| 426 | current1, current2 = split(DataFrame_y) |
|
| 427 | Peak_values = [] |
|
| 428 | Peak_values.append(potential2[(index[0])]) # TOPX (bottom part of curve is |
|
| 429 | # the first part of DataFrame) |
|
| 430 | Peak_values.append(current2[(index[0])]) # TOPY |
|
| 431 | Peak_values.append(potential1[(index[1])]) # BOTTOMX |
|
| 432 | Peak_values.append(current1[(index[1])]) # BOTTOMY |
|
| 433 | Peak_array = np.array(Peak_values) |
|
| 434 | return Peak_array |
|
| 435 | ||
| 436 | ||
| 437 | def del_potential(DataFrame_x, DataFrame_y): |
|
| @@ 24-54 (lines=31) @@ | ||
| 21 | return fake_line_array |
|
| 22 | ||
| 23 | ||
| 24 | def peak_values(DataFrame_x, DataFrame_y): |
|
| 25 | """Outputs x (potentials) and y (currents) values from data indices |
|
| 26 | given by peak_detection function. |
|
| 27 | ||
| 28 | ---------- |
|
| 29 | Parameters |
|
| 30 | ---------- |
|
| 31 | DataFrame_x : should be in the form of a pandas DataFrame column. |
|
| 32 | For example, df['potentials'] could be input as the column of x |
|
| 33 | data. |
|
| 34 | ||
| 35 | DataFrame_y : should be in the form of a pandas DataFrame column. |
|
| 36 | For example, df['currents'] could be input as the column of y |
|
| 37 | data. |
|
| 38 | ||
| 39 | Returns |
|
| 40 | ------- |
|
| 41 | Result : numpy array of coordinates at peaks in the following order: |
|
| 42 | potential of peak on top curve, current of peak on top curve, |
|
| 43 | potential of peak on bottom curve, current of peak on bottom curve""" |
|
| 44 | index = peak_detection_fxn(DataFrame_y) |
|
| 45 | potential1, potential2 = split(DataFrame_x) |
|
| 46 | current1, current2 = split(DataFrame_y) |
|
| 47 | Peak_values = [] |
|
| 48 | Peak_values.append(potential2[(index[0])]) # TOPX (bottom part of curve is |
|
| 49 | # the first part of DataFrame) |
|
| 50 | Peak_values.append(current2[(index[0])]) # TOPY |
|
| 51 | Peak_values.append(potential1[(index[1])]) # BOTTOMX |
|
| 52 | Peak_values.append(current1[(index[1])]) # BOTTOMY |
|
| 53 | Peak_array = np.array(Peak_values) |
|
| 54 | return Peak_array |
|
| 55 | ||
| 56 | ||
| 57 | def del_potential(DataFrame_x, DataFrame_y): |
|