Commits

Miguel de Val-Borro committed 6c5795b

Add new imagfreq argument to class_to_obsblocks

Comments (0)

Files changed (1)

pyspeckit/spectrum/readers/read_class.py

     
 import pyspeckit
 @print_timing
-def class_to_obsblocks(filename,telescope,line,source=None,DEBUG=False):
+def class_to_obsblocks(filename,telescope,line,source=None,imagfreq=False,DEBUG=False):
     """
     Load an entire CLASS observing session into a list of ObsBlocks based on
     matches to the 'telescope', 'line' and 'source' names
         List of line names to be matched.
     source : list (optional)
         List of source names to be matched. Defaults to None.
+    imagfreq : bool
+        Create a SpectroscopicAxis with the image frequency.
     """
     spectra,header,indexes = read_class(filename,DEBUG=DEBUG)
 
             lastscannum = scannum
             if spectrumlist is not None:
                 obslist.append(pyspeckit.ObsBlock(spectrumlist))
-            xarr = make_axis(hdr)
+            xarr = make_axis(hdr,imagfreq=imagfreq)
             spectrumlist = [(
                 pyspeckit.Spectrum(xarr=xarr,
                     header=H,