diff --git a/README.rst b/README.rst index 8746d31..27397cb 100644 --- a/README.rst +++ b/README.rst @@ -108,7 +108,7 @@ Install Python Install latest Python version: `Link `__. Install Pycharm (optional) ---------------- +-------------------------- `Installation file `_. Download and run executable @@ -148,6 +148,7 @@ Minimal python example ******************************* .. code-block:: + from transistordatabase.database_manager import DatabaseManager # Path for json files @@ -163,7 +164,7 @@ Minimal python example # load a transistor from the database transistor_loaded = tdb_json.load_transistor('CREE_C3M0016120K') -In addition to that in `this `_ file there are +In addition to that in `this file `_ there are more simple examples. diff --git a/sphinx/transistordatabase.rst b/sphinx/transistordatabase.rst index 37d6fb5..430f1fb 100644 --- a/sphinx/transistordatabase.rst +++ b/sphinx/transistordatabase.rst @@ -1,9 +1,23 @@ Documentation ========================== + +The ``DatabaseManager`` class +***************************** + +.. currentmodule:: transistordatabase.database_manager + +.. autoclass:: DatabaseManager + :members: + :undoc-members: + :show-inheritance: + :special-members: __init__ + :member-order: bysource + + The ``Transistor`` class ***************************** -.. currentmodule:: transistordatabase.tdb_classes +.. currentmodule:: transistordatabase.transistor .. autoclass:: Transistor :members: @@ -16,5 +30,8 @@ The ``Transistor`` class General methods ************************** -.. automodule:: transistordatabase.tdb_functions - :members: csv2array,merge_curve,print_tdb,connect_tdb,connect_local_tdb,r_g_max_rapid_channel_turn_off +.. automodule:: transistordatabase.helper_functions + :members: merge_curve,r_g_max_rapid_channel_turn_off + +.. automodule:: transistordatabase.checker_functions + :members: csv2array diff --git a/transistordatabase/checker_functions.py b/transistordatabase/checker_functions.py index f62e5db..1dcc02c 100644 --- a/transistordatabase/checker_functions.py +++ b/transistordatabase/checker_functions.py @@ -92,7 +92,7 @@ def csv2array(csv_filename: str, first_xy_to_00: bool = False, second_y_to_0: bo case of nonlinear input/output capacities, e.g. c_oss, c_iss, c_rss :type first_x_to_0: bool :param mirror_xy_data: Takes the absolute() of both axis. Used for given mirrored data, - e.g. some datasheet show diode data in the 3rd quadrant instead of the 1st quadrant + e.g. some datasheet show diode data in the 3rd quadrant instead of the 1st quadrant :type mirror_xy_data: bool :return: 1d array, ready to use in the transistor database diff --git a/transistordatabase/database_manager.py b/transistordatabase/database_manager.py index 2a68131..84b2474 100644 --- a/transistordatabase/database_manager.py +++ b/transistordatabase/database_manager.py @@ -541,6 +541,7 @@ def parallel_transistors(self, transistor: Transistor, count_parallels: int = 2) - channel characteristics will be modified - e_on/e_off/e_rr characteristics will be modified - thermal behaviour will be modified + :param transistor: transistor object to paralize :type transistor: Transistor :param count_parallels: count of parallel transistors of same type, default = 2 @@ -706,9 +707,7 @@ def export_single_transistor_to_json(transistor: Transistor, file_path: Optional :param transistor: transistor name :type transistor: Transistor - :param file_path: Specify a directory or a file path. In case of a directory, the transistor_name.json is used - as a file name. In case of None, the current working directory is used together with - the transistor_name.json as a file name. + :param file_path: Specify a directory or a file path. :type file_path: Optional[str] """ if file_path is None: @@ -733,21 +732,22 @@ def dpt_save_data(measurement_dict: Dict) -> Dict: :type measurement_dict: dict example to call this function: - dpt_save_dict = { - 'path': 'C:/Users/.../GaN-Systems/400V/*.csv', - 'dataset_type': 'graph_i_e', - 'comment': '', - 'load_inductance': 750e-6, - 'commutation_inductance': 15.63e-9, - 'commutation_device': 'IDH06G65C6', - 'measurement_date': None, - 'measurement_testbench': 'LEA-UPB Testbench', - 'v_g': 12, - 'v_g_off': 0, - 'energies': 'both', - 'r_g_off': 1.8, - 'integration_interval': 'IEC 60747-8', - 'mode': 'analyze'} + + >>> dpt_save_dict = { + >>> 'path': 'C:/Users/.../GaN-Systems/400V/*.csv', + >>> 'dataset_type': 'graph_i_e', + >>> 'comment': '', + >>> 'load_inductance': 750e-6, + >>> 'commutation_inductance': 15.63e-9, + >>> 'commutation_device': 'IDH06G65C6', + >>> 'measurement_date': None, + >>> 'measurement_testbench': 'LEA-UPB Testbench', + >>> 'v_g': 12, + >>> 'v_g_off': 0, + >>> 'energies': 'both', + >>> 'r_g_off': 1.8, + >>> 'integration_interval': 'IEC 60747-8', + >>> 'mode': 'analyze'} >>> import transistordatabase as tdb >>> dpt_energies_dict = tdb.dpt_save_data(dpt_save_dict) diff --git a/transistordatabase/transistor.py b/transistordatabase/transistor.py index 076e5c5..a80a982 100644 --- a/transistordatabase/transistor.py +++ b/transistordatabase/transistor.py @@ -1484,12 +1484,11 @@ def export_simulink_loss_model(self, r_g_on: float = None, r_g_off: float = None >>> transistor.export_simulink_loss_model() .. note:: - - temperature next to 25 and 150 degree at 15V gate voltage will be used for channel and switching loss - - in case of just one temperature curve, the upper temperature will increased (+1K) to bring a small - temperature change in the curves. Otherwise the model will not work - - only necessary data from tdb will be exported to simulink - - Simulink model need switching energy loss in 'mJ' - - in case of no complete curve (e.g. not starting from zero), this tool will interpolate the curve + - temperature next to 25 and 150 degree at 15V gate voltage will be used for channel and switching loss + - in case of just one temperature curve, the upper temperature will increased (+1K) to bring a small temperature change in the curves. + - only necessary data from tdb will be exported to simulink + - Simulink model need switching energy loss in 'mJ' + - in case of no complete curve (e.g. not starting from zero), this tool will interpolate the curve .. todo:: C_th is fixed at the moment to 1e-6 for switch an diode. Needs to be calculated from ohter data """ @@ -2150,8 +2149,7 @@ def get_curve_data(self, channel_recheck: bool, gate_voltages: List) -> Dict: Collect the available information of switch and diode from transistor object and passes it to plecs_exporter(..) for generating the diode and switch .xml files - :param channel_recheck: if set to True, collects the channel and energy curve characteristics at nearest - gate voltage if the given gate voltages are not found + :param channel_recheck: if True, collect the channel and energy curve characteristics at nearest gate voltage if the given gate voltages are not found :type channel_recheck: bool :param gate_voltages: turn on and off gate voltages for selecting the curves of switch and diode :type gate_voltages: list @@ -2499,8 +2497,7 @@ def add_temp_depend_resistor_data(self, r_channel_data: Union[Dict, List], clear .. note:: Transistor object must be loaded first before calling this method - :param r_channel_data: argument represents the TemperatureDependResistance dictionaries objects that needs - to be added to transistor.switch.r_channel_th object + :param r_channel_data: TemperatureDependResistance dictionary object that needs to be added to transistor.switch.r_channel_th object :type r_channel_data: dict or list :param clear: set to true if to clear the existing r_channel_th curves on the transistor object :type clear: bool