#Python Articles



  • Mon 11 September 2017
  • Misc

Creating Energy Band Diagrams for Solar cells and LED

Energy band diagrams are used to visulize the electron and hole transport in Solar cells and LED research. I want to quickly draw them and came up with a python module. Here's an example on how to use this code. from Band_diagram import metal, semiconductor, plot # Define the metals and …

  • Sat 29 October 2016
  • Misc

Tab autocompletetion with python interpreter in bash terminal

I want to tab autocomplete commands in my python interpreter within bash terminal. This is very useful when I import a module and just want to browse through the methods and autocomplete. Found two ways to do it. Thanks to stack overflow posts. Method 1 (as mentioned here): This is …

  • Wed 30 March 2016
  • Misc

Dealing with plotting negative, zero and positive values in log scale

Sometimes you have to show positive, zero and negative number in log scale. However you cannot take log of negative numbers and zero. But one could approximate it with a log transform modulus as stated here. In Python with numpy: from numpy import sign, abs, log10 import matplotlib.pyplot as …

Controlling Rigol Dp832 with python

DC power supplies are very handy for electronic projects. They help to apply bias/voltage to a device. Controlling it by a computer by a program is helpful in advanced projects where timing and accurate control is an issue. I got my hands on a RIGOL DP832 which is three …


  • Sun 17 January 2010
  • Misc

Python

I am playing with Python for the first time. The syntax seems to be so natural. So many modules (numpy, scipy and matplotlib) for researchers/scientists. Cannot see any shortcoming at this point. Perhaps need more testing and implementation.