Tutorial: Practical Python for Astronomers
Practical Python for Astronomers is a series of hands-on workshops to explore the Python language and the powerful analysis tools it provides. The emphasis is on using Python to solve real-world problems that astronomers are likely to encounter in research.
The workshops immediately make use of the full suite of plotting, analysis, and file reading tools. Along the way elements of the Python language such as data types ...
Resource: python4astronomers
Description: Practical Python for Astronomers
Homepage URL: http://python4astronomers.github.com/
Practical Python for Astronomers is a series of hands-on workshops to explore the Python language and the powerful analysis tools it provides. The emphasis is on using Python to solve real-world problems that astronomers are likely to encounter in research.
The workshops immediately make use of the full suite of plotting, analysis, and file reading tools. Along ...
Snippet: Fix the WCS for a FITS image file
The code snippet which follows will allow you to fix an error in the astrometry of a FITS image. This is especially common with HST images because the astrometrical errors can be an arcsecond or more. The method used assumes that you have extracted the positions (RA, Dec) for at least 2 image point sources for which you have more accurate reference positions (e.g. from SDSS or ...
Tutorial: External Python packages in CIAO or Sherpa analysis
Using Python packages that are not included within the CIAO distribution is straightforward. The key is that you need to use the CIAO python executable to install those packages into a location where CIAO python will find them. In general the CIAO python will NOT find packages that are included in your system python installation -- these two are distinct and you must use one or the other. Fortunately ...
Snippet: Basic Sherpa SED Fitting
This code snippet goes through the basic steps of importing and fitting a spectral energy distribution with Sherpa. The data were saved from NED in XML (VO Table) format and are imported into python using the vo module. After a little data processing, the SED is fit with a simple 2 power-law function. The script uses Sherpa's internally configured plotting capabilities to show the model overplotted on ...