Computer Programming for Astrophysicist

Click For Summary

Discussion Overview

The discussion centers around the necessity of computer programming skills for undergraduate students pursuing a degree in Astrophysics, particularly at Columbia University. Participants explore various programming languages, resources, and strategies for beginners in the context of astrophysics and physics applications.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Homework-related

Main Points Raised

  • One participant emphasizes the importance of computer programming in astrophysics and seeks advice on applicable courses and programs.
  • Another suggests consulting with professors for tailored advice on preferred programming languages in the field.
  • Some participants mention popular computational languages such as Fortran, C++, Python, and IDL, noting their varying applications in computational physics.
  • A suggestion is made to explore online resources like Codecademy for learning programming fundamentals.
  • One participant proposes that the specific language may not matter as much as simply starting to code and experimenting with projects.
  • There is a mention of the utility of Python for scripting and data manipulation, as well as the importance of understanding how to communicate with computers through programming.
  • Learning LaTeX is recommended for preparing academic documents, with a note on its initial time investment versus long-term benefits.
  • Some participants highlight the ease of transitioning between programming languages once a foundational understanding is established.

Areas of Agreement / Disagreement

Participants express a range of opinions on the best programming languages and resources, indicating that there is no consensus on a single approach or language to prioritize. The discussion remains unresolved regarding the optimal path for beginners in programming for astrophysics.

Contextual Notes

Some limitations include the varying definitions of what constitutes essential programming skills and the dependence on individual learning preferences. The discussion does not resolve which programming languages are definitively the best for astrophysics applications.

SpaceMusicGeek
Messages
9
Reaction score
0
Hi Guys,

I'm going to start my undergraduate degree in Astrophysics at Columbia University this Fall. From the various conversations I have with professional Astrophysicists, it seems like i have to know computer programming on top of astrophysics, if i want to work in the field. I have ZERO to VERY, VERY LITTLE experience in computer programming ( honestly, I did some MS-DOS and LOTUS 123 in the 90s, but I've completely forgotten how by now ! ). What courses / computer programs should I learn. Which ones are applicable for Astrophysics/Physics ?
 
Physics news on Phys.org
While there are some popular computational-physics textbooks (Gould-Tobochnik, Giordano, Press-Teukolsky, etc... [http://sip.clarku.edu/books/computationalphysics.html ] ) and popular computational languages (java, python, c++, matlab, mathematica, etc...), it might be best for you to get advice from your astro professors... since they are working in the field and likely have preferences that you should follow if you wish to work with them.

From poking around the Columbia Astronomy website,
http://www.astro.columbia.edu/ [to Academics, Undergrad]
www.college.columbia.edu/bulletin/depts/astro.php?tab=ugrad [to course listings]
www.college.columbia.edu/bulletin/depts/astro.php?tab=courses
to the course description for "ASTR W4260x Modeling the Universe"...
http://www.columbia.edu/cu/bulletin/uwb/subj/ASTR/W4260-20133-001/
https://courseworks.columbia.edu/tbook-tool/viewTextbook.vtb?courseId=ASTRW4260_001_2013_3&view=course

..and then with google...
http://www.astro.columbia.edu/~gbryan/W4260/
 
Last edited by a moderator:
Most computational physics programs are written in Fortran or C++. The push these days is object-oriented programming.

Python is useful, but mostly for script programs that manipulate data, e.g., I/O arrangement. In one system, we use python script files to generate a finite element (FE) model (mesh) for use in a FE simulation.
 
I think you should have a look at this: http://www.codecademy.com/learn At first glance it looks like it the equivalent of khanacademy for learning how to program, looks like a nice guided tour to the fundamentals.

On the side, try getting started with LaTeX (grab texlive2012 and texniccenter if you're on Windows most of the time) and grab hold of a few good templates for your projects, homeworks, lab reports. It'll be a little more time consuming than doing everything in Word at first, but it will pay off and you'll be happy you learned how to use it later down the line when you're preparing your senior thesis...
 
SpaceMusicGeek said:
Hi Guys,

I'm going to start my undergraduate degree in Astrophysics at Columbia University this Fall. From the various conversations I have with professional Astrophysicists, it seems like i have to know computer programming on top of astrophysics, if i want to work in the field. I have ZERO to VERY, VERY LITTLE experience in computer programming ( honestly, I did some MS-DOS and LOTUS 123 in the 90s, but I've completely forgotten how by now ! ). What courses / computer programs should I learn. Which ones are applicable for Astrophysics/Physics ?

The short answer is it doesn't matter. You should just start coding something in whatever language. Use your imagination and try to simulate something in a fun way. After a while, if you get the programming bug, you will become curious and explore other languages and a lot more. Maybe python and PySci is a good place to start. But the important part is about realizing that in programming, you can pretty much do anything you want, and harness that.
 
Most astronomers program in IDL, but you need to pay for a license. So don't worry about that for now. The point is to learn some programming in any language, and it's easy to pick up a new programming language once you know one - it's just syntax from there. The real goal of learning programming is to figure out how the computer thinks, and how to tell it to do something. There are plenty of resources online for learning Python, so start there. Like others have suggested, learning some Linux commands would also be useful. If you have a Mac, great. Open up a terminal window and get started. If you have Windows, try a dual-install of Windows and Ubuntu.
 

Similar threads

  • · Replies 14 ·
Replies
14
Views
933
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 16 ·
Replies
16
Views
4K
  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K