Changeset 5 for pyraw2fits


Ignore:
Timestamp:
04/07/08 14:57:45 (12 years ago)
Author:
meynadie
Message:

mises à jour diverses

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pyraw2fits/pyraw2fits.py

    r4 r5  
    1111 
    1212parser = 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") 
    1717 
    1818 
    1919(options, args) = parser.parse_args () 
    2020 
     21InputFilename = args[0] 
     22OutputFilename = InputFilename.replace('.dat','.fits') 
     23 
     24print InputFilename, OutputFilename 
    2125 
    2226#print len(options.keys()) 
     
    2832# Ouverture de l'image en mode lecture binaire (windows) 
    2933try: 
    30     f= open(options.InputFilename,'rb') 
     34    f= open(InputFilename,'rb') 
    3135except IOError : 
    3236    print "Impossible d'ouvrir l'image" 
     
    6872 
    6973 
    70 of = options.OutputFilename 
     74of = OutputFilename 
    7175 
    7276hdu.writeto(of,clobber=True) 
Note: See TracChangeset for help on using the changeset viewer.