aesim-tech / simba-project

Roadmap & issue tracking
7 stars 0 forks source link

Thermal data: TypeError: 'list' value cannot be converted to System.Double #395

Closed AdriPWS closed 8 months ago

AdriPWS commented 9 months ago

When running the python script attached, an error occurs: TypeError: 'list' value cannot be converted to System.Double

It happens when we want to manipulate the IV curve from Thermal data.

IGW08T120_IGBT.xml.txt

#%% Load modules
from aesim.simba import ThermalData
import numpy as np

thermal = ThermalData("path_to\\IGW08T120_IGBT.xml")

IV=np.array(thermal.ConductionLosses[0].IV)
IV[:,0]= IV[:,0]*2
thermal.ConductionLosses[0].IV = IV.tolist()
manu-aesim commented 9 months ago

We've modified the underlying type of IV and EI to allow direct interoperability with python.

The code above works in version 2023.12.22 and above:

#%% Load modules
from aesim.simba import ThermalData
import numpy as np

thermal = ThermalData("**path_to**\\IGW08T120_IGBT.xml")
IV=np.array(thermal.ConductionLosses[0].IV)
IV[:,0]= IV[:,0]*2
thermal.ConductionLosses[0].IV = IV.tolist()

https://aesimtech.s3.us-east-1.amazonaws.com/artifacts/qkoJGNUlXgHdEdYWUvPoQNViPfoHcWZu/simba.exe pip install aesim.simba==2023.12.22a2