casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables
sdnewfeatures_b3_tutorial.py
Go to the documentation of this file.
00001 # This script shows examples of features
00002 # added recently (mostly) for P3 developement
00003 #
00004 # 2008-09-25 TT 
00005 #
00006 
00007 # load single dish module
00008 asap_init()
00009 
00010 import os
00011 import sys
00012 
00013 
00014 # include total power data analysis demo
00015 tpdemo = True
00016 
00017 # include total power plotting demo using sdplot
00018 # FOR THE DEMO DATA SET USED HERE, PLOTTING
00019 # WILL BE VERY SLOW. 
00020 # To skip this set tpdemo2=False
00021 tpdemo2 = False 
00022 
00023 #get test data
00024 #default datapaths for the two datasets used in this script
00025 #datasets can be obtained via casa data respository (see casa web page)
00026 datapath1 = os.environ['CASAPATH'].split()[0]+'/data/regression/ATST5/OrionS/'
00027 datapath2 = os.environ['CASAPATH'].split()[0]+'/data/alma/atf/sd/'
00028 datafile1 = 'OrionS_rawACSmod'
00029 datafile2='uid___X1e1_X3197_X1.ms'
00030 
00031 print "*******SD analysis demo for Beta Patch 3*******"
00032 print "This script shows new/modified feautures of single dish tools/tasks\n"
00033 
00034 #clean up outputs from previous runs
00035 files=['orion_pscal', 'orion_pscal_if0_3000_5000', 'orion_pscal_bs_if0_blparam.txt',
00036 'orion_pscal_bs_if0','orion_pscal_bs_if0_f', 'orion_pscal_bs_if0_f_f','orion_pscal_allif_tave',
00037 'orion_pscal_scaled1.5']
00038 for f in files:
00039     if os.path.isdir(f) or os.path.isfile(f):
00040         os.system('rm -rf %s' % f)
00041        
00042 if os.path.isdir(datapath1+datafile1):
00043     os.system('mkdir %s;cp -r %s/[!.svn]*  ./%s' % (datafile1, datapath1+datafile1, datafile1))
00044 else:
00045     if not os.path.isdir(datafile1):
00046        print "Data file, %s, not found." % datafile1
00047        sys.exit() 
00048 if os.path.isdir(datapath2+datafile2):
00049     os.system('mkdir %s;cp -r %s/[!.svn]* ./%s' % (datafile2, datapath2+datafile2, datafile2))
00050 else:
00051     if not os.path.isdir(datafile2):
00052        print "Data file, %s, not found." % datafile2
00053        print "total power data analysis will be skipped"
00054        tpdemo = False
00055         
00056 
00057 ################
00058 # 1. sdcal #
00059 ################
00060 print "###############\n 1. sdcal \n###############"
00061 default(sdcal)
00062 desc="* At first, run calibration for the position switch observation\n" \
00063      "* (taken from ori_hc3n_task_regression.py) to get calibrated data\n"
00064 print desc
00065 sdfile='OrionS_rawACSmod'
00066 fluxunit='K'
00067 calmode='ps'
00068 scanlist=[20,21,22,23]
00069 iflist=[0,1,2,3]
00070 scanaverage=False
00071 timeaverage=True # average in time
00072 tweight='tintsys' # weighted by integ time and Tsys for time averaging
00073 polaverage=True  # average polarization
00074 pweight='tsys'   # weighted by Tsys for pol. averaging
00075 tau=0.09         # do opacity correction
00076 outfile='orion_pscal'
00077 overwrite=True
00078 plotlevel=1
00079 inp(sdcal)
00080 pause=raw_input('* Hit Return to continue ')
00081 
00082 print "\n* Run sdcal with these parameters...\n"
00083 sdcal()
00084 print "*** Done sdcal ****\n"
00085 desc="\n" \
00086      "* NEW FEATURE: channelrange\n" \
00087      "* now try new parameter, channelrange to save a subset of the spectra\n" \
00088      "* with restricted channel range. We do the same calibration as the previous\n" \
00089      "* sdcal run but select IF0 only and set a channel range from 3000 to 5000\n"
00090 print desc
00091 iflist=[0]
00092 channelrange=[3000,5000]
00093 outfile='orion_pscal_if0_3000_5000'
00094 inp(sdcal)
00095 pause=raw_input('* Hit Return to continue ')
00096 
00097 print "\n* Run sdcal with these parameters...\n"
00098 sdcal()
00099 print "*** Done sdcal ****\n"
00100 
00101 pause=raw_input('* Hit Return to continue ')
00102 
00103 desc="\n" \
00104      "NEW FEATURE: multi-resolution spectra averaging\n"\
00105      "Set timeaverage=True and averageall=True.  \n" \
00106      "SKIPPED: This is not test here since we do not have a good test data now\n"
00107 print desc
00108 
00109 pause=raw_input('\n* Hit Return to continue ')
00110 #################
00111 # 2. sdbaseline #
00112 #################
00113 print "\n###############\n 2. sdbaseline \n###############"
00114 desc="\n" \
00115      "* NEW FEATURE: set mask for baseline fitting interactively.\n" \
00116      "* Set blmode='interact'\n"
00117 print desc
00118 # NEW FEATURE:
00119 # Set mask(s) for baseline fitting interactively
00120 
00121 default(sdbaseline)
00122 # single panel case
00123 sdfile='orion_pscal'
00124 specunit='channel'
00125 iflist=0
00126 blmode='interact'
00127 outfile=sdfile+'_bs'+'_if0'
00128 plotlevel=1
00129 inp(sdbaseline)
00130 pause=raw_input('\n* Hit Return to continue ')
00131 print "\n* Run sdbaseline...\n"
00132 desc="\n" \
00133      "* By using mouse bottons, specify region(s).\n" \
00134      "* To mask (included in baseline fitting) using\n"\
00135      "* the left mouse button or to unmask (exculded in baseline fitting)\n" \
00136      "* using the right mouse button.\n" \
00137      "*\n" \
00138      "* For the example here, initially no masklist was given in the task parameter,\n" \
00139      "* which will be defaulted to put mask to entire spectrum, shown in the plot in yellow.\n" \
00140      "*\n" \
00141      "* Using right mouse button to unmask the line region...\n" \
00142      "* Once you satisfy with your masks, go back to the casapy console, \n" \
00143      "* and hit Return key to start processing.\n"
00144 print desc
00145 sdbaseline()
00146 print "*** Done sdbaseline ****\n"
00147 
00148 # you will see something like this...
00149 #UNmask:  [3753.4292059553341, 4415.2132258064503]
00150 #The current mask window unit is channel
00151 #The current mask window unit is channel
00152 #
00153 #final mask list (Channel) = [[0.0, 3753.0], [4416.0, 8191.0]]
00154 #The current mask window unit is channel
00155 #The current mask window unit is channel
00156 
00157 #--------------------------------------------------
00158 #  rms
00159 #--------------------------------------------------
00160 #Scan[0] (OrionS_ps) Time[2006/01/19/01:52:05]:
00161 # IF[0] = 0.166
00162 #--------------------------------------------------
00163 print "* Saved the fit paramters and rms after baseline fit"
00164 print "!cat %s" % outfile+'_blparam.txt' 
00165 # fitting parameters are stored in
00166 # <outfile>_blparam.txt
00167 os.system('cat %s' % outfile+'_blparam.txt')
00168 #IPython system call: cat orion_hc3n_pscal_bs_blparam.txt
00169 #############################################################
00170 #Source Table: orion_pscal
00171 # Output File: orion_pscal_bs_if0
00172 #   Flux Unit: K
00173 #     Abcissa: channel
00174 #   Fit order: 5
00175 #    Fit mode: interact
00176 #
00177 #   Fit Range: [[0.0, 3753.0], [4416.0, 8191.0]]
00178 #############################################################
00179 #------------------------------------------------------------
00180 # Scan[0] Beam[0] IF[0] Pol[0] Cycle[0]:
00181 #Baseline parameters
00182 #  p0= 2.763137,  p1= 0.000157,  p2= -0.000000,  p3= 0.000000,  p4= -0.000000,  p5= 0.000000
00183 #Results of baseline fit
00184 #  rms = 0.166347
00185 #------------------------------------------------------------
00186 
00187 
00188 pause=raw_input('\n* Hit Return to continue ')
00189 print "\n###############\n 3. sdflag \n###############"
00190 #############
00191 # 3. sdflag #
00192 #############
00193 #flag
00194 desc="\n" \
00195      "* Flag\n" \
00196      "* use the baselined data in the previous step.\n" \
00197      "* set plotlevel=1 to plot the spectrum with flagged region(s).\n"
00198 print desc
00199 default(sdflag)
00200 sdfile='orion_pscal_bs_if0'
00201 specunit='channel'
00202 maskflag=[[0,100],[2000,3000]]
00203 flagmode='flag'
00204 plotlevel=1 
00205 inp(sdflag)
00206 pause=raw_input('\n* Hit Return to continue ')
00207 print "* Run sdflag...\n"
00208 print "* Type y when asked to apply flag." 
00209 
00210 sdflag()
00211 print "*** Done sdflag ****\n"
00212 # output->orion_pscal_bs_if0_f
00213 
00214 desc="\n" \
00215      "* NEW FEATURE: restore\n" \
00216      "* get flag masks applied to the data"
00217 print desc      
00218 # NEW FEATURE:
00219 # check flagged region(s)  
00220 default(sdflag)
00221 sdfile='orion_pscal_bs_if0_f'
00222 flagmode='restore'
00223 inp(sdflag)
00224 pause=raw_input('\n* Hit Return to continue ')
00225 print "\n* Run sdflag...\n"
00226 sdflag()
00227 print "* You will see all flag masks applied to the data...\n"
00228 print "*** Done sdflag ****\n"
00229 #--------------------------------------------------
00230 #History of channel flagging:
00231 #          DATE: 2008/10/03 10:42:01
00232 #    APPLIED TO: SCANS=ALL IFS=ALL POLS=ALL
00233 #       FLAGGED: MODE='flag' MASK=[[0, 100], [2000, 3000]]
00234 #
00235 #--------------------------------------------------
00236 #SCAN[0] IF[0] POL[0]: Current mask is  [[0, 100], [2000, 3000]]
00237 #  Out[30]: [[[0, 100], [2000, 3000]]]
00238 
00239 #unflag
00240 desc="\n" \
00241      "* Try unflag...\n" \
00242      "* Set flagmode='unflag' \n" 
00243 print desc
00244 sdfile='orion_pscal_bs_if0_f'
00245 flagmode='unflag'
00246 maskflag=[2000,3000]
00247 plotlevel=1
00248 inp(sdflag)
00249 pause=raw_input('\n* Hit Return to continue ')
00250 print "\n* Run sdflag...\n"
00251 print "* Type y when asked to apply flag." 
00252 sdflag()
00253 print "*** Done sdflag ****\n"
00254 
00255 pause=raw_input('\n* Hit Return to continue ')
00256 #############
00257 # 4. sdplot #
00258 #############
00259 print "\n###############\n 4. sdplot \n###############"
00260 desc="\n" \
00261      "* First, generate calibrated data without polarization average.\n" \
00262      "* This time use sdreduce.\n"
00263 print desc
00264 #
00265 # Following step is just to save default setting.
00266 # This is currently needed to restore the default setting
00267 # since some plot control parameters set globally.
00268 #
00269 #default_colormap=sd.plotter._plotter.colormap
00270 #default_ls=sd.plotter._plotter.linestyles
00271 #lsalias=sd.plotter._plotter.lsalias
00272 #default_linestyles=[]
00273 #for lstyle in default_ls:
00274 #   for key,val in lsalias.iteritems():
00275 #      if lstyle==val: default_linestyles.append(key)
00276 
00277 default(sdreduce)
00278 sdfile='OrionS_rawACSmod'
00279 calmode='ps'
00280 scanlist=[20, 21, 22, 23]
00281 iflist=[0, 1, 2, 3]
00282 average=True
00283 timeaverage=True
00284 tweight='tintsys'
00285 tau=0.09
00286 blmode='auto'
00287 outfile='orion_pscal_allif_tave'
00288 inp(sdreduce)
00289 pause=raw_input('\n* Hit Return to continue ')
00290 print "\n* Run sdreduce...\n"
00291 sdreduce()
00292 print "*** Done sdreduce ****\n"
00293 
00294 desc="\n" \
00295      "* NEW FEATURE: plot color control\n" \
00296      "* specify colors to be used for plot lines\n" \
00297      "* stacking IFs, different panel for each polarization.\n"
00298 print desc
00299 
00300 default(sdplot)
00301 sdfile='orion_pscal_allif_tave'
00302 stack='i'
00303 panel='p'
00304 flrange=[-1,1.5]
00305 sprange=[2500,4500]
00306 colormap='c m g b' # ='cyan, magenta, green, blue'
00307 inp(sdplot)
00308 pause=raw_input('\n* Hit Return to continue ')
00309 print "\n* Run sdplot...\n"
00310 sdplot()
00311 print "*** Done sdplot ****\n"
00312 
00313 desc="\n" \
00314      "* NEW FEATURE:\n"\
00315      "* click left mouse button on one of the lines, a pop-up window will\n" \
00316      "* appear to display spectral data values as you move the mouse along\n" \
00317      "*  horizontal direction while keep holding the left mouse button.\n" 
00318 print desc
00319 
00320 pause=raw_input('\n* Hit Return to continue ')
00321 
00322 desc="\n" \
00323      "* NEW FEATURE: line styles \n" \
00324      "* specify line styles to be used for plot line. \n"
00325 print desc
00326 colormap='none'
00327 linestyles='line dotted dashed dashdot'
00328 linewidth=2
00329 pollist=0
00330 sprange=[2500,4500]
00331 inp(sdplot)
00332 pause=raw_input('\n* Hit Return to continue ')
00333 print "\n* Run sdplot...\n"
00334 sdplot()
00335 print "*** Done sdplot ****\n"
00336 
00337 desc="\n" \
00338      "* Currently flrange, and sprange are set globally. \n" \
00339      "* For now, to reset, you need to run sdplot with \n" \
00340      "* default parameters.\n"
00341 print desc
00342 
00343 default(sdplot)
00344 sdfile='orion_pscal_allif_tave'
00345 iflist=0
00346 pollist=0
00347 print "* Run sdplot...\n"
00348 sdplot()
00349 print "*** Done sdplot ****\n"
00350 
00351 # reset colormap and linestyles
00352 #sd.plotter.set_colors(default_colormap)
00353 #sd.plotter.set_linestyles(linestyles=default_linestyles,linewidth=1)
00354 ############################
00355 
00356 if tpdemo2:
00357     desc="\n" \
00358      "* NEW FEATURE: total power plotting\n" \
00359      "* (NOTE: functionality is still limited and processing speed is slow)\n" \
00360      "* This example needs the ATF total power data converted from ASDM to MS. \n" \
00361      "* Also, currently most of the plot control parameters are no effect or \n" \
00362      "* ignored in total power plotting mode. \n"
00363     print desc
00364     sdfile='uid___X1e1_X3197_X1.ms'
00365     plottype='totalpower'
00366     inp(sdplot)
00367     pause=raw_input('\n* Hit Return to continue ')
00368     print "\n* Run sdplot...\n"
00369     sdplot()
00370     print "*** Done sdplot ****\n"
00371 
00372 ###########
00373 # sdscale #
00374 ###########
00375 print "###############\n 5. sdscale \n###############"
00376 desc="\n" \
00377      "*  NEW FEATURE: print out Tsys values before and after scaling\n"
00378 print desc
00379 default(sdscale)
00380 sdfile='orion_pscal'
00381 factor=1.5
00382 inp(sdscale)
00383 pause=raw_input('\n* Hit Return to continue ')
00384 print "\n* Run sdscale...\n"
00385 sdscale()
00386 print "*** Done sdscale ****\n"
00387 #Scaled spectra and Tsys by 1.5
00388 #--------------------------------------------------
00389 # Original Tsys
00390 #--------------------------------------------------
00391 #Scan[0] (OrionS_ps) Time[2006/01/19/01:52:05]:
00392 # IF[0] = 118.099
00393 #--------------------------------------------------
00394 #
00395 #--------------------------------------------------
00396 # Scaled Tsys
00397 #--------------------------------------------------
00398 #Scan[0] (OrionS_ps) Time[2006/01/19/01:52:05]:
00399 # IF[0] = 177.149
00400 #--------------------------------------------------
00401 
00402 
00403 pause=raw_input('\n* Hit Return to continue ')
00404 ##########
00405 # sdstat #
00406 ##########
00407 print "\n###############\n 6. sdstat \n###############"
00408 desc="\n" \
00409      "* NEW FEATURE: statistics to an ASCII file \n" \
00410      "* Specify by statfile parameter\n"
00411 print desc
00412 # 2. an option to set mask for evalulating statistics interactively
00413 # 3 integrated intensity 
00414 #   currently only show in the screeen but not included in 
00415 #   returned dictionary
00416 default(sdstat)
00417 sdfile='orion_pscal'
00418 specunit='GHz'
00419 iflist=0
00420 interactive=True
00421 statfile='orion_stat.txt'
00422 inp(sdstat)
00423 pause=raw_input('\n* Hit Return to continue ')
00424 print "* Run sdstat...\n"
00425 desc="\n" \
00426      "* Initial mask is set to the entire spectrum\n" \
00427      "* as shown in yellow. The behavior for multi-IF\n" \
00428      "* cases is same as that of sdbaseline.\n"\
00429      "* Use right mouse botton to deselect regions\n"\
00430      "* Hit Return in the casapy console after you \n"\
00431      "* satisfy your mask selection.\n"
00432 print desc
00433 sdstat()
00434 print "*** Done sdstat ****\n"
00435 # specify line region, hit return in the console
00436 # then you will see output looks like this.
00437 
00438 #final mask list (GHz) = [[45.492970859204817, 45.495370089189244]]
00439 #--------------------------------------------------
00440 #  max
00441 #--------------------------------------------------
00442 #Scan[0] (OrionS_ps) Time[2006/01/19/01:52:05]:
00443 # IF[0] = 3.722
00444 #--------------------------------------------------
00445 #
00446 #--------------------------------------------------
00447 #  min
00448 #--------------------------------------------------
00449 #Scan[0] (OrionS_ps) Time[2006/01/19/01:52:05]:
00450 # IF[0] = 2.493
00451 #--------------------------------------------------
00452 #
00453 #--------------------------------------------------
00454 #  sum
00455 #--------------------------------------------------
00456 #Scan[0] (OrionS_ps) Time[2006/01/19/01:52:05]:
00457 # IF[0] = 1153.775
00458 #--------------------------------------------------
00459 #
00460 #--------------------------------------------------
00461 #  mean
00462 #--------------------------------------------------
00463 #Scan[0] (OrionS_ps) Time[2006/01/19/01:52:05]:
00464 # IF[0] = 2.928
00465 #--------------------------------------------------
00466 #
00467 #--------------------------------------------------
00468 #  median
00469 #--------------------------------------------------
00470 #Scan[0] (OrionS_ps) Time[2006/01/19/01:52:05]:
00471 # IF[0] = 2.830
00472 #--------------------------------------------------
00473 #
00474 #--------------------------------------------------
00475 #  rms
00476 #--------------------------------------------------
00477 #Scan[0] (OrionS_ps) Time[2006/01/19/01:52:05]:
00478 # IF[0] = 2.940
00479 #--------------------------------------------------
00480 #
00481 #--------------------------------------------------
00482 #  stddev
00483 #--------------------------------------------------
00484 #Scan[0] (OrionS_ps) Time[2006/01/19/01:52:05]:
00485 # IF[0] = 0.264
00486 #--------------------------------------------------
00487 #
00488 #The current mask window unit is GHz
00489 #The current mask window unit is GHz
00490 #
00491 #--------------------------------------------------
00492 #  eqw [ GHz ]
00493 #--------------------------------------------------
00494 #Scan[0] (OrionS_ps) Time[2006/01/19/01:52:05]:
00495 # IF[0] = 0.002
00496 #--------------------------------------------------
00497 #
00498 #--------------------------------------------------
00499 #  Integrated intensity [ K * GHz ]
00500 #--------------------------------------------------
00501 #Scan[0] (OrionS_ps) Time[2006/01/19/01:52:05]:
00502 # IF[0] = 0.007
00503 #--------------------------------------------------
00504 
00505 # You will also see these information is saved
00506 # in orion_hc3n_stat.txt
00507 
00508 
00509 
00510 if tpdemo:
00511    # NEW TASK ####
00512    ###############
00513    # sdtpimaging #
00514    ###############
00515    print "###############\n 7. New task: sdtpimaging \n###############"
00516    desc="* Sdtpimaging is a new task to do data analysis of the total power\n" \
00517         "* raster scan data.\n"
00518    print desc
00519    default(sdtpimaging)
00520    # plot the data
00521    plotlevel=2
00522    antenna='0'
00523    sdfile='uid___X1e1_X3197_X1.ms'
00524    inp()
00525    desc="\n" \
00526         "* For this example, we do it in three steps to illustrate features,\n" \
00527         "* but it can be run the entire process in a single run of sdtpimaiging.\n" \
00528         "* First, do just plotting of the uncalibrated data leaving \n" \
00529         "* calmode and createimage to defaults (calmode='none', createimage=False).\n" \
00530         "* If there is CORRECTED_DATA column in the MS data, the calibrated data\n"\
00531         "* will be plotted instead.\n"
00532    print desc
00533    pause=raw_input('\n* Hit Return to continue ')
00534    print "\n* Run sdtpimaging...\n"
00535    sdtpimaging()
00536    print "*** sdtpimaging done***\n"
00537 
00538    calmode='baseline'
00539    masklist=[50] # use 50 data points from each end of scan for fitting
00540    plotlevel=1
00541    #plotlevel=2 to see progress of each fitting
00542    inp()
00543    desc="\n"\
00544         "* Now try to calibrate the data, currently only a simple baseline subtraction\n" \
00545         "* is available.\n"
00546    print desc
00547    pause=raw_input('\n* Hit Return to continue ')
00548    print "\n* Run sdtpimaging...\n"
00549    sdtpimaging()
00550    print "*** sdtpimaging done***\n"
00551    # Do imaging only
00552    calmode='none'
00553    createimage=True
00554    imagename='moon.im'
00555    imsize=[200,200]
00556    cell=[0.2] # in arcmin
00557    phasecenter='AZEL 187d54m22s 41d03m0s'
00558    ephemsrcname='moon' # can be omitted 
00559    inp()
00560    desc="\n" \
00561         "* Finally, to create an image, set createimage=True.\n" \
00562         "* The data contain the observation of the Moon so set\n"\
00563         "* ephemsrcname (the task automatically look up SOURCE table\n"\
00564         "* to check if it is ephemeris source or not, even you left\n"\
00565         "* this blank.\n"
00566    print desc
00567    pause=raw_input('\n* Hit Return to continue ')
00568    print "\n* Run sdtpimaging...\n"
00569    sdtpimaging()
00570    print "*** sdtpimaging done***\n"
00571    
00572    print "* Let's check the create image"
00573    pause=raw_input('\n* Hit Return to continue ')
00574    viewer(imagename)
00575 
00576    
00577   
00578 print "\n###############\n Tool changes \n###############"
00579 
00580 
00581 desc="\n" \
00582      "* Now ASAP scantable supports the storage of multiple rest\n" \
00583      "* frequencies. As the result, behaviors of setting/getting rest \n" \
00584      "* frequencies slightly changed\n" \
00585      "*\n" \
00586      "* For example, \n"\
00587      "s=sd.scantable('orion_pscal') \n" \
00588      "restfreqs=s.get_restfreqs() \n" 
00589 print desc
00590 
00591 s=sd.scantable('orion_pscal')
00592 restfreqs=s.get_restfreqs()
00593 desc="* Returned rest frequencies are in a dictionary, and only list\n" \
00594      "* one(s) current used.\n";
00595 print desc 
00596 print "restfreqs=", restfreqs
00597 
00598 pause=raw_input('\n* Hit Return to continue ')
00599 desc="\n* Set new rest frequencies for IF=0.\n" \
00600      "* let\n"\
00601      "newrestfreqs=[45490258000.0,45590258000.0]\n"\
00602      "*(Note: arbitary values used as an example)\n" \
00603      "sel=sd.selector()\n"\
00604      "sel.set_ifs(0)\n" \
00605      "s.set_selection(sel)\n"\
00606      "s.set_restfreqs(newrestfreqs)\n"
00607 print desc
00608 newrestfreqs=[45490258000.0,45590258000.0]
00609 sel=sd.selector()
00610 sel.set_ifs(0)
00611 s.set_selection(sel)
00612 s.set_restfreqs(newrestfreqs)
00613 
00614 desc="* Check the new values\n" \
00615      "s.get_restfreqs() \n"
00616 print desc
00617 newrestfs=s.get_restfreqs()
00618 print newrestfs
00619 pause=raw_input('\n* Hit Return to continue ')
00620 
00621 desc="\n* List all the rest frequencies currently set for all IFs\n" \
00622      "sel.reset()\n"\
00623      "s.set_selection(sel)\n"\
00624      "s.get_restfreqs()\n"
00625 print desc
00626 sel.reset()
00627 s.set_selection(sel)
00628 newrestfs=s.get_restfreqs()
00629 print newrestfs
00630 
00631 print "*** done get/set_restfreqs demo ***"
00632 
00633 print "**** End of the script ****"