1 """
2 pysls : Python Spectroscopic Lens Search
3
4
5 Welcome to Python Spectroscopic Lens Search !
6 =============================================
7
8
9 More text should come here...
10
11
12 Usage (Readme.txt from Francois)
13 ================================
14
15
16
17 Purpose
18 -------
19
20 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).
21
22
23 Principle
24 ---------
25
26 Here are the different conceptual steps used to select the candidats :
27
28 I. The first selection
29 1. read a spectra from a fits file
30 2. build a template made of several gaussian functions (they are supposed to look like typical emission lines in a QSO spectra)
31 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)
32 4. identify the peaks in the crosscorrelation
33 5. select the "good" peaks in the previous list
34 6. fit the template at all the position in the spectra corresponding to the detected peaks
35 7. if the template fits well, write a "candidat" file, containing in particular a "quality" parameter
36
37 II. The second selection
38 8. read a candidat
39 9. try to fit new lines absent in the initial template
40 10. write a new candidat file, with a new quality
41
42 III. The viewing and "hand" selection
43 11. show a candidat : its spectra, the position and the shape of the fitted template
44 12. if the candidat is convincing, copy it "by hand" in a directory
45
46
47 Programs
48 --------
49
50 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.
51
52 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".
53
54 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.
55
56
57 General Parameters
58 ------------------
59
60 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.
61
62
63 Further Investigations
64 ----------------------
65
66 Here are a few suggestions to continue the project :
67
68 - try to use different templates (the width of 5 angstroems for each line seems to be good, but you can add or remove other lines),
69 - try different masks (to hide the sky or the foreground lines),
70 - apply the selections not only for QSO but also galaxies in general (might be easier because the emission lines are much weaker ; check the SLACS to "calibrate"),
71 - improve the way of detecting peaks,
72 - use more parameters for the fits (width, position,...),
73 - define a more sophisticated "quality".
74
75
76
77
78
79 """
80
81 __all__ = ['sp','li','pl','tem','lib', 'ca']
82