Programming Languages and Art

I was recently translating a very old piece of code written in the ’80s in FORTRAN77 to Matlab. This process has taken me 3 weeks for 20 line code!

Partly because probably I am not a skilled programmer and partly because statements like GOTO do not exist in Matlab.

My aim was to work out exactly the efficiency of a numerical algorithm so I needed to know exactly the value of each variable at every loop counter etc. so the code had to be transcribed exactly. No fancy coding skills to improve the “code” were to be invoked.

In this exercise I realised that programming is more an art form than anything else. There is a beautiful flow of logic (actual mathematical algorithm)  that has to be channeled (dictated by the language constructs, data structures and commands) into a specific form (much like a canal I suppose).

Each time we choose a different language, expressing the same algorithm can take a very different form. Interestingly the language itself can impose either an improvement or a the opposite. In some ways the language can function like the clothes we force our bodies into- giving a specific shape.

In some cases its bit a like struggling to find a word in a language where it doesn’t exist  to express a sentiment that we have a word for in another language.

I wonder if anyone has studied how programming language constraints influence actual logic/algorithms?

Or is this simply my own lack of expertise leading me to fanciful thoughts?

A special Easter present

I woke up today feeling excited with a  tremendous sense of anticipation.

Easter means chocolate so you might think that was what it was- but it was a whole lot more!

My very first PhD student thesis submission as a supervisor!

It almost felt like I was submitting- that is how great the feeling is. After 4 years to see a student reach the finish line (well almost, pending the viva) and be there with them on the journey is incredible.

There are highs and lows, calculations gone wrong, errors discovered, papers rejected (and the heartache that engenders) and the sense of accomplishment when the results show something new, papers are accepted…

As a supervisor facilitating the learning process for a student, and guiding them on the journey (which admittedly can be rocky at times) where they can feel they are a scientist is huge privilege. I think the learning goes both ways, and at times it is not clear who the student is.

This feeling today is liking climbing a mountain and seeing a beautiful view. I hope there will be more such in the future!

Black Phosphorous and other things at CLEO 16

So I am back at CLEO for the third time teaching my short course on Finite Element Method again.

I had a busy 3.5 hours with the course, interacting with about 20 attendees who came to the course. It was much fun and afterwards I had two very interesting conversations on applying numerical methods:

  • what is the best method to use (BPM or FDTD) to study propagation and scattering in media with subwavelength disorder?
  • in highly dispersive materials close to epsillon being 0 (so resonances are present) how does one study non-linear effects in periodic structures where feature shape and size are important?

These sort of discussions are so exciting because they open my mind to new areas and challenge me to think about applying my knowledge and expertise in ways.

But that was not all. 

In talks I attended an invited talk on Optical Properties of Black Phosphorous (BP) stood out for me. This was in Session SW1R, the first talk by Xiamou Wang of Yale University. The authors gave some intriguing glimpses into what was a new topic for me. Graphene by now is well known as a 2D material. BP was a new material to me. It seems that it lies somewhere between Graphene and other Two Dimensional Materials (TDMs) such as Molybdenum DiSulphide. BP bridges the optical and electronic gaps.

The optical gap of Graphene is 0, while that of TDMs is large, BP is about 1.3eV for monolayer BP . The electronic gap bridge comes about because Graphene has low on/off ratio  and high electronic mobility, while TDMs have high on/off ratio and low mobility. BP has a medium on/off ratio and medium mobility.

Certainly of the 70 odd 2D materials available BP seems to be the new exciting thing! So it gives me something new to learn!

Some papers mentioned in the talk that you may want to look at:

PNAS, 112, 4253, 2015

Nano Letters, 14, 6414, 2014

Nature Photonics, 9, 247, 2015

Then there was the special symposium to mark 20 years of Photonic Crystal Fibers. In the symposium I really enjoyed the talk by Arnaud Mussot (SW1I.3) on topographic fibers. The central idea here is that the outer diameter (and through that the modal properties such as dispersion, non-linearity etc.) of the fiber can be varied along the length of the fiber. This variation can be sinusoidal or in some cases follow other profiles too. The applications discussed were on modulation instability, solitons. Though ofcourse there are many others. Some papers mentioned in the talk that you may want to look at:

Optics Letters, 37, 4832, 2012;

Physical Review A, 87, 013813, 2013;

Optics Express 23, 3869, 2015;

Optics Letters 40, 455, 2015;

Physical Review Letters, 116, 143901, 2016.

But that wasn’t all!

The event on Climbing the Ladder brought together 4 panellists who spoke of their career journeys. This was followed by lunch in which people sat in “mentor” or “mentee” chairs and talked to establish a mentor-mentee relationship.

So many of us feel we need some career advice (how to get a post-doc, how to change jobs, where to move to etc.) but we dont know whom to ask or how to find a good mentor. this was an opportunity to meet some excellent mentors and ask these questions, and perhaps start a longer relationship.

For mentors this was an opportunity to give back to the  community by supporting the next generation of professionals and leaders. Helping them navigate the choppy waters of education, careers and the intersection with personal life.

All in all it has been a superbusy and extremely rewarding time at CLEO, meeting people and networking, learning new things.

I hope I will see you there too in the future!

Some more non-linearity

In recent times I have focused my blogposts on events that I attended.

Today I feel some pleasure in going back to writing a bit about my research.

In a recent journal article that we published we explored how an ultra broadband Supercontinuum in the mid Infra Red part of spectrum can be efficiently generated in spiral chalcogenide PCF.

We showed by numerical simulations an SCG spectra that spanned more than 3 Octave from 1.3-11 micron and beyond. The difficulties in generating SCG in these wavelength regimes include lack of sources at appropriate pump wavelengths, such sources of sufficiently high power, as well as waveguides that have zero and flat dispersion near the pump.

With the Equiangular Spiral PCF,  it is possible to modify both the dispersion (making it flat and close to zero @ the choice of pump wavelength)  as well as have a well confined modal field with large non-linearity.

What this work offers along with Disperison and nonlinearity control is the additional control of absorption: possibility  of a cladding  made of the same material as the core (only airholes are introduced for guidance) which overcomes the problem of absorption seen in other proposed/fabricated planar waveguide and step index chalcogenide based designs.

It goes without saying that the results were exhilarating and I now look forward to taking this work further, preferably with someone who can fabricate and test the design!

So if you want to collaborate do get in touch!

An early Christmas present

The past month has been very hectic and filled with submissions, marking, student presentations etc…

Now that Christmas is almost upon us I wanted to relfect on the year a little, given the few minutes of breathing space!

Perhaps the biggest achievement or exciting journey that has begun for me is the launch of the Women in Photonics (WiP) initiative of the IEEE Photonics Society. As the Asosciate Vice President of WiP my job is to get more women into and onwards in Photonics. This may not directly have anything to do with my career, but I relish the opportunity to contribute something positive and help make those changes happen that I believe are needed. It is the first step in a long process which will I am sure throw up challenges and frustrations. But along the way I hope there will be real progress and when I am 65 I can look back on this with some satisfaction and say “I was part of this change”.

From a technical point of view satisfaction has come in working with an experimental group. We simulated the optical properties of solar cells, whilst my collaborators fabricated and characterized these. There is so much joy in watching the numerical results closely explain the measured data! Our joint paper is now published and available.

What lies ahead:
The biggest thing on the horizon is the OWTNM 2015 which I am chairing and organising. Getting to grips with making an international conference happen is huge: somethings are incredibly simple and common sense (no matter how tough it all looks) and others are fiddly and cumbersome (no matter how easy they may appear). It is only after the event is over will I know how it really went.

There are ofcourse many other things to look forward to. I will be giving a short course at CLEO 2015 again. There is the collaborative work with Aston university on spiral waveguides in Lithium Niobate.
And much more..

I hope you all have a lovely Christmas and fabulous 2015.

For CLEO in San Jose

Its been a long time since I posted or so it feels…

Work has been manic and I feel like there is a mountain to climb everyday. However, not all of it is bad. Some of the work has been for CLEO: I shall be giving a short course “Finite Element Modelling Methods for Optics and Photonics”, course number SC410 on the 10th of June. So I have been preparing the entire course slides and its taken some doing (about 130 slides!)

Needless to say I am excited as this is my first short course and I am really looking forward to talking about my subject. Its a great opportunity to really get into how numerical methods work, especially the FEM. I hope the attendees will enjoy it and find it useful.

I am also looking forward to the conference and hearing the great talks. I am really keen to learn more about attosecond Physics…(some how I really feel this field will open up new Science).
Then there will be the fabulous shopping!

May be I will see you there!

Satisfaction

You may think that is a strange title for a post. You are probably right. However I am so excited and satisfied that I could not contain myself and this is the result:

I am working with an experimental partner on Si solar cells. They do the experimental bit and we do the modelling. Now we are starting to get the first set of results and it is immensely satisfying to see our modelling work being correlated to something physically real and measurable. I can’t yet discuss the results here (I will once we publish). As this is one of the first projects for me in which I am working so closely with an experimental partner and for the first time seeing results in a less abstract manner- the sense of satisfaction is magnified. If I had been doing this for 20 years may be it would not be as exciting?

Isn’t Science wonderful?

Review for my book

I feel a bit like a kid whose story has been read by the teacher and who is going to give her verdict!

My publisher sent across this review from the Midwest Book Review:
Finite Element Modeling Methods for Photonics
B.M. Azizur Rahman and Arti Agrawal
“Finite Element Modeling Methods for Photonics provides a powerful resource describing the applications of FEM in photonics devices and covers everything from problem-solving applications to real-world examples and mathematical concepts. Engineers involved in developing photonic components will find this a powerful guide to the simulation process as a whole, with chapters including formulas, structure analysis, discussions of different methods and approaches, and investigations applying different methods to problems. The result is a powerful technical reference highly recommended for any engineering library.”
– The Midwest Book Review
November 2013

Needless to say I am pleased (blush). Hope the readers find the book useful.

Supercontinuum generation with spiral fibers

In previous posts (Stacking the spiral, magic of equiangular spirals, my research) I have talked about the properties of spiral PCF focusing especially on the modal properties which gives us dispersion tunability as well as great confinement (hence large non-linearity). This has applications for Supercontinuum Generation (SCG) and Second Harmonic Generation (see another paper).

In this post I talk a little about studying SCG in the Equiangular Spiral PCF (ES-PCF) with numerical simulation (see the paper).

To begin with we used the Finite Element Method (FEM) to design and optimize the ES-PCF. We changed the spiral properties and ran simulations to get a design with very low dispersion (the total dispersion from 1.5 μm – 2.3 μm, varies very little, in the range of ±4 ps/nm/km. In addition, the ES – PCF exhibits three ZDWs at 1.52, 1.88 and 2.22μm which can make multi – wavelength pumping possible).

The next big step was to simulate SCG by solving the Generalised Non Linear Schrodinger Equation (GNLSE) using a split-step Fourier method. This allows us to look at how the SCg evolves in the ES-PCF as a function of a) pump power b) fiber length c) pumping at different wavelengths. We found that for the pump wavelength at 1557 nm and average pump power of 11.2 mW, SCG bandwidth > 3 µm (970 nm – 4100 nm) at 40 dB below the peak spectral power. In the same fiber, at pump wavelength 1930nm and average pump power of 12mW the SC bandwidth was more than 2 octaves (1300 nm – 3700 nm).

The paper can be accessed here.

The importance of this paper is on more than 1 count:

1. It shows a fiber design that has flat dispersion over a very large wavelength range: 1800nm
2. This fiber has the potential of multi wavelength pumping for SCG.
3. The sueprcontinuum generated is broadband and flat, at much lower pumping powers than reported in several studies
4. Through numerical simulation we can help design and characterize optical components, reducing time and money in the fabrication cycle.

I feel that when experimental and theoretical work goes hand in hand the gains are far more than the sum of the individual parts!
So I would be really happy to work with an experimental group on this!

Steady on! Wide angle BPM is here

What a topsy turvy 2 weeks!

Imagine a Wimbledon where Roger Federer and Serena Williams are ousted like that! And then the first Ashes tests with all its twists and turns….In all this tumult, I need a steadying anchor.
Where else to turn but Science and writing?

I am going to look at some of my own past research in a bid to calm my mind (England have just lost the 5th wicket in their second innings).

Wide angle beam propagation methods (BPM) were the core focus of my PhD thesis (that seems so long ago now!). It may sound like a mouthful and/or gobbledygook but the wide angle BPM is really important for photonics modelling and the logic is straight forward.

The beginning of BPM methods was with algorithms that made the paraxial or Fresnel approximation. This amounted to saying that the light waves would make a small angle with respect to the propagation axis, or in other words light would be almost parallel to the propagation axis (we will take that as the z axis in this post). But with complicated structures that have branches (y-junctions, sharp 90o bends), or high index contrast, this assumption leads to significant error when simulating light propagation.

The light waves (for example in a y-junction) do not travel at small angles to the z axis, so obviously carrying on with the assumption was not practical. In other cases where the refractive index change is large (relative to the propagation variable), backward propagating waves or waves at large angles get generated and again the paraxial approach is not sufficient.
Hence the need for wide angle formulations was felt.

You may ask: why didn’t people incorporate wide angle assumption from the start?

The answer to some extent is due to the mathematical difficulty. If you look at the wave equation it contains second order derivatives with respect to x,y and z.
The x and y derivatives are the transverse derivatives and go to the right hand side of the equation (along with the refractive index variation), while the change with respect to z, stays on the left. Effectively we are trying to see the evolution of the field at different z values. Solving this second order differential equation in z is quite a challenging task. The Fresnel or paraxial approximation allows us to convert it to a first order differential equation in z, thus hugely simplifying things.

Going to wide angle formulations implies, reinstating the second order derivative or finding clever ways to deal with it. There has been a huge body of work on this especially in the 90’s and the last decade. As a result we have wide angle BPM formulations in most popular numerical methods: Finite Difference, Finite element etc. Many of the popular commercial software now incorporate wide angle calculations or offer the option.

So have a look at some of the theory in this paper and download preprint-oqe-06 fdssnp paper and pre-print-ptl06 paper. Tell me what you think!