Examples of APECS Macros for APEX-2A
On this page we show a few example APECS macros. Note the separation into a setup macro and an observing macro which has some practical reason: After the system is set up and knows about the frequency and the source (and its velocity), the astronomer or operator on duty has to tune the receiver. Only after that, an observing macro can be run to perform the actual observations.
Example 1: Long time integration on one source
For this type of project, no source catalog is necessary, since complete source information can be given in the setup macro.
Setup:
# Setup of front- and backends
frontends(['het345'])
het345.backends (['ffts1'])
ffts1_group (1,bandwidth=1000,numchan=8192)
# No catalogs necessary, because all source and line information is given in the following commands
# Setup of the source
source(name='R-And',x=('00:24:01.939','hms'),y=('38:34:37.12','dms'),system='eq',epoch=2000.0,velocity=-15.0,frame='LSR')
# Setup of the frequency. Optional frequencies can be commented out in the macro.
het345.line(name='CO(3-2)', frequency=345.795990, sideband='USB', unit='GHz')
# het345.line(name='13CO(3-2)', frequency=330.587960, sideband='LSB', unit='GHz')
# het345.line(name='C18O(3-2)', frequency=329.330546, sideband='LSB', unit='GHz')
Observing:
# Setup of reference position and offsets
use_ref('on')
reference(x=120.0,y=0.0,time=0.0,on2off=1,unit='arcsec',mode='rel',system='HO',epoch=2000.0)
offset(0,0)
# Do the actual observation
# Loop (10 times, about 2.5hrs incl. dead times) over 1 calibration and 15x On-Off
for i in xrange(10):
calibrate('cold')
repeat(15)
on(20)
repeat(1)
Example 2: Search for 1 molecular line in several sources
Setup:
The following macro contains just one of the sources, since a source change
requires interactive observing anyway because of necessary receiver tuning
and a pointing check. The other sources could be added to this macro, but
commented out, or one macro for each source could be provided.
In contrast to the case above, we assume that we need only a lower spectral
resolution, thus the FFTS is set up with only 4096 channels.
# Setup of front- and backends
frontends(['het345'])
het345.backends (['ffts1'])
ffts1_group (1,bandwidth=1000,numchan=4096)
# Selecting the source catalog
sourcecats(['project_e45.cat'])
# Setup of the frequency.
het345.line(name='H2O(10-9)', frequency=321.22564, sideband='LSB', unit='GHz')
# Selecting a source from the catalog
source('R-And')
Observing:
The observing procedure for this project is more or less identical to the one shown above.
Example 3: Mapping an area around the source position
Setup:
The following macro is very similar to case 1.
# Setup of front- and backends
frontends(['het345'])
het345.backends (['ffts1'])
ffts1_group (1,bandwidth=1000,numchan=8192)
# No catalogs necessary, because all source and line information is given in the following commands
# Setup of the source
source(name='R-And',x=('00:24:01.939','hms'),y=('38:34:37.12','dms'),system='eq',epoch=2000.0,velocity=-15.0,frame='LSR')
# Setup of the frequency.
het345.line(name='CO(3-2)', frequency=345.795990, sideband='USB', unit='GHz')
Observing:
Let's assume we want to make a 9x9 raster map around the catalog position, with a grid spacing of 8". We split this in 3 rasters of size 9x3 to allow a calibration in between. In addition, we observe only one OFF position for each 3 ON spectra.
# Setup of reference position and offsets
use_ref('on')
reference(x=600.0,y=0.0,time=0.0,on2off=3,unit='arcsec',mode='rel',system='HO',epoch=2000.0)
# First 9x3 raster: around the center
offset(0,0)
calibrate('cold')
raster(xlen=64.,xstep=8.,ylen=16.,ystep=8.,time=20.,direction='x')
# Second raster: y-offsets from -40" to -20"
offset(0,-30)
calibrate('cold')
raster(xlen=64.,xstep=8.,ylen=16.,ystep=8.,time=20.,direction='x')
# Third raster, in the north...
offset(0,30)
calibrate('cold')
raster(xlen=64.,xstep=8.,ylen=16.,ystep=8.,time=20.,direction='x')



