Package pysls
[frames] | no frames]

Package pysls

source code

pysls : Python Spectroscopic Lens Search

Welcome to Python Spectroscopic Lens Search !

More text should come here...

Usage (Readme.txt from Francois)

Purpose

The aim of this project is to find strong gravitational lenses by spectroscopy, using a large sample of quasar spectra recovered by the Sloan Digital Sky Survey (SDSS).

Principle

Here are the different conceptual steps used to select the candidats :

I. The first selection

  1. read a spectra from a fits file
  2. build a template made of several gaussian functions (they are supposed to look like typical emission lines in a QSO spectra)
  3. crosscorrelate the spectra (the continuum is substracted) and the template (before that, we mask certain regions of the spectra that may corrupt the results, such as sky lines or noise peaks)
  4. identify the peaks in the crosscorrelation
  5. select the "good" peaks in the previous list
  6. fit the template at all the position in the spectra corresponding to the detected peaks
  7. if the template fits well, write a "candidat" file, containing in particular a "quality" parameter

II. The second selection

  1. read a candidat
    1. try to fit new lines absent in the initial template
    2. write a new candidat file, with a new quality

III. The viewing and "hand" selection

  1. show a candidat : its spectra, the position and the shape of the fitted template
  2. if the candidat is convincing, copy it "by hand" in a directory

Programs

The first selection is made with "build_cand.py", the second one with "2nd_selection.py" and the viewing with "view_cand.py". All the main parameters are written in "config.py", the three first mentioned programs run this file, even if they don't need all the parameters. To analyze the results, the "hist.py" file draws several figures from which we can observe statistical trends.

For further details, check the documentation in "docs/" (open "index.html") and the files (for example, the programs contain a small description at the beginning). To recompile the documentation use the command "epydoc --config=epydoc.conf".

Warning : The functions with the mention "[not used]" might not work. They are not directly used in the current programs, but could be useful for further developments.

General Parameters

In practice, we take the QSO from Data Release 7 with a redshift under 0.5 (about 15000 objects). We always use three emission lines (H beta and the two O III, present around 5000 angstroems) with a thin profile (5 angstroems) for the initial template. We mask the regions before the two O III in the foreground object, two emission lines in the sky (at 5580 and 6300 A) and H alpha. Once the template is fitted, we calculate the ratio between each peaks in the template and the noise at the given position. The "quality" of a candidats is the sum of all these ratio for the template.

Further Investigations

Here are a few suggestions to continue the project :

Submodules