User Tools

Site Tools


information_for_astronomers:user_guide:reduction_of_spectroscopic_measurements

This is an old revision of the document!


Reducing spectral line data

The raw data (in MBFITS format) are converted to CLASS format automatically. This is done using the method described in Winkel, Kraus, & Bach, Unbiased flux calibration methods for spectral-line radio observations, A&A 540, A140, 2012 (Section 3.4 and Section 4.5) - assuming a constant system temperature (Tsys) and flat calibration signal (Tcal). The latter is produced by a noise diode the power of which is in most cases directly fed into the waveguide within the receiver. Neglecting the frequency-dependence of Tsys and Tcal introduces a bias, especially for wide-band observations! (For more information see Winkel, Kraus, & Bach 2012 where we also show ways to do it better.)

The data files can be found immediately after an observation on observer5 in the directory /data/Class/class_YYYY_MM_DD.100m. On the other computers, like observer3, the data is updated about 15 mins later - the filename is the same.

Spectra in Class are always in units of Tcal! To obtain Kelvins or Jy/Beam you have to multiply with the temperature of the noise diode (Tcal). Approximate values for this can be found on our receiver website receiver website. However, it is highly recommended to do calibration measurements during your observation for better accuracy. Furthermore, the automatic Class pipeline does not account for atmospheric opacity, elevation-gain curve, and antenna efficiency. Information about these steps can be found in Kraus 2009 (calibration memo).

Of course it is also possible to use the raw data directly, should one wish to do so.

Using class

To reduce your (spectroscopic and pointing) data with class one should use the observer2 or observer5 computer. Everyone with an account in the mpifr network can login to this computer with his/her account. It is connected to the /homes server. It is also connected to /homes/astro/gag, so your gildas package of choice should work. It is also possible to use a local version of class, which is used to write the spectroscopic and pointing data. To enable this, change to the bash shell by typing bash and source the init file:

source /opt/ClassWriter/EffelsbergPipeline/init_classwriter.sh

afterward you can run

class

The Data from the Class pipeline is stored in /Class on observer5 and after 15 minutes appears also in /daten/Class.To open the file with Class use

las90> file in "/Class/class_2010_10_20.100m"
las90> find

For pointings you have to switch to continuum mode first:

las90> set type c
las90> find

One can switch back to line observations with:

las90> set type l
las90> find

To look for new data in the file:

las90> new

(Note: This doesn't always work. In such cases simply reopen the file, using file open.)

For more information on how to use Class have a look into the Gildas documentation (LINK)

Frequency switching

Note that in frequency switching mode the Class pipeline already performs the folding (since the fold command of Class produces incorrect results for some cases). Details can be found in the News section.

Reprocessing spectra using the Class pipeline

Sometimes it may be necessary to re-reduce the data with the Class pipeline. This can be done on the observer5 computer. The necessary software is installed in /opt/EffelsbergSpecPipeline. There is a bash script to set all the necessary paths. tcsh shell users should change to bash by typing bash (the teleskop and obs2 account are already bash accounts). Launch the following command:

source /opt/EffelsbergSpecPipeline/init_classwriter.sh

Now you should be ready to run the Offline Calibration pipeline. Type

OfflinePipeline

Now you are in an ipython interface to reduce the data. There are the following commands to reduce the data:

setFitsDir('/daten/Raw')

which sets the source directory for the rawdata. The program will look in this directory for the raw mbfits files.

setClassName('Filename','Directory')

This sets the output gildas, class file. If only:

setClassName('Filename')

is given, the named file is created in the current dictionary. Without this command a file name e.g. like class_2010_10_20.100m is created in the current directory. To write the files one has to know the scan number and must give the subscan number. Subscan numbers are 1 based. If the subscan is not in the file an error is plotted.

reduceSubscan(scannumber,subscannumber)

If you reduce the same scan twice, it is written twice to the class file with the same scan number. You can investigate the result with using_class_on_observer3_computer_in_effelsberg.

Before February 2011 the reference channel of the FFTS was wrong and has to be shifted by +0.5 channels if the spectrum was not flipped, otherwise -0.5 channels. This can be performed automatically using

fixFFTSRefChannel(shiftFFTSRefChannel=True)
flipArrayOrientation(reverseArrayOrientation=True)

The latter function flips the dataArrays for the following reduce operations, in case the IF flip needs to be applied (receiver dependent). You may ask local staff for help.

For projects involving lots of scan numbers, one may want to speed up things by using a small piece of python code such that one doesn't have to type in all scan numbers manually:

setClassName('myfile.100m')
setFitsDir('/daten/Raw')
scannums=range(6901,6930)
for scannr in scannums:
    info=getScanInfo(scannr)
    print scannr
    subscanList=info.getSubscanNumList()
    for subscan in subscanList:
        try:
            reduceSubscan(scannr,subscan)
        except:
            pass

(In python it is important to keep indentation!)

information_for_astronomers/user_guide/reduction_of_spectroscopic_measurements.1375302555.txt.gz · Last modified: 2013/10/07 17:25 (external edit)