Changeset 5 for pyraw2fits/pyraw2fits.py
- Timestamp:
- 04/07/08 14:57:45 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pyraw2fits/pyraw2fits.py
r4 r5 11 11 12 12 parser = OptionParser() 13 parser.add_option("-i","--input",dest="InputFilename",14 help="Input filename (required)", metavar="RAWIMAGE")15 parser.add_option("-o","--output",dest="OutputFilename",16 help="Output Filename (required)", metavar="FITSIMAGE")13 ##parser.add_option("-i","--input",dest="InputFilename", 14 ## help="Input filename (required)", metavar="RAWIMAGE") 15 ##parser.add_option("-o","--output",dest="OutputFilename", 16 ## help="Output Filename (required)", metavar="FITSIMAGE") 17 17 18 18 19 19 (options, args) = parser.parse_args () 20 20 21 InputFilename = args[0] 22 OutputFilename = InputFilename.replace('.dat','.fits') 23 24 print InputFilename, OutputFilename 21 25 22 26 #print len(options.keys()) … … 28 32 # Ouverture de l'image en mode lecture binaire (windows) 29 33 try: 30 f= open( options.InputFilename,'rb')34 f= open(InputFilename,'rb') 31 35 except IOError : 32 36 print "Impossible d'ouvrir l'image" … … 68 72 69 73 70 of = options.OutputFilename74 of = OutputFilename 71 75 72 76 hdu.writeto(of,clobber=True)
Note: See TracChangeset
for help on using the changeset viewer.