Sunday, September 25, 2011

Getting a high quality eps from your data

In all these years plotting data, I have tried many methods. The one I am most satisfied with is gnuplot. This free program can generate anything one has ever dream of from data. In the past, I used to have basic scripts for my favourite types of graphs; problem is, I'm not that patient any more. Still, I'm not ready to pay the big bucks needed to buy a fancy point and click plotting software and, above all, I'm not interested in illegal software.

This is my situation I usually generate my final data from FORTRAN. Usually, universities and research centres provide Matlab or Mathematica licences for us. I have tried doing figures with Matlab, but I found it quite primitive and, typically, I ended up investing as much time as it took to modify one of my old gnuplot scripts. So, I started using Mathematica to load my data from text files and generate my figures.

Important things to have in mind:
  • A typical one column figure has a size of 3 3/8 inches; say Phys. Rev., J. Opt. Soc. Am. or J. Phys. journals.
  • Typical figure sizes are one, one and a half, and two columns.
  • Usually, journals ask for high resolution graphics, say 300, 600 or 1200dpi.
Things to remember when preparing figures in Mathematica:
  • Standard image resolution value is 72dpi. One can set this to any value by using the command ImageResolution -> 300, for example.
  • If you are saving in svg file format resolution doesn't matter at all but for determining the size of the image. 
  • Always set your image size according to the resolution you are using, ImageSize->{(3+3/8)*300, Automatic}, for example.
Now, the simplest way to produce a figure is just exporting your figure to eps with the command Export["FigureName.eps", PlotName, ImageResolution->300]. Sometimes this is the best and fastest way to produce an eps. Always keep your fonts around the 12pt size. Do not mind how the image looks in the notebook, always check the final eps to see the figure in its real scale.

For those times when the result is crappy, I would export the figure to svg with the command Export["FigureName.svg", PlotName], for example. Then, I would modify the axis labels, legends, and other text in the figure with Inkscape. Inkscape is free, light, and easy to use and can save your graphics to eps format; it can also generate pure latex or eps+latex output. In the case that the text in the figure is formulas, I would use psfrag to replace dummy strings inserted with Inkscape.

Warning: As of today, if  you use psfrag, download Inkscape v0.46 and do not forget to de-select the convert text to path option in the dialogue for save as eps. The point behind using Inkscape v0.46 is that this is the last version that doesn't use Cairo to convert to eps and still writes text as text in the eps.

Edit: Janus told me today about a plugin for Inkscape that renders latex input into a graphic layer, it is called textext. Thing is, it works almost immediatly with Inkscape v0.46 and delivers wonderful results but I haven't been able to make it work with v0.49 so far. Nevertheless, good bye psfrag!

Saturday, September 24, 2011

Solution to the Landau–Zener problem via Susskind–Glogower operators


In this paper, we try to show what happens when you consider the Jaynes-Cummings model in the case of a linear time-dependent detuning between the two-level system and the field.

Experimental systems: I have my heart on circuit-QED, it is the simplest thing I can think of and our result may be helpful for modular processes. A more complicated model may or may not be of relevance in BEC physics.

Our major result: By using a right unitary transform involving Susskind-Glogower operators—these are the ones introducing the right unitary characteristic—it is possible to show that the Hamiltonian is exactly solvable; specifically, the Hamiltonian is diagonalizable in the Fock state basis of the field. Moreover, the time evolution for the Hamiltonian can be written in an exact closed form given in terms of solutions to Weber Differential Equation, which are related to the exact solutions to the Landau-Zener-Majorana-Stuckelberg problem. 

With the analytical solution at hand, it is possible to calculate whatever you want. 

Minor results: It was curious for me to find out that in the case where the rotating wave approximation cannot be made it is still possible to diagonalize the Hamiltonian in the two-level system basis. Then, one can do numerics for small number of photons in the field. 

I was surprised to find that it was very simple to write a script that generates code to solve a system of some thousand coupled differential equations. 

The Physics(Everybody always asks me about "the physics", so far I still don't have a clue what that question is really about but here's an attempt to an answer) Just for the sake of giving an example, in the article we present the physics in cases similar to those dealt by Landau, Zener and Majorana, to obtain the transition probability at the end of times for a system initially in the ground state at the beginning of time. Basically, the number of photons in the quantum field enhances the coupling between the two-level system and the field; this you can see at the level of the right unitary application.

Curious things: I learned the following,
  • Majorana worked on the problem and published his results at the same time than Landau and Zenner. His formulation is closer to a full quantization of the Rabi problem. I found this while reviewing the literature on the topic.
  • Stuckelberg worked in the problem, I haven't been able to get my hands on his paper so I have no clue what he said about the problem. I found this while attending the QIPC Zurich 2011 and someone gave a talk and mentionend the Landau-Zener-Stuckelberg-Mechanism.
  • I should read Wikipedia at least once before finalizing a paper because in its entrance for Landau-Zener it clearly states the cites to Stuckelberg and Majorana's works.
Well, I hope you can find some use for the results we present in the paper and, as always, drop me a line, I am always glad to discuss or try to help whenever possible.

Last weekend movies...

Well, who would have thought, for the first time in a long long time, I'm actually writing about last weekend movies at last. It was a good weekend and week for movies; too much stress, too many things to think about, the perfect mix to just get home sit down and turn off the brain...

  1. Rango, *****
    I'm a sucker for many things but two of them are animations and westerns. This comic adventure is a nice western; ride to sundown included. I like westerns. I love anti-heroes with their gray in a black or white world. This is not an anti-hero western, but a hero's voyage in search of the self.

  2. Everything Must Go, ****
    Will Ferrell is a good serious actor when he's not playing a cartoonish human being. In this comedy/drama, he plays the role of a fucked up man whose life has completely gone down south. The film deals with his process to start anew.

  3. Paul, ****
    Simon Pegg and Nick Frost have shown time and time again that they are a great comedy duo. Now, they take on sci-fi. This film tells the story of two British sci-fi fans who find themselves helping a fugitive alien, Paul, escape from his captors in the US.

  4. Ironclad, ***
    It's England just after the crusades, John is king, a bad king, and got his ass kicked by the British Barons and forced to sign the Magna Carta. So, it's payback time. The King hires a Danish mercenary armada and is ready to strike back but he finds our heroes ready at Rochester Castle. I really enjoyed Giamatti's protrayal of King John. 

  5. Something Borrowed, ***
    A romantic comedy based on a novel with the same name. I have the feeling I have seen exactly the same theme sometime this year. Anyway, Goodwind is pretty and Krasinski is funny.   

  6. I am Number Four, ***
    This film is based in the 2010 novel of the same name; I'm really surprised that it was made a movie so fast. It is a good teen sci-fi action film, a little bit too slow in the first two thirds but nicely fast paced by the end. Kudos to Michael Bay for producing this one.  

  7. The Eagle, *
    Many novels and films have been made about the lost legion, the Legion Nona Hispanica, my favourites are Massimo Manfredi's The Last Legion and Jim Butcher's Codex Alera. I have the feeling that I have read or watch this story about the eagle somewhere else but situated in the German campaigns.

  8. Battle Los Angeles, *
    It's War of the Worlds but now the aliens are not allergic to earth. This action film tells the story of a platoon of Semper Fidelis U.S. Marines engaged in the front trying to rescue some civilians and find their valour.

  9. Your Highness, *
    Natalie Portman, that's the star. The movie is crappy. How can Franco and Portman, somehow two icons of their generation, say Freaks and Geeks for the first and Leon for the beautiful second, end up doing this shitty movie? At least the producers should have tried to bring the whole generation together. 

As I said in the beginning, interesting times are not over yet. I still get home with my mind winded and  Supernatural is doing a great job to make me sit down, turn off my brain and relax; we just finished watching the third season. Good news are, new season already started!

Friday, September 16, 2011

4. Rebirth

Its—my—nose broke; as surely as I could feel the pain invading my temples. Without further ado, my waist turned, my left arm went up to the reaching hand and my flailing arm continued its arc down to break or dislocate its—my—arm at the elbow; it was dislocated. The thing—I—fell down to the ground with a crack that brought a wave of pain to its—my—torax. I brought my feet onto its—my—nape and slowly pushed until I could felt the hard leather of my soles on my own scalp and smell the oily scent of my boots with my own nose.

Will I die? "Sooner or later we all will die, son" answered the voice of my long gone father. Then, I stomped on the thing—myself—. It died with the whisper of a pop—and I was born.

Tuesday, September 13, 2011

Last weekend movies...

I think I should change the title of this a-periodic post to last month movies or something like that but, for the sake of nostalgia, I will keep the weekend on it as far as possible...

  1. Ishquiya, *****
    It may be cultural and I could be misunderstanding everything but this is a terrific hilarious comedy. I don't know if the guys tried to make a drama or a romance, but the result was one of my favourite things: a senseless mash-up of action-comedy-drama-romance. 

  2. Vicky Cristina Barcelona, *****
    What is love? But above all, what is content? Archetypical monochromatic, but lively, characters picturing each of the many facets in the human mind. Nice dialogues filled with verbal crutches that make them feel natural. Awesome photography, some of the stills almost look as paintings. 

  3. Limitless, ****
    The mind, the incredible mind. Sometimes it takes a pill to unravel it, this is a film about it. This thriller takes a few interesting turns that kept me interested. 

  4. Across the Universe, ****
    It's the Beatles. It's the 60's. It's America. It's hippies and Vietnam. What better way to tell the love story of Jude, a simple British guy. A romantic musical, quite good, actually a must see! 

  5. A History of Violence, ***
    What happens when you lived a life of violence and you decide to leave it. Does family or anything at all matters? Well, this was a graphic novel first and I think it is way better than the movie. The film is just okay, it has a very nice pace and deals with the basic ideas behind the novel's plot.

  6. Pirates of the Caribbean on Strange Tides, ***
    The fourth release of the Pirates of the Caribbean saga. Sounds like boring, ain't it? Well, it is not! Captain Jack Sparrow is still playing the good old tricks. 

  7. Fast Five, ***
    If a fourth sounds boring, a fifth should sound like a terrible thing but no! Action packed, explosions, chases, fast cars and... Diesel and The Rock! I have always wanted to see a fist fight between these two and my wish came true!

  8. Leap Year, ***
    Astonishing red headed girl goes to Ireland to propose to his boring square main streamed boyfriend taking advantage of it being a leap year. Of course, many things happen in the way. It is a nice romantic comedy, and the girl is pretty. 

  9. No Strings Attached, ***
    Natalie Portman, do I have to say more? If that's not enough for you let me tell you this is a nice romantic comedy about a girl who wants just a physical relationship and freaks out when the guy wants to go for the whole enchilada.

During these interesting times, I have tried to keep my mind un-winded. We started watching Supernatural at home with Daniel and became addicted to the series. So far, we have watched the first and almost all the second season and they are good. I finally got my hands on the second, and last, season of Rodney which delivered a ton of laughs. I wonder why they cancelled it. Anyway, new season starts soon!


Saturday, September 3, 2011

Luggage

If you have to box in your life, how many boxes would you use? My answer: None. I need a small backpack and a small piece of luggage or a rucksack to pack all my clothes, and that's all.

I remember the first time I got out of Mexico, I had two huge pieces of luggage with me. All kinds of clothes. Spring, summer, winter clothes; light, medium, heavy jackets; raincoats. The whole works. That was ten years ago. Right now I'm packing for a one week trip and the realization hit me: all my clothes, all of them, may fit a small piece of luggage, a little bit packed but the one piece only. Ten years and seven different places I have called home later, my life fits a small backpack and all my clothes, winter, summer, spring, a small piece of luggage. 

I'm happy with that, I never thought to come close to live an almost nihilistic vagabond life. It has been a long way from hoarding mostly irrelevant goods to live with just enough to cover basic needs and one or two hobbies. I have come to truly enjoy that. What saddens my heart is not being able to see often all the family and friends I made along those years and places.