|
User Documentation |
|||||||||
prev file | next file | ||||||||||
SUMMARY: fields | routine DETAILS: routine | ||||||||||
./contrib dcfixvframe.pro
dcfixvframe |
Adjust the frame_velocity value in a data container using the external CASA library.
The examples shows how this routine can be used to adjust the frame velocity in all scans in an existing sdfits file. This requires copying the data to a keep file and adjusting the frame velocity associated with each scan while doing that copy. Once copied, the new fits file can be used as a filein in GBTIDL (you should exit GBTIDL first and restart it - or open a different fileout before trying to open this file as filein). The frame_velocity values there should be accurate to < 5 m/s at the mid-point in time of all spectra in the file. These frame_velocities can then be used in conversion to classic AIPS for imaging or the vshift and shift procedures in GBTIDL can be use to accurately align and average these spectra.
This uses casaframevel with in turn uses a shared library built on a linux operating system. This is an interrum solution available only in Green Bank and Charlottesville GBTIDL installations while we develop a pure-IDL solution that can more easily be distributed.
Note that the first time this function is called there will be a small delay while the shared library is loaded. Subsequent calls will be substantially faster.
Contributed By: Bob Garwood, NRAO-CV
; dc already exists, adjust the frame_velocity dcfixvframe,dc ; adjust it to the GAL (galactic) frame dcfixvframe,dc,newframe='GAL' ; get and adjust several data containers dcs = getchunk(scan=12) dcfixvframe,dcs ; and save them back to the keep file putchunk,dcs ; remember to free up the memory used in dcs data_free, dcsThis example shows how to re-set the velocity in all of the data in a given sdfits file. It does it by getting the data for each scan and re-setting it in turn and then saving that data to a keep file. This assumes that all of the data for each scan can safely fit into memory. This would have to be done in a procedure because the for loop in this example spans more than one line.
filein,'original_raw_data.fits' fileout,'vfixed_raw_data.fits' allscans = get_scan_numbers(/unique) for i=0,(n_elements(allscans)-1) do begin sdata = getchunk(scan=allscans[i]) dcfixvframe, sdata putchunk, sdata data_free, sdata endfor
Parameters | |
dc |
The data container to use. The value of dc.frame_velocity is changed by calling this procedure. This may be a vector of data containers. |