<p>As a rule, work in the field of observational astronomy and astrophysics requires knowledge of such programming languages as: C/C++ and the principles of OOP, MPI, CUDA. Sometimes additional mathematical libraries are used (alglib, gsl, numpy, sympy).</p>
<p>But I would like to know something else. I came across a <a href="https://articles.adsabs.harvard.edu/pdf/1978BICDS..15...31K" rel="nofollow noreferrer">publication</a> in which astronomical (astrophysical) work is presented in the form of the following block:</p>
<p><a href="https://i.sstatic.net/aLVql.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/aLVql.png" alt="enter image description here" /></a></p>
<p>This structure corresponds to the following 5 sections:</p>
<p><a href="https://i.sstatic.net/4pE1Y.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/4pE1Y.png" alt="enter image description here" /></a></p>
<p>There are two key points:</p>
<ol>
<li>The lists of recommended programming languages do not show what specific tasks from the field of astronomy and astrophysics can be solved with their help.</li>
<li>An indicative list of tasks usually solved in the field of astronomy and astrophysics does not show which programming languages and how they are solved.</li>
</ol>
<p>Part of this can be circumvented by studying specially designed astronomical and astrophysical software packages and the problems they solve. Each astronomical and astrophysical problem thus has its own set and type of input and output data, as well as the structure and solution algorithm. Therefore, for this or that type of task, its own programming language (or their combination) is suitable. To overcome the contradiction and ease the entry threshold, it would be desirable to compare each of the above 5 sections with programming languages and specific basic tasks that can be solved with their help.</p>

CC BY-SA 4.0
2023-07-06T05:35:49.363Z
Really anything which physics and chemistry has... fluid and gas dynamics on any scale, MHD, multi-particle simulations, raytracing, heat conductivity, phase transitions, optics, ... ask 10 astrophysicists, get 11 answers.
planetmaker
CC BY-SA 4.0
2023-07-06T05:53:18.440Z
@planetmaker I understand why. The fact is that often an astrophysicist is engaged in some narrow section of physics, studying an astrophysical object or phenomenon. You have given, in my opinion, the general sections of physics that are used in astrophysics. Perhaps, with their help, it will be possible to describe typical tasks in the spirit of "numerical study of the magnetic field of a magnetar using Python" ...
ayr
CC BY-SA 4.0
2023-07-06T06:57:49.093Z
I understand, yet I believe in this form it will remain an opinion-based survey - a format not well suited and discouraged for this site as these kind of questions don't have a definitive answer. Don't underestimate how much and often python is meanwhile used - the entry barrier is much lower, so it gained quite high popularity, unless really heavy number crunching or much faster speed is needed
planetmaker
CC BY-SA 4.0
2023-07-06T07:53:58.883Z
I work in the "field of observational astronomy and astrophysics". Whilst I used to use C and GSL, I now exclusively use Python. The other stuff you are talking about is mainly used in theoretical calculations.
ProfRob
CC BY-SA 4.0
2023-07-06T08:08:39.183Z
@ProfRob Curious information! Earlier it seemed to me that this list is much wider. But, in any case, as a rule, in such matters, people are interested in the list of programs. I am interested in examples of specific astrophysical problems in one or another programming language. It is clear that each language will be good for solving one problem and not fit for another. And yes, the section of theoretical calculations also interests me.
ayr
CC BY-SA 4.0
2023-07-06T08:22:56.350Z
This is then just a "list question".
ProfRob
CC BY-SA 4.0
2023-07-06T13:21:39.327Z
>>The fact is that often an astrophysicist is engaged in some narrow section of physics, studying an astrophysical object or phenomenon.
It is quite the opposite. Even when studying a single type of object, a wide range of subdisciplines of physics have to be employed to understand this object.
AtmosphericPrisonEscape
CC BY-SA 4.0
2023-07-06T16:45:51.873Z
One project I have been working on is VSOP87 (computing the positions of the planets) in a mutlitude of programming languages. https://github.com/gmiller123456/vsop87-multilang/
Greg Miller
CC BY-SA 4.0
2023-07-07T01:43:52.963Z
are you aware of the python package called [astropy](https://www.astropy.org/)? it and its [affiliated packages](https://www.astropy.org/affiliated/index.html) might be interesting to take a look at
Aaron F
CC BY-SA 4.0
2023-07-07T05:31:57.783Z
@AaronF I am not familiar with this package. Thanks a lot for the recommendation!
ayr
CC BY-SA 4.0
2023-07-07T07:17:27.943Z
@GregMiller When working on this project, what methods did you use (celestial mechanics, relativity, etc.)?
ayr
<observational-astronomy><astrophysics><radio-astronomy><software>
Typical astronomical and astrophysical problems in various programming languages
ayr
# Typical astronomical and astrophysical problems in various programming languages

(Asked by: username_0 on 2023-07-06)

As a rule, work in the field of observational astronomy and astrophysics requires knowledge of such programming languages as: C/C++ and the principles of OOP, MPI, CUDA. Sometimes additional mathematical libraries are used (alglib, gsl, numpy, sympy).

But I would like to know something else. I came across a [publication](https://articles.adsabs.harvard.edu/pdf/1978BICDS..15...31K) in which astronomical (astrophysical) work is presented in the form of the following block:

[![enter image description here](https://i.sstatic.net/aLVql.png)](https://i.sstatic.net/aLVql.png)

This structure corresponds to the following 5 sections:

[![enter image description here](https://i.sstatic.net/4pE1Y.png)](https://i.sstatic.net/4pE1Y.png)

There are two key points:

1. The lists of recommended programming languages do not show what specific tasks from the field of astronomy and astrophysics can be solved with their help.
2. An indicative list of tasks usually solved in the field of astronomy and astrophysics does not show which programming languages and how they are solved.

Part of this can be circumvented by studying specially designed astronomical and astrophysical software packages and the problems they solve. Each astronomical and astrophysical problem thus has its own set and type of input and output data, as well as the structure and solution algorithm. Therefore, for this or that type of task, its own programming language (or their combination) is suitable. To overcome the contradiction and ease the entry threshold, it would be desirable to compare each of the above 5 sections with programming languages and specific basic tasks that can be solved with their help.

**Tags:** observational-astronomy, astrophysics, radio-astronomy, software

> **Comments:**
> **username_1**: Really anything which physics and chemistry has... fluid and gas dynamics on any scale, MHD, multi-particle simulations, raytracing, heat conductivity, phase transitions, optics, ... ask 10 astrophysicists, get 11 answers.  
> **username_0**: @username_1 I understand why. The fact is that often an astrophysicist is engaged in some narrow section of physics, studying an astrophysical object or phenomenon. You have given, in my opinion, the general sections of physics that are used in astrophysics. Perhaps, with their help, it will be possible to describe typical tasks in the spirit of "numerical study of the magnetic field of a magnetar using Python" ...  
> **username_1**: I understand, yet I believe in this form it will remain an opinion-based survey - a format not well suited and discouraged for this site as these kind of questions don't have a definitive answer. Don't underestimate how much and often python is meanwhile used - the entry barrier is much lower, so it gained quite high popularity, unless really heavy number crunching or much faster speed is needed  
> **username_2**: I work in the "field of observational astronomy and astrophysics". Whilst I used to use C and GSL, I now exclusively use Python. The other stuff you are talking about is mainly used in theoretical calculations.  
> **username_0**: @username_2 Curious information! Earlier it seemed to me that this list is much wider. But, in any case, as a rule, in such matters, people are interested in the list of programs. I am interested in examples of specific astrophysical problems in one or another programming language. It is clear that each language will be good for solving one problem and not fit for another. And yes, the section of theoretical calculations also interests me.  
> **username_2**: This is then just a "list question".  
> **username_3**: >>The fact is that often an astrophysicist is engaged in some narrow section of physics, studying an astrophysical object or phenomenon. It is quite the opposite. Even when studying a single type of object, a wide range of subdisciplines of physics have to be employed to understand this object.  
> **username_4**: One project I have been working on is VSOP87 (computing the positions of the planets) in a mutlitude of programming languages. https://github.com/gmiller123456/vsop87-multilang/  
> **username_5**: are you aware of the python package called [astropy](https://www.astropy.org/)? it and its [affiliated packages](https://www.astropy.org/affiliated/index.html) might be interesting to take a look at  
> **username_0**: @AaronF I am not familiar with this package. Thanks a lot for the recommendation!  
> **username_0**: @GregMiller When working on this project, what methods did you use (celestial mechanics, relativity, etc.)?  

---

## 0 answers

