DutLib module

Is used to manage measurement data of many devices in a unified way. DutLib offers methods to import many files at once and then save and load them inside the Python/DMT environment efficiently.

In order to start the import process the data should be saved in this file structure:

meas/
├── DeviceA/
│   ├── T1/
│   │   ├── meas_1
│   │   └── meas_2
│   └── T2/
│       ├── meas_1
│       └── meas_2
└── DeviceA/
    ├── T1/
    │   ├── meas_1
    │   └── meas_2
    └── T2/
        ├── meas_1
        └── meas_2

DutLib module code documentation

class DMT.core.dut_lib.DutLib(deem_types: List[DutType] | None = None, AC_filter_names=None, DC_filter_names=None, is_deembedded_DC=False, is_deembedded_AC=False, save_dir=None, force=False, n_jobs=4)[source]

Bases: object

DutLib is a class managing a library in which measured DUTs in DMT are contained.

Class is able to match any device type with its corresponding deembedding dummies and perform the deembedding process.

Parameters:
deem_types[DutType], optional

A list of dut_types, that are used to filter the incoming list of duts for those devices that need deembedding.

AC_filter_names[tuple], optional

List of filter tuples that are used to determine the deembedding file corresponding to one measurement file. (e.g.: [(‘freq’, ‘hot’),(‘Spar’, ‘cold’)],…)

DC_filter_names[tuple], optional

List of filter tuples that are used to determine the deembedding file corresponding to one measurement file. (e.g.: [(‘freq’, ‘hot’),(‘Spar’, ‘cold’)],…)

is_deembedded_ACbool, optional

If true, all devices in the library have been AC deembedded.

is_deembedded_DCbool, optional

If true, all devices in the library have been DC deembedded.

save_dirstr, optional

Here the DutLib will try to save itself

forcebool, optional

If True, a already existing library will be deleted.

n_jobsint, optional

Number of parallel jobs, passed on to joblib.Parallel.

Attributes:
deem_types[DutType]

A list of dut_types, that are used to filter the incoming list of duts for those devices that need deembedding.

AC_filter_names[tuple]

List of filter tuples that are used to determine the deembedding file corresponding to one measurement file. (e.g.: [(‘freq’, ‘hot’),(‘Spar’, ‘cold’)],…)

DC_filter_names[tuple]

List of filter tuples that are used to determine the deembedding file corresponding to one measurement file. (e.g.: [(‘freq’, ‘hot’),(‘Spar’, ‘cold’)],…)

is_deembedded_ACbool

If true, all devices in the library have been AC deembedded.

is_deembedded_DCbool

If true, all devices in the library have been DC deembedded.

duts[DutView]

The devices that shall be managed by this dut

dut_refDutView

Returns always just self._dut_ref

dut_intrinsicDutView

Returns always just self._dut_intrinsic

dut_internalDutView

Returns always just self._dut_internal

save_dirstr

Just return save dir

n_jobsint, optional

Number of parallel jobs, passed on to joblib.Parallel.

waferint or str

A unique identifier of the wafer that the data in this lib stems from

date_tapeoutstr

Tapeout date.

date_receivedstr

Received date.

Methods

find_devices(type)

Searches for all devices of the specified type and puts them into a separate list.

sort_duts()

Assigns the correct Deembedding structures to the DUT.

deembed_AC()

Deembeds measured AC data with the corresponding O&S data.

deembed_DC()

Deembeds measured AC data with the corresponding O&S data.

add_duts(duts: List[DutView] | DutView)[source]

Add duts to the DutLib duts array.

Parameters:
duts[DutView] or DutView

The dut or duts that shall be added.

deembed_AC(width_filter, length_filter, name_filter, user_fun=None)[source]

Assign O&S structures to the correct devices for later deembedding process and adds the thus assigned devices to a new list, which only includes teststructures for characterization and no O&S structures separately.

Parameters:
width_filterbool

If true: use de-embedding structures at same width, else ignore width.

length_filterbool

If true: use de-embedding structures at same length, else ignore length.

name_filterbool

If true: use de-embedding structures with same string in property ‘deemb_name’, else ignore.

user_funcallable(), optional

User specific function that gets one Dut object as an argument and returns the corresponding open, short Duts.

Notes

..todo: allow the user to pass his own filters.

Methods

lowLevelSort(testStru,fn)

Applies the necessary filter functions to a device and a deembedding structure and adds the correct deembedding structure accordingly to the device.

deembed_DC(width_filter, length_filter, name_filter, function_dut=None, function_df=None, shorts=None, t_ref=300, forced_current=False)[source]

Assign O&S structures to the correct devices for later deembedding process and adds the thus assigned devices to a new list, which only includes teststructures for characterization and no O&S structures separately.

Parameters:
duts[duts]

List of duts that needs to be sorted.

shorts[duts], None

List of shorts that should be used.

function_dutfunction, optional

a function method(dut_short) that returns the metallization resistances as a dict {‘R_EM’:float64, ‘R_BM’:float64, ‘R_CM’:float64}. Use this if the default DMT DC deembeding is not suitable.

function_dffunction, optional

a function method(df_short) that returns the metallization resistances as a dict {‘R_EM’:float64, ‘R_BM’:float64, ‘R_CM’:float64}. Use this if the default DMT DC deembeding is not suitable.

t_reffloat, optional

Temperature of the metallization resistances to return

Returns:
mresdict

{‘R_EM’:float64, ‘R_BM’:float64, ‘R_CM’:float64}

Notes

..todo: allow the user to pass his own filters.

Methods

lowLevelSort(testStru,fn)

Applies the necessary filter functions to a device and a deembedding structure and adds the correct deembedding structure accordingly to the device.

deembed_dut_AC(dut, dut_open, dut_short)[source]

Checks for all AC measurement data that needs to be deembedded. Differentiates between hot and cold S-parameters and picks the deembedding files accordingly.

Parameters:
dut[dut]

Current DuT which is to be deembedded.

dut_open[dut.DutType.open_deem]

Corresponding open

dut_short[dut.DutType.short_deem]

Corresponding short

deembed_dut_DC(dut, dut_short, function_dut=None, function_df=None, t_ref=300, forced_current=False)[source]

Deembeds all DC_measurements in GSG-Pads.

Parameters:
dut[dut]

Current DuT which is to be deembedded.

dut_short[dut.DutType.short_deem]

Corresponding short

function_dutfunction, optional

a function method(dut_short) that returns the metallization resistances as a dict {‘R_EM’:float64, ‘R_BM’:float64, ‘R_CM’:float64}. Use this if the default DMT DC deembeding is not suitable.

function_dffunction, optional

a function method(df_short) that returns the metallization resistances as a dict {‘R_EM’:float64, ‘R_BM’:float64, ‘R_CM’:float64}. Use this if the default DMT DC deembeding is not suitable.

t_reffloat, optional

Temperature of the metallization resistances to return

Returns:
dict{‘R_EM’:float64, ‘R_BM’:float64, ‘R_CM’:float64}
property dut_internal[source]

Returns always just self._dut_internal

property dut_intrinsic[source]

Returns always just self._dut_intrinsic

property dut_ref[source]

Returns always just self._dut_ref

find_devices(devtype)[source]

Searches the list of duts read in from the specified folder previously for the specified dut_type and adds all identified devices to a new list.

Parameters:
devtypetuple

Contains one or several dut_types that are to be identified to be added to a new list.

import_directory(import_dir, dut_filter, dut_level=1, temperature_converter=None, force=True, **kwargs)[source]

Read in all files in import_dir into a DutLib object.

Read in all devices in the subfolders of a directory.

Data “dut_level” folders apart with respect to import_dir will be stored into one database and one DutView object. Example folder structure to illustrate this principle:

Measurement
├───die1
|   ├───Device1
|   └───Device2
└───die2
    └───Device1

then for importing with this method, import_dir is set to Measurement/ and dut_level is set to 2. The DutView objects need to be supplied by the callable object (function) dut_filter, which is supplied by the user. The dut_filter function is called with the DutView’s relative path with respect to import dir and shall return a fully initialized DutView object.

Parameters:
import_dirstr or os.Pathlike

Path to the directory that contains all dies on a wafer.

dut_filtercallable()

User supplied function that is called with the relative paths dut_level levels below import_dir and returns DutView objects.

dut_levelint

Subfolder level that contains data of ONE specifid DutView. Files that lie in this level will be put into one database.

temperature_convertercallable() object, optional

Called to convert the directory name into a key part. If key does not contain a temperature, it should return -1. If it does contain a temperature, the temperature in Kelvin should be returned. Defaults to temp_converter_default()

forcebool

Default = True. If True, databases and duts that have already been imported are overwritten.

kwargsbool

Additional keyword arguments that are passed to the read_data routines, which are called to read the (mdm, csv or elpa) data. E.g. if you have delimiter ‘,’ in your .csv file, pass delimeter=’,’.

Returns:
duts[DutView]

DutViews loaded from the given directory

static load(lib_directory, classes_technology: List[Type[Technology]] | None = None, classes_dut_view: List[Type[DutView]] | None = None) DutLib[source]

Static class method. Loads a DutLib object from a pickle or json file with full path lib_directory.

Parameters:
lib_directorystr or os.Pathlike

Path to the direcotry that contains a pickled DutLib object that shall be loaded.

classes_technologyList[Type[Technology]]

All possible technologies this loaded DutView can have. One will be chosen according to the serialized technology loaded from the file.

classes_dut_viewList[Type[DutView]]

All possible DutViews this loaded DutView can be. One will be chosen according to the serialized DutView class name loaded from the file.

Returns:
DutLib

Loaded object from the json or pickle file.

load_database(database_dir, only_meas=True)[source]

Loads all DuTs from a given database directory. Does NOT load the data of the duts, they are loaded using run_and_read

Parameters:
database_dirstr
only_meas{True, False}, optional

If True, only folders without “_hash_” are loaded. This is exclusive for DutMeas

Returns:
duts[DutView]

DutViews loaded from the given directory

normalize(dut_type)[source]
save()[source]

Save the DutLib to save_dir.

The DutLib will be saved as a json file and in the folder “duts” there will be the DutViews. It will save all the DutViews including the ignored ones.

property save_dir[source]

Just return save dir

toTex()[source]

This function generates a TeX representation of a DutLib.

This function generates a section with the title “Measured Devices” For each DutType a table is generated that summarizes the available device dimensions for this DutType.

class DMT.core.dut_lib.LenFilter[source]

Bases: __Filter

Subclass of __Filter, that compares the device’s and the testStructure’s emitter length.

class DMT.core.dut_lib.LenNameFilter[source]

Bases: object

Class that combines the typically used filters for emitter length and device name.

filter(dev, testStructure)[source]
class DMT.core.dut_lib.NameFilter[source]

Bases: __Filter

Subclass of __Filter, that compares the device’s and the testStructure’s name (contact configuration).

class DMT.core.dut_lib.WidthFilter[source]

Bases: __Filter

Subclass of __Filter, that compares the device’s and the testStructure’s emitter width.