A Python3 library for: - Data science - Electronics Engineering - Specialized algorithms - Physics which contains a collection of functions I haven't found elsewhere. Some algorithms have also been accepted on my blog https://techoverflow.net/
Pull requests and bugreports of any kind are happily accepted.
Run this command on your favourite shell:
pip install UliEngineeringIn order to install the latest bleeding-edge version, use:
pip install git+https://github.com/ulikoehler/UliEngineering.gitWe highly recommend you also install scipy:
pip install scipy(you can also use sudo apt install python3-scipy on Debian-based Linux distros).
While scipy is technically optional and listed as an optional dependency, many UliEngineering modules can't be used without it, including (might not be complete!):
- UliEngineering.Length
- UliEngineering.SignalProcessing.Interpolation
- UliEngineering.SignalProcessing.Correlation
- UliEngineering.Physics.JohnsonNyquistNoise
- Some functions in UliEngineering.SignalProcessing.Simulation
- Some functions in UliEngineering.SignalProcessing.Selection
After that you can use UliEngineering from any Python3 instance. Example:
$ python3
Python 3.5.2 (default, Nov 17 2016, 17:05:23)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from UliEngineering.EngineerIO import *
>>> format_value(0.015, "V")
'15.0 mV'On my blog, I've posted several easy-to-use examples on how to solve real-world problems using UliEngineering:
- Engineering for the super-lazy: Solving equations without activating your brain
- Finding the nearest E96 resistor value in Python
- Calculating the NCP380 ILIM resistor using Python
- Normalizing electronics engineering value notations using Python
- Computing the LP2980 adjust resistor using Python
- Accurate calculation of PT100/PT1000 temperature from resistance
- Reading a shapefile directly from a zip using pyshp
- Computing bounding box for a list of coordinates in Python
- How to solve git fatal: no configured push destination
- Easy zero crossing detection in Python using UliEngineering
- Easily generate sine/cosine wave test data in Python using UliEngineering
- Easily generate square/triangle/sawtooth/inverse sawtooth waveform data in Python using UliEngineering
- Easily compute & visualize FFTs in Python using UliEngineering
- Computing the temperature under load of your electronics components in Python using UliEngineering
- Computing crystal load capacitance using Python & UliEngineering
- How to convert Celsius/Fahrenheit/Kelvin temperatures in Python using UliEngineering
- How to get current datetime as NumPy datetime (np.datetime64)
- How to convert NumPy timedelta (np.timedelta64) object to integer
- How to get unit/resolution of NumPy np.timedelta64 object
- How to get unit/resolution of NumPy np.datetime64 object
- How to iterate all days of year using Python
- How to get number of days in month in Python
- Capacitive reactance online calculator (Python code)
- Inductive reactance online calculator (Python code)
- Capacitor energy from capacitance and voltage online calculator (Python code)
- How to compute candelas from lumens by apex angle
- How to create pandas time series dataframe example dataset
- Matplotlib custom SI prefix unit tick formatter
- How to skip first element of a generator/iterator in Python
- How to compute crystal load capacitors using Python
- How to tune your crystal oscillator to get the best possible frequency accuracy
- How to compute resistor voltage divider ratio using Python
- How to fix tox AttributeError: module 'virtualenv.create.via_global_ref.builtin.cpython.mac_os' has no attribute 'cpython2macosarmframework'
- How to DC-sweep resistive voltage divider using PySpice
- How to simulate resistive voltage divider using PySpice
- How to compute & plot sun path diagram using skyfield in Python
- How to generate datetime for every hour on a given day in Python
- How to generate datetime for every minute on a given day in Python
- How to generate datetime for every second on a given day in Python
- How to generate filename with date & time in Python
- How to compute MRI Larmor frequency for a given magnetic field using Python
- How to compute voltage divider output voltage using Python
- How to format axis as dB (decibel) using matplotlib
- How to compute Buck/Boost/LDO output voltage by feedback resistors using Python
- How to compute the weight of a titanium or stainless steel rod using UliEngineering in Python
- How to ignore warnings in Python unit tests (pytest / tox)
- How to compute non-inverting OpAmp amplifier gain using UliEngineering in Python
- How to compute MOSFET gate charge loss power using Python
- How to compute capacitor constant current charge/discharge time using Python
- Calculating diode maximum power disspation using Python
- Simple buck regulator inductor selection using Python
- How to plot MOSFET Gate capacitance vs gate drive voltage in Python
- How to select crystal & load capacitors for the DP83T510E 10Base-T1L Single-Pair Ethernet PHY
- How to fix Poetry publish HTTP Error 403: Invalid or non-existent authentication information
- Advanced LED series resistor value & power disspation calculation using Python
- How to plot MOSFET with gate series resistor RC lowpass cutoff frequency
- CAN bus split termination: What are typical component values?
- 200nm to 200μm water extinction coefficient model in Python
- How to compute the amount in moles of XX grams of DNA using Python
- How to compute the exact weight of single-strand DNA using Python
- How long can quarter-wavelength stubs on PCBs actually be?
- The correlation of impedance and reactance for common-mode chokes
- Plotting microstrip impedance vs width using UliEngineering
- How to unwrap encoder values or angles which wrap at a certain numeric point
- How to generate periodic ramps in Python using UliEngineering
- Even simpler buck regulator calculation using Python
- Comparing simple and Shockley diode models for capacitor charging in Python using UliEngineering
- How to compute R/C time constant in Python using UliEngineering
- How to compute capacitor charge/discharge time through a resistor using Python
- How to compute diode current using the Shockley equation in Python using UliEngineering
- How to compute diode power dissipation using the Shockley equation in Python using UliEngineering
- How to compute diode saturation current using the Shockley equation in Python using UliEngineering
- How to compute diode small-signal resistance in Python using UliEngineering
- How to compute diode thermal voltage in Python using UliEngineering
- How to compute diode voltage using the Shockley equation in Python using UliEngineering
- How to plot Shockley diode current in Python using UliEngineering
- How to compute parallel resistor values in Python using UliEngineering
- How to compute series resistor values in Python using UliEngineering
- How to convert acceleration from g to m/s² in Python using UliEngineering
- How to convert acceleration from m/s² to g in Python using UliEngineering
- How to convert pressure from pascal to bar in Python using UliEngineering
- How to convert pressure from bar to pascal in Python using UliEngineering
- How to convert rotational speed from rpm to Hz in Python using UliEngineering
- How to convert rotational speed from Hz to rpm in Python using UliEngineering
- How to compute angular speed in Python using UliEngineering
- How to remove DC offset from signals in Python using UliEngineering
- How to compute peak-to-peak values in Python using UliEngineering
- How to convert RMS to peak-to-peak for sinusoids in Python using UliEngineering
- How to extract months from NumPy datetime64 arrays in Python using UliEngineering
- How to extract years from NumPy datetime64 arrays in Python using UliEngineering
- How to extract day of month from NumPy datetime64 arrays in Python using UliEngineering
- How to extract day of week from NumPy datetime64 arrays in Python using UliEngineering
- How to find the next higher standard resistor value in Python using UliEngineering
- How to find the next lower standard resistor value in Python using UliEngineering
- How to compute buck regulator duty cycle in Python using UliEngineering
- How to compute voltage divider resistors by ratio in Python using UliEngineering
- How to compute current through resistor in Python using UliEngineering
- How to compute voltage across resistor in Python using UliEngineering
- How to compute resistor value from voltage and current in Python using UliEngineering
- How to compute power from current and voltage in Python using UliEngineering
- How to compute current from power and voltage in Python using UliEngineering
- How to compute resistor current from power and resistance in Python using UliEngineering
- How to compute resistor value from voltage and power in Python using UliEngineering
- How to compute voltage divider bottom resistor by ratio in Python using UliEngineering
- How to compute voltage divider current in Python using UliEngineering
- How to compute voltage divider power in Python using UliEngineering
- How to generate datetime array for days in Python using UliEngineering
- How to generate datetime array for years in Python using UliEngineering
- How to generate datetime array for months in Python using UliEngineering
- How to check if datetime is first day of month in Python using UliEngineering
- How to check if datetime is first day of week in Python using UliEngineering
- How to check if datetime is month change in Python using UliEngineering
- How to check if datetime is year change in Python using UliEngineering
- How to compute velocity factor in Python using UliEngineering
- How to compute signal propagation delay in Python using UliEngineering
- How to convert FIT to MTTF in Python using UliEngineering
- How to convert MTTF to FIT in Python using UliEngineering
- How to convert FIT to MTTFd in Python using UliEngineering
- How to convert MTTFd to FIT in Python using UliEngineering
- How to convert PFH to MTTF in Python using UliEngineering
- How to convert MTTF to PFH in Python using UliEngineering
- How to convert B10d to MTTFd in Python using UliEngineering
- How to convert MTTFd to B10d in Python using UliEngineering
- How to convert capacitive reactance to capacitance in Python using UliEngineering
- How to compute actual crystal load capacitance in Python using UliEngineering
- How to compute buffer capacity in Python using UliEngineering
- How to compute cycles per year in Python using UliEngineering
- How to compute crystal deviation seconds per day in Python using UliEngineering
- How to compute crystal deviation seconds per hour in Python using UliEngineering
- How to compute crystal deviation seconds per minute in Python using UliEngineering
- How to compute crystal deviation seconds per month in Python using UliEngineering
- How to compute crystal deviation seconds per year in Python using UliEngineering
- How to compute dilution volume in Python using UliEngineering
- How to compute feedback bottom resistor in Python using UliEngineering
- How to compute feedback top resistor in Python using UliEngineering
- How to compute Henderson-Hasselbalch pKa in Python using UliEngineering
- How to compute limiting reagent in Python using UliEngineering
- How to compute mass fraction to molarity in Python using UliEngineering
- How to compute molality from moles and mass in Python using UliEngineering
- How to compute percent composition in Python using UliEngineering
- How to compute percent yield in Python using UliEngineering
- How to compute PREN in Python using UliEngineering
- How to compute theoretical yield in Python using UliEngineering
- How to compute voltage divider top resistor by ratio in Python using UliEngineering
- How to compute volume from molarity and moles in Python using UliEngineering
- How to compute weighted PREN in Python using UliEngineering
- How to convert moles to particles in Python using UliEngineering
- How to convert particles to moles in Python using UliEngineering
In order to run the unit tests, first install tox:
pip install --user toxand then just run it in the root directory of the cloned repository
tox