Monday, April 02, 2012

Running Doxygen (simple example)

First, we have to generate a configuration file for detailed specifications. This can easily be done by doxygen itself by simply typing:

doxygen –g

This will dump a default Doxyfile which is ready for further editing. We can edit the Doxyfile for flags (e.g. include subfolders etc). Once editing is finished, we can run

doxygen Doxyfile

This will generate the html or latex folder containing the documentation. In the Latex folder, you can type make to generate the desired pdf file.





Thursday, March 22, 2012

How to add CVS ID Tag (CVS Keywords in source file)


To have the CVS ID tags in your source code, you can basically add the following line to your file:
// $Id$

Once committed, the CVS will automatically update this line, e.g. as follows:
// $Id: file.cpp,v 1.3 2012/03/22 22:41:24 username Exp $

You can also include that in a format as follows:
/*
*====================================================================
* HISTORY:
* -------
* $Log: $
*
*====================================================================
*/

static const char *CvsId = "@(#)$Id$";
void No_Warning_Please(const char *x=CvsId);

A nice webpage and more details on this topic:
http://www.badgertronics.com/writings/cvs/keywords.html



Friday, March 16, 2012

Mount St. Helens Trip, Oregon

Mount St. Helens



The famous (or notorious) volcanic eruption of the Mt. St. Helens in 1980 had been on the headlines for a long time. After 31 years, we did a trip to see the landscape ourselves.


Thursday, March 15, 2012

Half Maxwell's Fish Eye Lens - Dielectric Antenna (FDTD Animation )



This video is the continuation of the series on Luneburg and Maxwell's Fish Eye Lenses (dielectric antennas & lenses). Specifically, we demonstrate the electric field propagation through the Half Maxwell's Fish-Eye lens proposed by James Clark Maxwell in 1860 (J. C. Maxwell, Scientific Papers, I, New York, Dover Publications, 1860).

The relative dielectric permittivity of the full Maxwell fish-eye lens drops from 4 to 1 from its center to the edges via the following formula: epsr(r)=4/(1+(r/a)^2)^2 for r less than "a" (and greater than zero) where "a" is the radius of the lens and r is the radial distance from its center. Since the dielectric permittivity is 1 at the edges and slightly increases towards the center, no surface reflection occurs. Half Lens is basically half of the full Maxwell's lens. We have utilized half circles to represent the increasing dielectric permittivity of the lens. Also at the bottom figure, we plot the exact dielectric permittivity distribution of the lens over the space.

In this simulation, propagation through a 10Lambda diameter Half Maxwell fish-eye lens is demonstrated via 2-dimensional Finite-difference time-domain (FDTD) simulations. A point source is located at the a point on the edge of the lens and correspondingly, we observe propagation of a monochromatic sinusoidal source (left) and a short pulse (right) through the lens and onwards. Collimation is clearly observed once the waves emerge from the flat edge of the lens.

References:
A. D. Greenwood and Jian-Ming Jin, "A Field Picture of Wave Propagation in Inhomogeneous Dielectric Lenses", IEEE Antennas and Propagation Magazine, Vol. 41, No. 5, October 1999

Sunday, February 05, 2012

How to have two colormaps in MATLAB plots?

A very useful and nice tool to achieve multiple colormaps in MATLAB plots (By John Iversen):

http://www.mathworks.com/matlabcentral/fileexchange/7943

Sample example where the subgraph and the larger graphs have different colormaps:

Saturday, February 04, 2012

Maxwell Fisheye Lens Propagation (FDTD Animation)




Similar to the previously presented Luneburg Lens, this time we demonstrate the electric field propagation through the Maxwell Fish-Eye lens proposed by James Clark Maxwell in 1860 (J. C. Maxwell, Scientific Papers, I, New York, Dover Publications, 1860).

The relative dielectric permittivity of the Maxwell fish-eye lens drops from 4 to 1 from its center to the edges via the following formula: epsr(r)=4/(1+(r/a)^2)^2 for r less than "a" (and greater than zero) where "a" is the radius of the lens and r is the radial distance from its center. Since the dielectric permittivity is 1 at the edges and slightly increases towards the center, no surface reflection occurs. We have utilized circles to represent the increasing dielectric permittivity of the lens.

In this simulation, propagation through a 10Lambda diameter Maxwell fish-eye is demonstrated via 2-dimensional Finite-difference time-domain (FDTD) simulations. A point source is located at the a point on the edge of the lens and correspondingly, we observe focusing at the opposite edge point.

References:
A. D. Greenwood and Jian-Ming Jin, "A Field Picture of Wave Propagation in Inhomogeneous Dielectric Lenses", IEEE Antennas and Propagation Magazine, Vol. 41, No. 5, October 1999

Friday, January 27, 2012

Lüneburg Dielectric Lens - Propagation Animation (FDTD simulation)




We demonstrate the electric field propagation through one of the well-known inhomogeneous dielectric lens, namely the Luneburg Lens proposed by Rudolf Luneburg in 1944 (R. K. Luneburg, The Mathematical Theory of Optics, Providence, Rhode Island, Brown University Press, 1944). The dielectric permittivity of the Luneburg lens drops from 2 to 1 from its center to the edges via the following formula: epsr(r)=2-(r/Radius)^2. Since the dielectric permittivity is 1 at the edges and slightly increases towards the center, no surface reflection occurs. We have utilized circles to represent the increasing dielectric permittivity of the lens.

In this simulation, propagation through a 10Lambda diameter Luneburg lens is compared against the free space. 2-dimensional Finite-difference time-domain (FDTD) method is utilized for the simulations. A point source is located at the focal point on the surface and once the waves emerge from the other side of the lens, the collimation effect is observed (i.e. cylindrical waves converge to plane waves) where the waves propagate towards the other focal point at infinity.



References:
A. D. Greenwood and Jian-Ming Jin, "A Field Picture of Wave Propagation in Inhomogeneous Dielectric Lenses", IEEE Antennas and Propagation Magazine, Vol. 41, No. 5, October 1999

Tuesday, January 10, 2012

Ground Penetrating Radar (GPR) FDTD Animation


Finite-difference time-domain (FDTD) animation of a sample ground penetrating radar (GPR) in action. Basically, a transmitting antenna shoots a short electromagnetic pulse (with a central frequency of 600 MHz) into the subsurface where the relative dielectric permittivity is 4. The short pulse is reflected from the air-soil interface and then either the rectangular or circular targets embedded in the subsurface. Then, the scattered signals are recorded by the receiving antenna of the GPR unit. This constitutes a single A-scan for the GPR measurement. Collection of A-scans along a spatial range constitutes the so called B-scans. Depending on the reflectivity of the target and soil properties, the success of GPR detection varies.

Ground Penetrating Radar -  Propagation within the subsurface

Diffraction from a Single Slit (FDTD Animation)




The single slit diffraction is illustrated via the use of finite-difference time-domain (FDTD) simulation in which slits with various widths are illuminated by electromagnetic plane waves at a single frequency. When the impinging plane waves reach the slits, they are diffracted into a series of circular waves and the emerging wavefront from the slits become cylindrical waves.

Diffraction is basically the phenomenon involving the bending of waves around obstacles and the spreading out of the waves past small openings. Huygen's Principle states that every point on a wavefront acts as a source of tiny wavelets moving forward with the same speed as the wave and the wavefront is the surface tangent to these wavelets.

Wednesday, December 14, 2011

Difference between pcolor() and imagesc() in Matlab

A simple matrix is plotted using both pcolor() and imagesc() commands in Matlab. And the difference between them are shown in the following figure:

% Difference between pcolor and imagesc
A=[ 1  2  3  4;
    5  6  7  8;
    9 10 11 12;];
figure (1); clf; set(gcf,'Color',[1 1 1]);
subplot(1,2,1);
pcolor(A); colorbar;
title('pcolor(A)')
subplot(1,2,2);
imagesc(A); colorbar;
title('imagesc(A)')


Basically, pcolor() does not show the last column and row of the matrix. Although the original matrix is 3x4, the pcolor() plot shows 2x3 submatrix.