manoharan-lab/holopy — pull request #7 by anna-wang (2014-08-01 20:15:22+00:00)
Title: Adding T-matrix calculations for non-spherical scatterers to HoloPy

I've added a folder holopy/scattering/theory/tmatrix_doubleprecision/ containing Michael Mishchenko's code, in Fortran, which calculates scattering matrices for non-spherical axisymmetric particles. It's been modified to work with HoloPy; see header for S.lp.f for more details.

The compiled Fortran code S.exe can be found in the same folder.

Before using, please add your path to this executable in holopy/scattering/theory/tmatrix.py

Then you should be able to run the example below:

import holopy as hp
from holopy.scattering.scatterer import Axisymmetric, Spheroid
from holopy.core import ImageSchema, Optics
from holopy.scattering.theory import Tmatrix
from holopy.core.math import rotation_matrix

schema = ImageSchema(shape = 200, spacing = .1,
optics = Optics(wavelen = .660, index = 1.33,
polarization = [1,0]))

ps = Spheroid(n = 1.585, r = [.4,1.5], rotation=[pi/2, 2], center = [10,10,20])
holo = Tmatrix.calc_holo(ps,schema)
hp.show(holo)

![example_tmatrix](https://cloud.githubusercontent.com/assets/8300781/3784452/8f530678-19b8-11e4-99e7-86d02737db92.png)