Astronomy

The topic of astronomy is closely related to astrometry, and it is covered as a continuation of the topics examined within the Gaia-related lecture and seminar.  Herschel and Hubble Space telescopes will be used to demonstrate concepts related to processing of the astronomical data. The covered topics include accessing archives of astronomical data and working with FITS files.  The lab activities also include several demonstrations, such as, example aperture photometry on Herschel SPIRE data. Students will continue working with the Astropy library, Activities will also include work with the ESASky web application. The topic of astronomy is closely related to astrometry, and it is covered as a continuation of the topics examined within the Gaia-related lecture and seminar. Herschel and Hubble Space telescopes will be used to demonstrate concepts related to processing of the astronomical data. The covered topics include archives of the space telescope data, working with FITS files, HiPS and MOC formats. Topic of exoplanet search was also incorporated into this lecture in the revised syllabus of the course. The students should also learn how to access TESS data and about methods of planetary transit detection in a light curve.

Lecture slides

Lab activities

A subset of the lab activities are based on examples of the Astropy package, specifically examples focused on operations with FITS files. However, these were extended with additional references and code in order to simplify the activity for students.

Another activity, the demonstration of the ESASky astroquery module, is taken from the public Github repository of the ESAC Science Data Centre.

The lab also contains two Herschel-focused activities based on publicly available Github repository by Ivan Valtchanov (working at ESA). 

All Jupyter notebooks used in this lab are grouped in a repository on Gitlab. Unlike the other lab supplementary materials, these are not made publically available because these materials include many third party notebooks. You can also acquire these notebooks at their source.

The link to the repository for students attending the course is the following: https://git.kpi.fei.tuke.sk/svd/lab-astronomy

Lab activities include the following:

Activities based on Astropy examples 

The original notebooks were modified by inclusion of additional specifications of the tasks.
The complete set of the original tutorials is available at the official Github repository: https://github.com/astropy/astropy-tutorials/tree/master/tutorials/notebooks or via https://learn.astropy.org/ 

Working with FITS headers (Edit a FITS header)

TASK #1: Read in the file you just wrote and add three header keywords.

  1. ‘RA’ for the Right Ascension of M31
  2. ‘DEC’ for the Declination of M31
  3. ‘RADECSRC’ with text indicating where you found the RA/Dec (web URL, textbook name, your photographic memory, etc.)

Viewing and manipulating data from FITS tables

TASK #1: Make a scatter plot of the same data you histogrammed above.

  • The plt.scatter function is your friend for this.
  • Play around with values of the parameters in order to get a picture with recognizable features.
    • Suggested parameters for experimentation: alpha (try low values), edgecolors (try ‘none’), s, marker, color (try black)
    • Observe the effect of the figure size
  • What are the pros and cons of doing it this way?
  • See: http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.scatter

TASK #2: Try the same with the plt.hexbin plotting function.

TASK #3: Create a mask to select only events (rows) in the specified range of energies

  • Lower bound of the energy bin is in variable energy_low
  • Bin width is stored in variable energy_bin_width
  • Do not forget to include mask of CCDs (ii) in your mask

Working with FITS images

TASK #1: Use numpy.interp function to rescale the values into [−1,+1] range

TASK #2: Apply ranked mean filter to the rescaled image

TASK #3: Select appropriate threshold to select only M13

TASK #4: Use appropriate method to convert coordinates of the maximum-value pixel to world coordinates

TASK #5: Lookup for a source in Gaia catalogue associated with the brightest point/star.

TASK #5: Write out the image you just created, preserving the header the original image had, but add a keyword ‘UNITS’ with the value ‘mag per sq arcsec’

Working with FITS cubes 

TASK #1: Try messing around with slicing the cube along different axes, or picking out different spectra

TASK #2: Create a new spectral slab isolating just the SMC and slice along a different dimension to create a latitude-velocity diagram

Creating an RGB image from Hubble data in SAOIMAGE DS9 

  • An activity based on “A Beginner’s Guide To Working With Astronomical Data” by Markus Pössel 
    • Pössel, M., “A Beginner’s Guide to Working with Astronomical Data”, The Open Journal of Astrophysics, vol. 3, no. 1, 2020. doi:10.21105/astro.1905.13189, ArXiv: 1905.13189.  (CC BY 4.0)
    • Chapter 3. “Saoimage DS9 And Astronomical Images”, pages 18-22 

Creating an RGB image from Hubble data in Astropy

In preparation

Stars subtraction in AMON ACC data (demonstration)

ESAC Science Data Centre (demonstrations)

Ivan Valtchanov’s notebooks (demonstrations)

TESS-related activities by STScI (Space Telescope Science Institute)

Tutorials created as a part of “TESS Workshop Tutorials” 

Curated set of Jupyter notebooks demonstrating work at STScI