Articles


  • 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 …

DDSCAT on amazon EC2

Amazon provides high performance computing capabilities through their EC2 service. You can find more information here They provide a 750 hr free instance with their a free-tier program. If you want more resources, you can pay for it. See the pricing, pricing seem very reasonable. I wanted to see …

Plasmonic Materials in MEEP > 1.2

Here is how I was implementing plasmonic materials in meep 1.1. Unlike Meep 1.1, Meep >= 1. 2 changed the way materials are defined. Here I will describe how to change the material definition code from meep1.1 to meep 1.2 . Please note that one can still use …

Doorbell with NRF24L01 and Arduino

My current apartment does not have a doorbell (Its strange but it is true). I went ahead and built a doorbell using two arduino pro-minis and two NRF24L01 transceivers. The melody to be played when a guest presses a button can also be controlled. I have four melodies programmed in …

Airtel tune on arduino

For my doorbell project, I needed some melodies to be played on arduino. One can takes notes of a melody and write a corresponding arduino code. I like airtel tune and wanted to play it with arduino. I got the notes from https://www.youtube.com/watch?v=3m5j5UIRqQc Here …

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 …


Controlling Newport 1918 Power Meter with Python

Optical power meters in-conjunction with a detector are used to measure power from a laser source or monochromatic output. At work, we use Newport 1918 power meter. This power meter comes with its own software. However, I was interested in controlling this instrument with python. I wrote a python module …

Controlling SP2150i monochromator with Python/PyVisa

Monochromator is used in optics research where a narrow bandwidth of light is required to be illuminated on a sample. I work with Princeton Instruments Acton SP2150i and needed a python program to control it. I found the manual here and on page 9-10, I saw the serial commands for …

Electric field at localized plasmon resonance using MEEP

This article is about simulating localized plasmon resonances in metal nanospheres using MEEP package. Generally, I am interested in solving three problems in LSPR systems: Calculate the extinction, scattering, absorption spectra of metal nanoparticle The procedure for doing this is very similar to the method I mentioned here. Calculating the …