NRAO Home  >  Green Bank  |  Wiki Topic:    GB > Data > TWikiUsers > FrankGhigo > AstridScriptGuide > AstridExamples
   Changes | Index | Contents | Search | Statistics | Jump to Topic

Astrid Script example: K-band molecular line observing.

# K-band Line observing Example

Catalog("""
  # Some molecular objects
  veldef = vrad-lsr
  coordmode=J2000
  head=name     ra            dec       velocity   veldef    
  W3OH      02:27:04.10   +61:52:22.0     -46.4    vrad-lsr
  TMC1      04:41:45.9    +25:41:27.0       -5.8   vrad-lsr
  ORIONA    05:35:17.30   -05:23:28.0       None   vrad-lsr
  OMC_2     05:35:27.7    -05:10:41.5      +11.6   vrad-lsr
  NGC4258   12:18:57.5    +47:18:14.0       448    vopt-bar 
  SGRA      17:45:12.0    -28:43:18.0      +46     vrad-lsr
  SGRB2     17:47:20.4    -28:23:07.0      +61.6   vrad-lsr
""")


gc=Catalog("""
  # molecular objects in galactic coordinates
  coordmode=galactic
  head=name     glon           glat        velocity
  W3OH         133.95         +1.06          -46.4
  TMC1         174.39        -13.43          -5.8
  ORIONA       209.01        -19.38          None
  OMC_2        208.82        -19.24         +11.6
  NGC4258      138.3202       68.8422       448
  SGRA           0.06         +0.15         +46
  SGRB2          0.67         -0.04         +61.6
""")

# note that at this point all the info from the first catalog 
# has been replaced by this second catalog, because the names are the same.

print "Galactic Catalog"
print gc.keys()


# Configuration for K-band spectra
KConfig = """
receiver  = 'Rcvr18_22'
beam      = 'B12'
obstype   = 'Spectroscopy'
backend   = 'Spectrometer'
nwin      = 2
restfreq  = 22235.07, 22235.07
deltafreq = -90, 90
bandwidth = 200
swmode    = "tp"
swtype    = "none"
swper     = 1.0
swfreq    = 0,0
tint      = 10
vlow      = 0
vhigh     = 0
vframe    = "bary"
vdef      = "Optical"
noisecal  =  "lo"
pol       = "Circular"
nchan     = "medium"
spect.levels = 3
"""

# select object for spectra:
# obj = "NGC4258"
obj = "W3OH"

# try peak and autopeak
Slew(obj)

# AutoPeak will peak on a pointing source near the position of "obj"
AutoPeakFocus()

Break("IS Peak and focus ok?")

# The AutoPeak configures for continuum pointing, 
# so one must configure for spectroscopy after the AutoPeak

Configure(KConfig)

# Slew to selected object
print gc[obj]["Location"]
Slew(obj)
Balance()
Break("Check balance ok")

# Do 3 nods of 120 sec each.
for i in range(3) :
  Nod(obj, "1", "2", 120)

Break("Go on to next object?")

obj = "NGC4258"
print gc[obj]["Location"]
Slew(obj)
Balance()
Break("Check balance ok")

# Do 3 nods of 120 sec each.
for i in range(3) :
  Nod(obj, "1", "2", 120)

# if we had wanted to do OnOffs with an offset of 1 degree in galactic longitude:
for i in range(5) :
  OnOff(obj, Offset("Galactic", 1, 0), 60)



Astrid script example: Extragalactic HI

#   Extragalactic HI with the Spectrometer
#
c = Catalog(HI_strong)     # reference the standard catalog of strong HI galaxies
                           # standard catalogs live in /home/astro-util/astridcats/

# Configuration for HI line observing

HIConfig = """
receiver  = 'Rcvr1_2'
obstype   = 'Spectroscopy'
backend   = 'Spectrometer'
nwin      = 1
restfreq  = 1420.405
deltafreq = 0
bandwidth = 50.0
swmode    = "tp"
swtype    = "none"
swper     = 1.0
swfreq    = 0,0
tint      = 10
vlow      = 0
vhigh     = 0
vframe    = "bary"
vdef      = "Optical"
noisecal  =  "lo"
pol       = "Linear"
nchan     = "medium"
spect.levels = 9
"""

Configure(HIConfig)

# this list should be edited to pick galaxies that are up during the test.

# slist could include a mix of J2000 and B1950 positions
slist = ["N4713", "U8493", "U9013", "U11861"]


# offset for on/off
hoff = Offset("J2000", "00:04:00", 0, cosv=False)   # one degree offset

# offsets for point maps 3x3 18'x18'
hlen = Offset("J2000", 0.3, 0  )
vlen = Offset("J2000", 0,  0.3 )
hdel = Offset("J2000", 0.15, 0 )
vdel = Offset("J2000", 0,  0.15 )

refoff = Offset("J2000", 1.0, 1.0)

# move to each galaxy in slist, do and OnOff, then an OffOn, then two 3x3 point maps.

for ss in slist :
  print ss, c[ss]["location"], c[ss]["velocity"]
  Slew(ss)
  Balance()
  Break(" Is Balance ok?")

  OnOff( ss, hoff, 60)
  OffOn (ss, hoff, 60)

  print "PointMap"
  # do 3-sec scan on each point
  PointMap(ss, hlen,vlen,hdel,vdel, 3)

  # go to reference every 3 points
  PointMapWithReference(ss, hlen,vlen,hdel,vdel, refoff, 3, 3)



Astrid Script example: Continuum mapping at X-band

# Continuum Mapping example
#
# Access the standard calibrators
Catalog(fluxcal)

# Some objects we might want to map
c = Catalog("""
  coordmode=galactic
  head=name     glon           glat      velocity
  W3OH         133.95         +1.06         -46.4
  TMC1         174.39        -13.43         -5.8
  SGRB2          0.67         -0.04         +61.6
""")

# configuration for X-band continuum observing

Xconfig="""
receiver  = 'Rcvr8_10'
obstype   = 'Continuum'
backend   = 'DCR'
nwin      = 1
restfreq  = 9000
deltafreq = 0
bandwidth = 80
swmode    = "tp"
swtype    = "none"
swper     = 0.2
swfreq    = 0,0
tint      = 0.2
vlow      = 0.0
vhigh     = 0.0
vframe    = "topo"
vdef      = "Radio"
noisecal  =  "lo"
pol       = "Circular"
"""

# check pointing and focus with standard calibrator
src = "3C286"
Slew(src)
AutoPeakFocus()

Break(" is peak/focus ok?")

# Now move to object to be mapped
src = "TMC1"
Slew(src)
Configure(Xconfig)
Balance()
Break("Check that IF Rack is balanced.")

# Mapping parameters for 5x5 map, 1' spacing
rsize = Offset("J2000", 4.0/60,   0)
dsize = Offset("J2000", 0,   4.0/60)
vdelta = Offset("J2000", 0,   1.0/60)
hdelta = Offset("J2000", 1.0/60,  0 )


Break("Ready to start RALONGMAP?")

print "Mapping", src, c[src]["Location"]

# Do an RALONGMAP

RALongMap(src, rsize, dsize, vdelta, 15, "1")  # 15 seconds per stripe

# Break("re-start RALongMap with row 1-3")
# RALongMap(src, rsize, dsize, vdelta, 15, "1", start=1, stop=3)

Break("Ready to start DECLATMAP?")

# Do a DECLATMAP
Slew(src)
Balance()
Break("Check the balance")

DecLatMap(src, rsize, dsize, hdelta, 15, "1")

# Break("re-start DecLatMap with row 3")
# DecLatMap(src, rsize, dsize, hdelta, 15, "1", start=1, stop=3)


# Now do Maps with reference scan every 3 stripes.

refoff = Offset("J2000", -1, -1)  # offset is 1,1 degree from center of map

Slew(src)
Balance()
Break("Check that IF Rack is balanced.")
Comment("Doing RALongMapWithReference")
RALongMapWithReference(src, rsize, dsize, vdelta, refoff, 3, 15, "1")

Slew(src)
Balance()
Break("Check that IF Rack is balanced.")
Comment("Doing DecLatMapWithReference")
DecLatMapWithReference(src, rsize, dsize, hdelta, refoff, 3, 15, "1")


-- FrankGhigo - 18 Aug 2005

Topic AstridExamples . { Edit | Attach | Ref-By | Printable | Diffs | r1.3 | > | r1.2 | > | r1.1 | More }
Revision r1.3 - 19 Aug 2005 - 15:53 GMT - FrankGhigo
Parents: TWikiUsers > FrankGhigo > AstridScriptGuide
Content copyright © 1999-2007 by the contributing authors.
All material on this collaboration platform is the property of the contributing authors.