The Program This Week Is … Programming

by Eric Suchyta

As we’ve seen throughout previous postings, a day in the life of a physicist can be quite different from one physicist to another, depending on what kind of physics you do.  However, there are a number of skills that are generally useful and applied everyday across various disciplines.  One such craft is computer programming.  If you’re not too familiar with computer programming, the idea is pretty simple.  You write out a specific set of instructions, and then you tell your computer to go do these actions.  Just like humans speak different languages, there are many different programming languages, each of which has its own strengths and weaknesses.   Programming in each language will look a little different, but at the end of the day they’re all aimed at basically the same thing, helping you tell your computer what to do.

Computer programming is useful to physicists for a variety of reasons.  For one, the problems that physicists attempt to solve are often very sophisticated, maybe so much so that a pen and paper solution alone isn’t even possible.  In such cases we turn to a computer to implement calculations we couldn’t feasibly carry out ourselves.  Also, scientific datasets can be enormous, and often times we need to repeat the same types of analyses over various sets of data.  Humans quickly tire of doing the same task over and over again, but computers love to do this and are much faster at it than we are.  Computer programs are even written to control the instruments themselves when scientists are taking their data.  Some instruments are sufficiently complex that attempting to control each moving part without the aid of computer programs would be utterly impossible.  Take a look below at the picture of the Compact Muon Solenoid (CMS), one of the detectors at the Large Hadron Collider (LHC).  The LHC accelerates protons to extraordinary energies, and this awe-inspiring detector analyzes what is produced following a collision of these high energy protons.  Notice how puny the person (not me) looks compared to the size of it.  Can you imagine attempting to operate something like this without computer assistance?

cms

One of the detectors at the Large Hadron Collider. Did you notice the person in the center of the picture? Imagine trying to use this detector without any computer aid! Source: CERN

If I tried to share all the ways OSU faculty and students use programming in their lives we would be here for days, so I’ll limit the scope.  Two examples that I find particularly fascinating include biophysicists modeling exactly how DNA functions, and condensed matter physicists moving tiny beads in a controlled way through a magnetic field, which you can watch for yourself in this YouTube video.  For the rest of this post I’ll be sharing my story, focusing on some of the kinds of computer programs I’ve been writing.

My area of specialization is astronomy; I work on a project called The Dark Energy Survey.  If you’ve read the post by Ken Patton, I do the same kind of science he does.  In short, we take lots of images of the sky with an enormous digital camera attached to a telescope, and then analyze the images in order to learn what the Universe is doing on scales roughly 100,000 times larger than the Milky Way.  For a more thorough explanation, I invite you to see our project website or follow this blog written by one of our scientists.  My work for the project has been twofold, writing software for controlling our instruments so that we can efficiently carry out our survey, and writing analysis software that uses our recently acquired data to make meaningful measurements.  In both cases, I’m doing loads of computer programming.  It’d take me a bit too long to adequately describe my analysis software, so I’ll focus on the instrumental side.

We have a very sophisticated camera, and I was responsible for writing applications to control a few of its components.  Today I’ll mention two, called the filter changing mechanism and the hexapod.

The filter changing mechanism does exactly what its name says; it changes filters.  Our camera has six filters to choose from.  Each filter allows the camera to see only one specific color of light, everything else is absorbed.  In astronomy, it is useful to look at the individual colors of the sky as separate images because no two images look the same, and the differences give us clues about what we’re seeing.  I’ve included a picture of the filter changer.  The cartoon version illustrates how it moves the different color filters into the opening, and the frame directly above that is a picture of the real filter changer itself.  To get a sense of how big these filters actually are, look at the next picture comparing the size of this opening to the size of a person.  (Again, I’m not in the picture.)  The scale of our camera is a bit larger than your everyday digital camera to say the least!

Picture1

Left: Our camera’s filter changer. The different filters let us look at different colors of light.
Right: We have a huge camera. The filters are the size of this opening.

The hexapod is a system of six “legs” for precisely adjusting the focus of our images.  Again, I included a picture of it (in which I don’t appear).  Despite its massive size, it controls movement of the surface atop those legs with extreme accuracy.  This is where we place our camera, so we can make small adjustments to get the most crisp looking images possible.  To see a much smaller hexapod in action, you can watch this YouTube video.  You can see what I’m talking about at 1:43 into the clip.

hexapod

Our camera’s hexapod. The six “legs” can be finely adjusted to control the focus of an image.

Writing programs for such precise and very expensive equipment seemed a bit of a daunting task at first.  Before starting the project I had only had limited programming experience, and had never written anything in Python, the particular language used throughout the work.  In fact, I had never programmed anything before learning some basics in my undergraduate physics courses.  Yet when all was said and done, writing the programs for the camera turned out to be completely manageable.  The instrument has been tested, and much to my delight, what I wrote works!  I’m not quite sure how to explain it, but when you talk to those with programming experience (myself included), there’s a consensus for noticing a genuine feeling of satisfaction when you successfully run a program that you wrote yourself, even if it’s a very simple program.  This feeling is one of the things I look forward to daily at work.  My experiences have also dispelled any misconceptions that I may have had about computer programming.  I assumed it would have been much harder to get the hang of it than it actually was.  With a little effort, anyone can learn to program and open the door to all the applications it affords.  I wish I had learned sooner!

Want to Learn More about Programming?

Although I was taught a small amount of programming in college, the vast majority of what I have learned is self taught.  Introductory programming help is widely accessible online, and this is how many aspiring scientists get started.  I highly encourage you to go this route if you feel inclined.  Googling “<insert programming language here> beginner tutorial” will bring back endless results.  A few programming languages commonly used today include C++, Java, and PythonHere is one website that I know of which offers interactive tutorials.  Another package which introduces you to programming concepts through 3D graphical movement is called ALICE, and is available for free download.

____________________________________________________________________

About Eric Suchyta

michigan_2012_croppedI am entering my fourth year as a PhD student in physics at THE Ohio State University, where I also did my undergraduate degree in physics.  I’m a diehard fan of my local sports teams (Buckeyes, Blue Jackets, Crew, USA soccer), and enjoy playing sports and keeping active in my free time.  I’m into metal music, and I’ve been known to grow a beard every now and then.  I also happen to be an identical twin.  I’m still trying to figure out what I want to be when I grow up.  You can find me on the Twitterverse with handle @eric_suchyta.

Advertisements

When I grow up I want to be a ____

by Anne Benjamin and Megan Harberts

What do you want to be when you grow up?

It’s a question that people are asked from an early age, but one that takes a long time to find an answer for. Even once you pick a major in college you still have lots of options. For example, students that study physics can have careers as researchers, professors, teachers, writers, computer programmers, and even as business people, just to name a few possibilities. Physicists can work at universities, government agencies, non-profit organizations, or private companies.  Private companies are often referred to as “industry.”

To answer the question for ourselves, we (Anne and Megan) have been taking advantage of some of the career exploration opportunities offered by the Center for Emergent Materials at The Ohio State University. In March, we visited the Air Force Research Lab (AFRL, a government lab) at Wright Patterson Air Force Base in Dayton, Ohio, and in May we took a two-day industry trip to Ford Motor Company’s Research and Development (R&D) labs in Dearborn, Michigan.

Like many, but not all, of our fellow graduate students, both of us went directly from high school to college for our bachelors degrees and then straight into graduate school. Because we are both actively doing research for our PhDs at a university, we are familiar with the workings of academic research but only have some idea of what employment at a government lab or in industry might entail.

We do know that there are important differences in how academic, government, and industrial labs direct their research efforts. Modern industry tends to focus on applied research, whereas university and government labs tend toward basic research. Basic research focuses on understanding fundamental science without specific applications in mind, while applied research attempts to meet a specific need or produce a specific product.

We could see the contrast between the two types during our visit to Ford, where we learned that one of their main goals is reducing their environmental impact. They described their research on alternatives to plastic for car interiors, some of which are already standard in their cars.  In comparison, the lab where Anne works at Ohio State currently focuses on exploring the properties and interactions of individual atoms in materials and Megan’s projects attempt to understand and use an organic magnetic material that disintegrates on exposure to air. These experiments are more directed toward our comprehension of materials and their properties than on the products that may result. Our visit to AFRL revealed a focus that fell between basic and applied research. The scientists there are not developing a specific product like a car, but because their research funding comes from the US Department of Defense they must show that their research will have practical military applications.

Our visits to both AFRL and Ford were similarly structured: they began with presentations that gave an overview of the organization and were followed by lab tours in which we interacted with the scientists working there.

One of the scientists at AFRL explained the structure of the research labs, which are broken into “directorates” by research focus, with each directorate located at different Air Force bases around the US.  We heard from scientists in the Materials and Manufacturing Directorate.

http://afciviliancareers.com/TeamAFRL/enterprise_locations.html

AFRL facilities and their respective directorates. Source: AFRL

After the introduction, we visited a ceramics lab where they research ways to strengthen materials like the ones used for space shuttle thermal protection tiles. When hot, the tiles become brittle and can be damaged by impact from debris.  We also toured a liquid crystal lab (think LCD TVs or smart phone screens) and tried on a pair of glasses that block sunlight with the flip of a switch.

http://commons.wikimedia.org/wiki/File:STS-118_damaged_tile.jpg

Thermal protection tile from the Space Shuttle Endeavor that was damaged by a piece of foam during launch.  Source: Wikipedia

At Ford, we saw a presentation from one of the managers who discussed the philosophy of the corporation, its current place in the economy, where the R&D department fell within the larger company, and some of the project goals for the department. We also heard from several scientists, including an OSU Physics graduate who had worked for Megan’s current adviser, about what physicists – as opposed to engineers or biologists – can do at Ford.

http://blog.ford.ca/2013/03/13/creating-the-future-at-fords-research-and-innovation-center/

Main entrance to Ford’s Research and Innovation Center in Dearborn, Michigan.  Source: Ford

Like our visit to AFRL, we next visited several labs and talked briefly with the scientists there. We saw what their workspaces are like, heard about their projects and got a glimpse of how they are carried out, and asked lots of questions about what their jobs are like. Anne’s favorite was the biological fuel scientist who was talking so enthusiastically about his project that our tour guide had to cut him off. Megan’s favorite lab uses alternative materials like corn, soy, and shredded money to replace some of the current plastics in car interiors. In the following video, you can watch a  presentation on soy-based car seats.

At Ford we also had the opportunity to eat lunch in their cafeteria and ask a few of the scientists who worked there in-depth questions about whatever we pleased. Many of them shared their experiences working in different departments and talked about the history of Ford.  It was interesting to hear how Ford once focused on more basic research and how that has changed recently, especially after the 2007 recession.

We both really enjoyed our visit to AFRL and Ford. It was very helpful to explore career options and talk to the people actually doing those jobs.  We now have a better sense of what industry and national laboratory jobs would be like and made some connections that may be useful in our job searches. Megan still has not decided exactly what path to pursue, but feels like she might want to work in industry after visiting Ford. While she does not want to work at either Ford or AFRL, these visits helped Anne cement her desire to work for a private company or applied-research government lab. We are both grateful for the opportunities to explore our career options, and encourage you to take advantage of similar opportunities to visit workplaces related to jobs that may interest you.

—————————————————————————————————————

About Anne Benjamin and Megan Harberts

picture for bioMegan (left) and Anne (right) are both physics graduate students doing experimental condensed matter research as part of the Center for Emergent Materials (CEM).  Anne and Megan have both previously written for A Day in the Life: So Why Physics?, What is Clean?, and Women in Science AND Sports.  You can follow Megan on Twitter: @meganharberts.

Space Tweets!

by Nancy Santagata

Confession: I am obsessed with space.

I recently joined Twitter and was pretty excited (I’m not going to lie!) to learn that several astronauts have official NASA Twitter feeds.  (There is even one joint feed – @NASA_Astronauts –  for all of them!)  Because I am particularly interested in female astronauts, I immediately followed Karen Nyberg, who is currently orbiting Earth aboard the International Space Station (ISS).  @AstroKarenN, as she is known, has a PhD in mechanical engineering from the University of Texas at Austin and was the 50th woman in space.

karen

@AstroKarenN concentrates on controlling the ISS’s robotic arm during a recent spacewalk. SOURCE: Twitter

It’s pretty awesome that astronauts are using social media to give us a glimpse of what is going on in low earth orbit.  Last week, Karen tweeted a photo of herself with two other current ISS astronauts, American Chris Cassidy and Italian Luca Parmitano, in preparation for the space walk shown above.  A few of my recent favorites were a photo of her doing an ultrasound on her own eye (yikes!), a picture of some of her young son’s artwork, and even a video showing how she washes her hair!  She also tweets cool pictures of Earth, including Cape Canaveral, Florida, (the launch site of many space shuttles), the Netherlands, an early morning in South America, and a very pretty sunset.

I encourage you to visit Twitter and see for yourself.  If you find something interesting, please share it with us in the comments!

_______________________________________________________________________

About Nancy Santagata

astro_nancyWhen I grow up, I want to be an astronaut!  Until I am @AstroNancy, you can follow me as @DrSantagata.  🙂