Additional Functions

This is the documentation of all functions within the LS-Dyna module.

qd.cae.dyna.get_file_entropy(filepath)
Parameters
filepathstr

path to the file

Returns
entropyfloat

entropy of the file

Notes

The shannon entropy of a file describes the randomness of the bytes in the file. The value is limited between 0 and 8, where 0 means entirely structured and 8 means the file is entirely random or encrypted.

Examples

>>> get_file_entropy("path/to/encrypted_file")
7.64367
>>> get_file_entropy("path/to/text_file")
3.12390