Last change
on this file since 11 was
11,
checked in by meynadie, 16 years ago
|
Mise au point pre.py
|
-
Property svn:executable set to
*
|
File size:
545 bytes
|
Line | |
---|
1 | #!/bin/env python |
---|
2 | # coding: utf-8 |
---|
3 | |
---|
4 | import pyfits |
---|
5 | from optparse import OptionParser |
---|
6 | |
---|
7 | import numpy |
---|
8 | |
---|
9 | |
---|
10 | parser = OptionParser() |
---|
11 | |
---|
12 | (options, args) = parser.parse_args () |
---|
13 | |
---|
14 | if (len(args) !=1) : |
---|
15 | print "Usage : gen_degrade.py output.fits" |
---|
16 | |
---|
17 | # Génération de la matrice |
---|
18 | a = numpy.zeros((2053,2160)) |
---|
19 | for i in range(2160): |
---|
20 | a[:,i]=i+1 |
---|
21 | |
---|
22 | # Creation de l'objet fits |
---|
23 | hdu = pyfits.PrimaryHDU(a) |
---|
24 | hdulist = pyfits.HDUList([hdu]) |
---|
25 | |
---|
26 | prihdr = hdulist[0].header |
---|
27 | prihdr.add_history('Generation de la mire') |
---|
28 | hdulist.writeto(args[0],clobber=True) |
---|
29 | |
---|
30 | |
---|
31 | |
---|
32 | |
---|
33 | hdulist.close() |
---|
Note: See
TracBrowser
for help on using the repository browser.