Translate

Sunday 27 December 2015

Advent Of Code

Over the past couple days, I've tried to solve some of the puzzles on adventofcode.com. I'm using this as an excuse to learn more about the Julia Programming Language. I already have played with it a little. Implementing a parser for legacy AIDA files was fun (and useful).
https://github.com/jstrube/AIDA.jl
I also like that you can use Julia in interactive notebooks a la IPython. I've played with this a bit (mostly for my own education. I'm happy to learn about mistakes, though).
http://nbviewer.ipython.org/gist/jstrube/c8aaeab300b9f52e9fff

To get really serious with a new tool, however, there's nothing better than exercises. I like how easy it was to use Julia to solve the problems over on adventofcode. (Not that the puzzles themselves were easy. I still haven't solved all of them.) Anyway, I've put my solutions on https://github.com/jstrube/adventofcode, mostly for my own reference, because the problems I solve on a daily basis are quite different in nature. If you're into programing puzzles, you're welcome to take a look.
I'm confident I'll get a lot of use out of Julia over the next couple years.

Plans for the New Year

Just in time for Christmas, I received approval for posting a job ad (also on inspirehep jobs). I look forward to starting my own research at PNNL in earnest. So, to set the context, here's a bit of a rundown of what we're trying to do in the near future:
The ILC detectors are preparing to start TDR in the next year or two. For this we need to answer a couple of difficult questions convincingly. We'll have to justify the choices for all of the detector parameters. We haven't really changed them since the LOI in 2009. That was before the discovery of the Higgs boson. We'll need to take a good look at them again and study if they are still optimal and how much small changes affect the physics reach of the experiment. For this, we need to build new tools to better understand the connection between the detector parameters and the measurement precision. In a PFA detector, the reconstruction is a big part of the detector concept. I'm interested in studying the performance of the reconstruction under both physical and computational aspects.
In no particular order, here are a few things we already know that need work.

  • Vertex reconstruction and flavor tagging:
    • How does it perform with more background?
    • Is the innermost layer at the right distance from the IP?
    • What changes are needed to implement gaseous cooling?
  • Silicon tracking
    • What are the current limitations of the tracking, and can we overcome it with a pixel tracker?
    • What can be gained from a different aspect ratio?
  • Calorimetry
    • How big of an advantage does digital calorimetry have over analog?
    • What's the right size for the readout?
I'm sure there will be other questions that come up during the year. I look forward to working on these and other items with a motivated and capable scientist who will join us at PNNL. Let's roll up our sleeves.

Monday 28 September 2015

Devtodo2

Quick shout out to a nice terminal todo list. http://swapoff.org/devtodo.html
Even more useful with this bash function. Just put it in your ~/.bashrc.

alias todo="/path/to/devtodo2"
function workspace_cd() {
    cd $@ && [ -f ".todo2" ] && todo
}

alias cd="workspace_cd"
Now, every time I cd into a directory with a .todo2 file, I get a reminder of the todo items in that dir.

Wednesday 22 April 2015

US-Japan connections

Finally our household arrived at our new place a couple of weeks ago. My wife is putting in a lot of effort to get everything out of the boxes to build a new home for us.
When I moved from Japan to the US, I did not only take my wife and my household with me, I was fortunate enough to convince my new employer to also let me bring my research.
International collaboration is of course one of the enabling factors of the ILC, and fortunately, frameworks exist already to enable collaboration in all kinds of scientific experiments. Together with my colleagues in Japan, we put forward a small proposal under such an umbrella, the U.S.-Japan collaboration. Last week, we hosted a delegation of Japanese and U.S. scientists as well as representatives from DOE at PNNL, where the different proposals under this umbrella were reviewed. Our proposal to establish distributed computing between the two regions with the goal of accelerating the detector optimization studies and  improving the distribution of collaborators from the two regions across the two detector concepts, was approved for funding.
Now I'm at the ILC Tokyo symposium, where we heard from a Diet member why the Japanese population is declining, and what the government intends to do about it. The talk was very interesting and a lot more technical than I would have expected from a politician. It was humbling to see how our vain little experiments can have a much bigger impact.
The spirit of the meeting was very positive, and things seem to be moving in the right direction. I look forward to the next few months. They will be very busy, but they also hold a lot of promise.

Friday 30 January 2015

So long and thanks for all the fish

So it's done. Just handed over the keys to my apartment in Sendai. Another move in the books. Well, technically not quite, since our household is still in transit, so we can look forward to another round of buying furniture and unpacking boxes.

The last year in Japan has been a great experience. Of course my wife being Japanese helped with some administrative items, but comparing the quality of life in Sendai to e.g. Geneva, I think that Japan can hold it's own. Food is great, the people are friendly and accommodating, and the countryside around Sendai is stunning. For the ILC, a few more trailblazers are needed to make the path smoother in some areas, but that's not unexpected. So if you are a young postdoc with a bold mind, an appetite for adventure and good food, and the desire to broaden your horizon a little bit, go apply for a job in Japan. The ILC community is eager to help you make your time a success.

My time here is coming to an end for now. (After the Belle / Belle 2 meetings)
So long Japan, and thanks for all the fish. I'll be back.
(Next time for the ALCW meeting in April, to be exact )

Next Step: To write grant applications to pay for a couple postdocs. Stay tuned.

Sunday 30 November 2014

Around the world in 80 months

A new year, a new job, a new continent...
Sounds like I've read that somewhere before. Now I'm going full circle. Starting at the West coast of the USA, in San Francisco, pretty much exactly 80 months ago, I embarked on a journey to Oxfordshire, UK, on to Canton Geneve, Suisse, then to 宮城県、日本。Starting in January 2015 I will be joining the staff of the Pacific Northwest National Laboratory. I am particularly pleased by the fact that I am cast as a physicist, not a particle physicist. Of course, I will stay involved in particle physics, but the lab has many interesting projects that I hope to contribute to. I look forward to proving that the training of a particle physicist enables one to have a positive impact on a variety of other subjects as well.  At the same time, I am confident that I can take advantage of the diverse capabilities at the lab for my research in particle physics, in particular for building an ILC detector that can deliver on the promise of precision physics in the Higgs and electroweak sector.

Now I will have to change my tag line. I have graduated from my journeyman days.

LaTeX style files

Prelude

Since nearly all funding for particle physics comes from tax payers around the globe, I am proud to say that particle physicist have been steadily improving at making their work public and open to all. Since the beginning of this year, a consortium sponsors open access to publications in particle physics. This funds the important peer-review process, which is how journals maintain the quality of their contributions. Of course, everybody is free to disseminate their opinion in blog articles, twitter messages, and to upload notes of their studies to online archives, but without verification by an independent reviewer, the quality of this information is questionable. The peer review process is of course no silver bullet, but it's the best method we have to qualify research as worthy of distribution to others, so that they can build upon the results.

Bibtex in particle physics

This long-winded introduction brings me to the crux of this post: We are submitting our current draft to EPJC. They provide LaTeX templates including a bibtex style file. (It would be great if they could arrive in this decade and allow biblatex, but most of them require natbib, which precludes the use of biblatex...) We usually cite references from various sources, so being able to use a bibtex database and a style file to get them all formatted consistently is a great bonus. The journals do a reasonable job of formatting their citations consistently, and they use the right fields for author, year, edition, pages, etc. Unfortunately for us, many contributions in the linear collider community did not go through a peer review, and the online repository we use for most of our work contains both, links to peer-reviewed journal articles, as well as private uploads of notes were not subject to the same scrutiny. This also means that the bibtex entries are somewhat inconsistent, to say the least. So some adjustment of the bibtex file (easy) and the bibtex style file (not easy) is needed.

Editing the style file

Adding fields from your bibtex database

As mentioned, most of our sources, peer-reviewed or not, can be found on the online archive, which gives them an "eprint" field in the bibtex database. Unfortunately, the style file distributed by EPJC ignores this field. The first course of action is to add an "eprint" field under the ENTRY section of the bst file (most likely near the top of the file).

Adding a document type

Bibtex allows to specify individual formatting rules for each document type: For a @book, you might want to mention editors and an ISBN, while for a published @article, the journal edition and page numbers are more relevant. For our current draft submission, I decided to format peer-reviewed articles differently from non peer-reviewed ones. Bibtex uses functions with the same names as the document type to specify formatting rules, so an @article is formatted by FUNCTION{article}{...}, while a book is formatted by FUNCTION{book}{...}. Unlike the formatting of individual fields, specifying a new document type does not need to be declared anywhere, other than writing a function for it.
I came up with this for formatting my new "arxiv" document type for articles uploaded to the online repository, but not published in a journal:
 FUNCTION {arxiv}  
 { output.bibitem  
  format.authors "author" output.check  
  add.comma  
  format.date "year" output.check  
  format.eprint "eprint" output.check  
  fin.entry  
 }  
Actually, each of these lines is a call to another FUNCTION. Most of these are defined by the style file already. I just had to write the format.eprint function, which looks like this:
 FUNCTION {format.eprint}  
 { eprint "eprint" bibinfo.check  
  duplicate$ empty$ 'skip$  
   {  
    new.block  
    "arXiv:" swap$ *   
   }  
  if$  
 }  
This prints the word "arXiv:" before the eprint entry of the bibtex database. I don't want to go into more detail about the different lines here. Mostly, because I don't understand every detail of the language used. Read the docs if you are interested.

Summary

This post assumes that you have at least cursory familiarity with bibtex and are faced with a somewhat constrained problem. As you can see, it's not a lot of code that needed writing, but finding out what to put where was somewhat time-consuming.
If you start from scratch, I suggest you follow the links in this post and only use the bibtex database to collect your references. Use biblatex rather than bibtex to format them.

I haven't fully finalized my formatting, yet, but this should give you an idea of how to change an existing bst file to suit your needs. I'll be sure to submit the revised version of the bst to the journal. If they just get rid of the natbib requirement and allow the use of biblatex, this will all become much easier. In the meantime, if you want to submit an article to a journal, and are faced with a similarly incomplete template, I hope this post is useful for you.