OutlierVentures / QTM-Interface

GNU General Public License v3.0
28 stars 18 forks source link

KeyError in generate_parameter_sweep #1

Closed achimstruve closed 1 year ago

achimstruve commented 1 year ago

I get the following error when running the 3rd cell in ./Model/run.ipynb

File [...\venv\lib\site-packages\radcad\core.py:159](file:///C:/Users/.../venv/lib/site-packages/radcad/core.py:159), in generate_parameter_sweep(params)
    156 param_set = {}
    157 for (key, value) in params.items():
    158     param = (
--> 159         value[sweep_index]
    160         if sweep_index < len(value)
    161         else value[-1]
    162     )
    163     param_set[key] = param
    164 param_sweep.append(param_set)

KeyError: 0

This could be caused by the way you structured the system parameters in ./Model/sys_params.py. I saw that you pass libraries instead of an iterable list of parameters to the sys_param variable. Are you sure we can do that? Otherwise we'd need to get rid of the libraries and instead pass the parameters directly.

BlockBoy32 commented 1 year ago

I have been running it fine with how the sys_param is currently structured so I am not sure what the error is being caused by. I can check it out.