forked from federicoscarpioni/pyeclab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathauxiliary_functions.py
29 lines (22 loc) · 1.23 KB
/
auxiliary_functions.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
from dataclasses import dataclass
import os
#------------------------------------------------------------------------------#
def load_sequence_from_json(path:str) -> list: # Specify which object type will be the list elements
return sequence
#------------------------------------------------------------------------------#
def create_empty_json_sequence(path:str, techniques:list[str]):
...
#------------------------------------------------------------------------------#
def update_CA_voltage(api, Ewe, technique):
CA_parm_names = {
'voltage_step': ECC_parm("Voltage_step", float),
'step_duration': ECC_parm("Duration_step", float),
'vs_init': ECC_parm("vs_initial", bool),
}
idx = 0 # Only one current step is used
p_voltage_steps = list()
p_voltage_steps.append( make_ecc_parm(api, CA_parm_names['voltage_step'], Ewe, idx ) )
p_voltage_steps.append( make_ecc_parm(api, CA_parm_names['step_duration'], technique.user_params.duration, idx ) )
p_voltage_steps.append( make_ecc_parm(api, CA_parm_names['vs_init'], technique.user_params.vs_init, idx ) )
return make_ecc_parms(api,*p_voltage_steps)
#==============================================================================#