Is Julia suitable to analyze the results of astrophysical simulations?

Probably the answer depends on what you want to analyze. If there is some package that does exactly what you need, it is better (unless for learning purposes), stick to the package.

Curiously, despite the fact that astrophysics is not my field, one of the packages I have put up was motivated by a user who wanted a practical tool to compute astrophysical properties (Pairwise computation slower than Python (Cython) code (BallTree very slow!)). The problem there was computing the histogram of pairwise velocities of galaxies, but with some specification that was not covered, afaik, by one standard package.

This led me to split one package of mine into this package: https://github.com/m3g/CellListMap.jl

Which allows you to write your own functions to compute properties of the simulation quite simply (assuming their are dependent on the relative positions of the galaxies, planets, etc), and compute them efficiently. The advantage here over other languages/implementations, is exactly the flexibility.

Now brief two cents for the other answers:

  • Do you think Julia will replace python for this kind of analysis?

I do not think that packages that work and are reasonably well implemented will be “substituted”. But alternatives exist when people need different things and/or different performance.

  • Do you think that switching to Julia would help the students that will look for a job?

Yes. If the students turn out to learn Julia properly they will become much better programmers, even in Python. And that will help them getting jobs.

  • Should we use Julia in the course?

What is the purpose of the course? Do you need the students to implement their own analysis routines, perhaps dependent on the positions of millions of particles? If so, yes. Start with my package there, and let the students have fun :wink: .

5 Likes