Casey W. Stark

Astrophysics, Code, and Open Science

Domain Change

| Comments

My new personal website is caseywstark.com.

I decided to get rid of “thestarkeffect” and thestarkeffect.com. Even if you know the physics phenomenon, it’s a bit too dorky for me now. If you don’t know it, it sounds… bad.

I will leave thestarkeffect.com up for some time (serves the same directory), but you might want to update bookmarks and the feed to http://caseywstark.com/atom.xml if you use them.

Git Workflow

| Comments

or “How I Learned to Stop Worrying and Love git rebase -i”.

I’ve been working with git in a more professional setting lately. We maintain our new cosmological code, Nyx, in git now and I can’t be as lazy as I have been with other git repos. We maintain 2 bare repos and about a dozen developers pull from us, so I like to be careful about what I push off.

Problem is, I don’t normally work that way. I like to code things quickly and try them, keeping track of changes as I go. Think “cowboy” development with very frequent commits. So, I could end up with a very messy commit history. Luckily, git rebase comes to the rescue.

So at the end of a bout of local coding, the commit history looks something like this.

… many commits down to …

Pure Joy: My First Citation and a Confirmed Prediction

| Comments

The first citation is a scientist’s coming of age. For the first time, you were referenced as a credible source of the edge of human knowledge.

Last week, my undergraduate research advisor, Vitaly Kresin, emailed me a “nice paper”, saying “I think you might enjoy it.” He was spot on. I could barely read the abstract before I started jumping around and squealing like a little girl.

During my senior year at USC, Vitaly and I published theoretical results of modeling alkali metal clusters inside helium nanodroplets. We called it ”Critical sizes for the submersion of alkali clusters into liquid helium” and published in Physical Review B.

The awesome thing is that our intuition for the problem was right. We expected that small alkali clusters end up sitting in dimples on the surface of helium droplets (this was experimentally confirmed for sodium dimers and probably trimers at the time), and large clusters must sink into the center of the droplet.

The new paper is ”The submersion of sodium clusters in helium nanodroplets: Identification of the surface → interior transition” by An der Lan et al., in The Jounal of Chemical Physics. Here is the abstract:

Grep Tip

| Comments

I noticed that I’ve been using grep a lot lately to search for text in a directory. I find myself using the same options every time as well:

1
$ grep --color -irn "some text" .

Just to be clear, --color highlights the search string in the output, -i makes the search case-insensitive, -r makes the search recursive, -n outputs the line number of the hit, and the . at the end says to search the current directory. Lazy as I am, I realized I could just add this to ~/.bash_profile:

1
alias ggrep="grep --color -irn"

Now, I can save some time and thought with ggrep "thing" . It’s the little things…

EDIT: As Matt Turk suggests in the comments, the best alternative (especially for the Pythonists) is grin. Much simpler and clearer display of results.

Update at SF11 Cosmology

| Comments

I am currently participating in SF11 Cosmology at St. John’s College in Sante Fe, NM. I am here for weeks 2 and 3, so I’ll be back in Berkeley on July 23rd.

It’s been a great couple of days, meeting lots of fellow cosmologists, having very casual talks and schedule, and nerding out. I have been taking lots of notes, but I decided that I should keep them private, at least for now. I know that’s not being my usually open self, but it would take too much time to clean them up for all eyes. If you would like to know anything about what’s going on, feel free to contact me though.

Just another note: there is very little AT&T reception in Sante Fe and even less at the College, so please email me if you need to get in touch.

Your File System’s Love Life

| Comments

lsss - ls with StarSign

$ lsss /etc/default
total 49
-r-xr-xr-x   1 root           12     gemini Jun  4  2002 cron
-r--r--r--   1 root          204     gemini Jun  4  2002 devfsadm
-r--r--r--   1 root         3388     gemini Jun  4  2002 dhcpagent
-r--r--r--   1 root           10     gemini Jun  4  2002 fs
-r--r--r--   1 root          719   aquarius Jan 23  2004 inetd
-r--r--r--   1 root          379     gemini Jun  4  2002 inetinit
-r-xr-xr-x   1 root          638     gemini Jun  4  2002 init
-r--r--r--   1 root         1182      virgo Sep 15  2002 kbd
[...]

Twinkle Twinkle

| Comments

Twinkle twinkle little star
How I wonder what you are
When my civilization advances
And we can fly to your galaxy
We’ll exploit your natural resources

Miles Guidon Facebook

Note to Self About Python Graphics

| Comments

On a Mac (and possibly other systems), do not install the 64-bit version of EPD. Only install the 32-bit if you want your graphics to work.

This is a bug that has to do with the Mac framework architecture. Basically, you need to install matplotlib to /Library/Frameworks/Python.framework/ or matplotlib will not be able to interact with the Mac OS X Windows Manager properly. I don’t know the first thing about window managers, but I can tell you that this is really important when you want to save your figures.

I tried many things, including installing numpy, scipy, and matplotlib in a virtualenv. I thought it would be much cleaner to “activate” my scientific environment, keeping the Apple Python build as my system default. I got this all setup and when I tried to use matplotlib, I could not type in the textfield in the matplotlib save figure window. That is, I would plot something, click save, and then I could not enter a filename in the dialogue box. Infuriating.

So I gave up and installed the EPD 32-bit academic version. Not ideal, but it works really well and it just means my environment variables are a tiny bit mangled. No bigs.

Paper Hustler Going Beta

| Comments

That’s right, folks.

I am making a web editor for scientists, called Paper Hustler. I just put up the pre-beta site at http://paperhustler.com. You can also follow @paperhustler.

I put up the site yesterday, just before giving my talk at the Grad Student Postdoc Seminar (aka Wine And Cheese Talks). You can check out the slides to see a quick pitch (my thoughts that inspired the project) and new forms of scientific dissemination.

I am looking for lots of feedback on this, so please let me know what you think, good or bad.

In the future, I hope to post details on the tech behind the project. I have really enjoyed obsessing over developing this one.

Dear Scientists, Open Science Means More Than Open Publishing

| Comments

Published June 14, 2010 on the CoLab blog, by Casey W. Stark.

In the past few years, Open Science has become quite the buzz word, but most people aren’t sure exactly what it means. Since DJ and I will be discussing it a lot in the upcoming weeks, I would like to nail down a definition.

When people think open science, they think open access. That is, publishing your papers to a journal without a paywall. That’s a good start, but we would like to think it encompasses more than that. A lot more.

What Open Means For Science

First off, when we think open publishing, we mean open publishing of everything. That means more than the paper -– it means the raw data, the analyzed data, and any code involved along with the final paper. Sure, there are a lot of technicalities with publishing data (so many we can’t discuss it here), but you should at least publish the data included in the paper to make your colleagues’ lives easier.

Second, truly open science means also doing science openly. That’s right, I’m talking full on scientific transparency. When it comes down to it, we need to improve how science is done, not just the way it is distributed. When I say open science, this is mostly what I’m referring to –- the practice of putting all works in progress on the web.

So let’s talk about what this new openness buys us and why it should become the new norm.