# znod2N # # Double-beamswitching for differencing between two sources # # with setup from config-totpwr and the ability to loop (nrepc) # 2011.11.10 AH # # from zpec08-obs-fastnod2-8C73 # # Astrid script for Zpectrometer observations of source pairs in # projects 5A40, 5C35, 6C33, and 8C73. # # 2008.11.01 AB Adapted from zpec07-obs-fastnod-duo. # # INSTRUCTIONS: # (1) Comment *out* the previous source pair observed and comment # *in* the next source pair you want to observe in the section # that defines "zpectsource1" and "zpectsource2". # (2) Change zpNumNodSR to the desired value (default is 24, which # delivers 2 x 4 min scans; 18 and 12 deliver 2 x 3 min and # 2 x 2 min, which may be good for squeezing in observations # at end of shift). # # (3) To pair a new source with a (truly) blank sky position, define # a SKYXXX "source" that is ~5' away from the source of interest. Catalog(""" coordmode=J2000 3C48 01:37:41.3 33:09:35 SKY3C48 01:37:41.3 33:04:35 3C138 05:21:09.9 16:38:22 SKY3C138 05:21:09.9 16:33:22 3C147 05:42:36.1 49:51:07 SKY3C147 05:42:36.1 49:46:07 3C286 13:31:08.3 30:30:33 SKY3C286 13:31:08.3 30:35:33 Target1 15:27:26.5 +37:57:49 Target2 15:33:30.1 +37:44:41 coordmode=B1950 # Sources in B1950 coordinates below """) #catp = Catalog("/home/astro-util/astridcats/kaband_pointing.cat") # *** Define target sources (always in pairs): # 3C48 #zpectsource1="3C48" #zpectsource2="SKY3C48" # 3C138 #zpectsource1="3C138" #zpectsource2="SKY3C138" # 3C147 #zpectsource1="3C147" #zpectsource2="SKY3C147" # 3C286 #zpectsource1='3C286' #zpectsource2='SKY3C286' # Pr1 -- demo pair zpectsource1="Target1" zpectsource2="Target2" # Number of pair repeats (1 is typical for test, 7 for observing) nrepc = 1 # *** Set up parameters of subreflector nodding: use 24. # Set integration time here!! # ... through number of subreflector nod cycles (modified below), # ... for integration time in units of zpNodCycSR seconds: # zpNumNodSR=6 -> 1 minute with zpNodCycSR = 10 # zpNumNodSR=24 -> 4 minutes with zpNodCycSR = 10 zpNumNodSR=24 ## DO NOT MODIFY BELOW # # ... duration of a subreflector nod cycle, in seconds (can be modified): zpNodCycSR=10.0 # # ... number of Zpectrometer dumps per nod cycle (please don't modify): zpDumpPerNod=14 # # ... duration of a subreflector move, in seconds (do NOT modify): MoveTimeSR=0.5 # # ... duration of a Zpectrometer readout, in seconds (do NOT modify): zpReadTime=0.01152 # # ... number of Zpectrometer readouts per dump (do NOT modify): zpReadPerDump=round((zpNodCycSR/zpReadTime)/zpDumpPerNod,0) # # ... total number of Zpectrometer dumps (do NOT modify): zpRepeat=zpNumNodSR*zpDumpPerNod # # ... dump time, in seconds (do NOT modify): zpExposure=zpReadPerDump*zpReadTime # # ... skew of Zpectrometer dump, in seconds (do NOT modify): zpWait=round(1000.0*(zpExposure - (zpExposure-MoveTimeSR)/2.0),0) SetValues("Zpectrometer",{"exposure":zpExposure}) SetValues("Zpectrometer",{"repeat":zpRepeat}) SetValues("Zpectrometer",{"wait":zpWait}) # Editied and added from config-totpwr 11/09/11 AH # *** Comments from fall 2006: # *** The only paramaters which matter are # *** receiver, beam, vframe, and vdef. # *** The restf requency should be left at 36000. # *** Combined with the IF center, this gives # *** LO1A commanded = 14.6167. Configure(""" receiver = 'Rcvr26_40' beam = 'B1' obstype = 'Continuum' backend = 'DCR' nwin = 1 restfreq = 36000 deltafreq = 0 bandwidth = 800 swmode = "sp" swtype = "bsw" swper = 0.2 swfreq = 0.0, 0.0 tint = 10 vlow = 0 vhigh = 0 vframe = "topo" vdef = "Radio" noisecal = "L" pol = "Circular" """) SetValues('Rcvr26_40', {'diff1_bypassHybrid': 'swOn', 'sum1_bypassHybrid': 'swOn', 'diff1_toZpectrometer': 'swOn', 'sum1_toZpectrometer': 'swOn'}) SetValues('Rcvr26_40',{'calState':'ctlZpectrometer','phaseModState':'ctlZpectrometer'}) SetValues('Rcvr26_40',{'sigRefd1PhaseSwitch':'swOn','sigRefs1PhaseSwitch':'swOn'}) SetValues('Rcvr26_40',{'state':'prepare'}) SetValues('LO1',{'ifCenterFreq':7850,'S8':4}) SetValues('LO1',{'loConfig':'TrackA_BNotUsed','testToneFreq':12000}) SetValues('LO1',{'testTonePowerLevel':-110}) SetValues('LO1',{'state':'prepare'}) SetValues("ScanCoordinator", {"subsystemSelect,Zpectrometer": 1, "subsystemSelect,DCR": 0}) SetValues("ScanCoordinator", {"subsystemSelect,IFRack": 0, "subsystemSelect,SwitchingSignalSelector": 0}) SetValues("ScanCoordinator", {"state": "prepare"}) SetValues("Zpectrometer",{"state":"on"}) # *** Uncomment the next line if you want to produce raw tpr files: #SetValues("Zpectrometer",{"genericKeyword,key":"diagout", "genericKeyword,value":"true"}) # *** Uncomment the next line if you do NOT want to produce raw tpr files: SetValues("Zpectrometer",{"genericKeyword,key":"diagout", "genericKeyword,value":"false"}) SetValues("Zpectrometer",{"state":"prepare"}) # end addition of 11/9/11 # *** Execute the fast subreflector nodding command. # *** MR12 means refers beam offsets to midpoint between beams 1 & 2. # *** SubNod argument should be half of full subreflector nod cycle. #always reconfigure after pointing (update nrepeat depending on time availability) for i in range(nrepc): Track(zpectsource1,None,zpNodCycSR*zpNumNodSR,"MR12",submotion=SubNod(zpNodCycSR/2.0)) Track(zpectsource2,None,zpNodCycSR*zpNumNodSR,"MR12",submotion=SubNod(zpNodCycSR/2.0))