Python introduction for astro and spectro

Python introduction for astro and spectro

Postby Matthieu Le Lain » Sun Dec 13, 2020 2:22 pm

Hello all,

The desire to get into Python or to discover its usefulness in astro is sometimes evoked among amateur astronomers. I've been "playing" with various common libraries used in astronomy lately. In order to share and keep an introductory basis, I have tried to write an article on the use of Python in astro and spectro, for all intents and purposes..

The use remains classical, and based on official documentation, taking as a guideline the visualisation of data acquired during a personal astrophoto or spectro session.

I have not detailed the basics of the programming language in the intro, but I have indicated some links to get started and go further in the resources of the article.

The Jupyter notebook with the code and dataset used is downloadable at the end as well.

There are probably a few errors that have crept in, your precisions/corrections are of course welcome.

Article is in fr & en

It's here: https://stellartrip.net/python-for-astronomy-and-spectroscopy-rapid-spectrum-analysis/?lang=en

---

Bonjour à tous,

L'envie de se lancer dans le Python ou de découvrir son utilité en astro est parfois évoquée chez les astronomes amateurs. J'ai "joué" avec différentes librairies courantes utilisées en astronomie dernièrement. Afin de partager et de garder une base introductive, j'ai tenté de rédiger un article sur l'utilisation de Python en astro et en spectro, à toutes fins utiles..

L'utilisation reste classique, et basée sur les documentations officielles, en prenant comme fil conducteur la visualisation des données acquises lors d'une session personnelle d'astrophoto ou de spectro.

Je n'ai pas détaillé les bases du langage de programmation dans l'introduction, mais j'ai indiqué quelques liens pour démarrer et aller plus loin dans les ressources de l'article.

Le Jupyter Notebook avec le code et le dataset est téléchargeable à la fin de l'article également.

Il y a probablement quelques erreurs qui s'y sont glissées, vos précisions/corrections sont bien entendu les bienvenues.

L'article est en fr & en.

C'est par ici : https://stellartrip.net/python-pour-lastronomie-et-la-spectroscopie-analyse-rapide-dun-spectre

Matthieu
Matthieu Le Lain
 
Posts: 14
Joined: Mon Apr 15, 2019 4:33 pm

Re: Python introduction for astro and spectro

Postby Ken Hudson » Sun Dec 13, 2020 6:29 pm

Matthieu,

This is wonderful!! Thank you VERY much for creating this wonderful webpage - you did an EXCELLENT job!! I am excited to start working through the code. I'm sure I will learn a lot.

Thank you again!!

Ken
Ken Hudson
 
Posts: 18
Joined: Thu Oct 06, 2011 4:02 pm

Re: Python introduction for astro and spectro

Postby Dubreuil Pierre » Sun Dec 13, 2020 10:59 pm

je dirais exactement comme Matthieu

C'est excellent !! Merci beaucoup d'avoir créé cette super page Web - un sacré travail !! J'ai beaucoup à apprendre avec le code. Ca manquait vraiment cette base de travail

Cordialement
Merci encore!!

Pierre
Dubreuil Pierre
 
Posts: 153
Joined: Sat Oct 01, 2011 12:34 pm

Re: Python introduction for astro and spectro

Postby Stu Todd » Mon Dec 14, 2020 9:52 am

Matthieu,

Nice job, thank you for taking the time to document your method!
I have been using Anaconda on an Ubuntu laptop and had some success. Python is the way to go!

Regards,

Stu
Stu Todd
 
Posts: 17
Joined: Mon Mar 21, 2016 6:29 am
Location: Dunedin, New Zealand

Re: Python introduction for astro and spectro

Postby Matthieu Le Lain » Mon Dec 14, 2020 8:36 pm

Hi all,

Thank you so much for your feedback ! I am glad to see that could be useful !

I'm condensing some methods and routines for everyday quick use (view, annotate, ..). I'll also put the class, or module, on the git repository after I've cleaned it up to share.

@Stu: Yes, anaconda is a powerful solution, i think it's a good choice for long term work.

Matthieu
Matthieu Le Lain
 
Posts: 14
Joined: Mon Apr 15, 2019 4:33 pm

Re: Python introduction for astro and spectro

Postby Francois Teyssier » Thu Dec 17, 2020 12:11 pm

Matthieu, c'est superbe sur la forme comme sur le fond.
Beaucoup d'information trés intéressant.
Merci pour le partage.

François
Francois Teyssier
 
Posts: 1416
Joined: Fri Sep 23, 2011 1:01 pm
Location: Rouen

Re: Python introduction for astro and spectro

Postby Matthieu Le Lain » Wed Jan 06, 2021 8:56 pm

Hi all,

Thank very much François,

I think that could be interesting for those who wants to know more, there is also this paper : "A Beginner's guide to working with Astronomical Data" by Markus Pössel

"This elementary review covers the basics of working with astronomical data, notably with images, spectra and higher-level (catalog) data. The basic concepts and tools are presented using both application software (DS9 and TOPCAT) and Python. The level of presentation is suitable for undergraduate students, but should also be accessible to advanced high school students."

https://arxiv.org/abs/1905.13189

Regards,

Matthieu
Matthieu Le Lain
 
Posts: 14
Joined: Mon Apr 15, 2019 4:33 pm


Return to Python

Who is online

Users browsing this forum: No registered users and 1 guest

cron

x