Skip to content

Commit

Permalink
fix sphinx errors
Browse files Browse the repository at this point in the history
  • Loading branch information
gituser789 committed Apr 29, 2024
1 parent 992832f commit 8e3ac32
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 34 deletions.
5 changes: 3 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Install Python
Install latest Python version: `Link <https://www.python.org/>`__.

Install Pycharm (optional)
---------------
--------------------------
`Installation file <https://www.jetbrains.com/pycharm/download/download-thanks.html?platform=linux&code=PCC>`_.

Download and run executable
Expand Down Expand Up @@ -148,6 +148,7 @@ Minimal python example
*******************************

.. code-block::
from transistordatabase.database_manager import DatabaseManager
# Path for json files
Expand All @@ -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 <https://github.com/upb-lea/transistordatabase/blob/main/transistordatabase/housing_types.txt>`_ file there are
In addition to that in `this file <https://github.com/upb-lea/transistordatabase/blob/main/transistordatabase/housing_types.txt>`_ there are
more simple examples.


Expand Down
23 changes: 20 additions & 3 deletions sphinx/transistordatabase.rst
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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
2 changes: 1 addition & 1 deletion transistordatabase/checker_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
36 changes: 18 additions & 18 deletions transistordatabase/database_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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)
Expand Down
17 changes: 7 additions & 10 deletions transistordatabase/transistor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8e3ac32

Please sign in to comment.