Page 1 of 1

Python introduction for astro and spectro

Posted: Sun Dec 13, 2020 2:22 pm
by Matthieu Le Lain
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-astr ... s/?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-las ... un-spectre

Matthieu

Re: Python introduction for astro and spectro

Posted: Sun Dec 13, 2020 6:29 pm
by Ken Hudson
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

Re: Python introduction for astro and spectro

Posted: Sun Dec 13, 2020 10:59 pm
by Dubreuil Pierre
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

Re: Python introduction for astro and spectro

Posted: Mon Dec 14, 2020 9:52 am
by Stu Todd
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

Re: Python introduction for astro and spectro

Posted: Mon Dec 14, 2020 8:36 pm
by Matthieu Le Lain
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

Re: Python introduction for astro and spectro

Posted: Thu Dec 17, 2020 12:11 pm
by Francois Teyssier
Matthieu, c'est superbe sur la forme comme sur le fond.
Beaucoup d'information trés intéressant.
Merci pour le partage.

François

Re: Python introduction for astro and spectro

Posted: Wed Jan 06, 2021 8:56 pm
by Matthieu Le Lain
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