Last change
on this file since 34 was
29,
checked in by meynadie, 16 years ago
|
ajout double quotes
|
-
Property svn:executable set to
*
|
File size:
1.6 KB
|
Rev | Line | |
---|
[28] | 1 | #!/bin/env python |
---|
| 2 | # coding: utf-8 |
---|
| 3 | |
---|
| 4 | import glob |
---|
| 5 | import os |
---|
| 6 | import subprocess as sp |
---|
| 7 | import sys |
---|
| 8 | import datetime |
---|
| 9 | |
---|
| 10 | pwd = sys.path[0] |
---|
| 11 | |
---|
| 12 | log = open("./05_resultat.txt",'w') |
---|
| 13 | |
---|
| 14 | threshold = 0.5 |
---|
| 15 | width = 5 |
---|
| 16 | |
---|
| 17 | outs = "# %s\n" % (datetime.datetime.now().isoformat()) |
---|
| 18 | log.write(outs) |
---|
| 19 | outs = "# Nom Fichier / rayon x / centre x / rayon y / centre y / intensité centrale / '*' si problÚme\n" |
---|
| 20 | log.write(outs) |
---|
| 21 | outs = "# Seuil détection bord (par rapport au max) = %f\n" % (threshold) |
---|
| 22 | log.write(outs) |
---|
| 23 | outs = "# largeur fenêtre pour intensité moyenne au centre = %f\n" % (2*width +1) |
---|
| 24 | log.write(outs) |
---|
| 25 | |
---|
| 26 | log.flush() |
---|
| 27 | |
---|
| 28 | for filename in glob.glob("*.dat"): |
---|
| 29 | print filename |
---|
| 30 | # On obtient le "basename" (i.e. le nom de fichier moins '.dat') |
---|
| 31 | bn = filename[:-4] |
---|
[29] | 32 | os.system('python "%s/01_pyraw2fits.py" -n %s' % (pwd, |
---|
[28] | 33 | filename)) |
---|
[29] | 34 | os.system('python "%s/02_prepare.py" %s %s' % (pwd, |
---|
[28] | 35 | bn+'.fits', |
---|
| 36 | bn+'_02.fits')) |
---|
[29] | 37 | os.system('python "%s/03_suppr_fond.py" %s %s' % (pwd, |
---|
[28] | 38 | bn+'_02.fits', |
---|
| 39 | bn+'_03.fits')) |
---|
[29] | 40 | buf = sp.Popen('python "%s/04_cherche_centre.py" -t %f -w %i %s' %\ |
---|
[28] | 41 | (pwd, |
---|
| 42 | threshold, |
---|
| 43 | width, |
---|
| 44 | bn+'_03.fits'), |
---|
| 45 | shell=True, |
---|
| 46 | stdout=log) |
---|
| 47 | # Le lignes suivantes effacent les fichiers générés |
---|
| 48 | # Commenter si besoin |
---|
| 49 | # os.remove(bn+'.fits') |
---|
| 50 | os.remove(bn+'_02.fits') |
---|
| 51 | # os.remove(bn+'_03.fits') |
---|
| 52 | |
---|
| 53 | log.close() |
---|
| 54 | |
---|
Note: See
TracBrowser
for help on using the repository browser.