Main Page | Class List | Directories | File List | Class Members | File Members

ObitAIPSFortran.c File Reference

ObitAIPSFortran module function definitions. More...

#include "ObitAIPSFortran.h"
#include "ObitUV.h"
#include "ObitSystem.h"
#include "ObitImage.h"
#include "ObitTable.h"
#include "ObitImageUtil.h"
#include "ObitUVWeight.h"

Defines

#define Obit_traceback_end(err, me, name)
 Macro for traceback when an error in a called routine is encountered.

Functions

void obintx_ (const gchar *pgmName, const oint *lenPgmName, const oint *pgmNumber, const oint *AIPSuser, const oint *numberAIPSdisk, const gchar *AIPSdir, const oint *lenAIPSdir, const oint *numberFITSdisk, const gchar *FITSdir, const oint *lenFITSdir, const oint *F_TRUE, const oint *F_FALSE, oint *ierr)
 Public: Init Obit System.
void obshtx_ (void)
 Public: Shutdown Obit System.
void obuvcp_ (AIPSObj uvin, AIPSObj uvout, oint *ierr)
 Public: Copy a uvdata set potentially applying calibration, editing and selection,.
void obufwt_ (AIPSObj uv, AIPSObj image, oint *ierr)
 Public: Determine and apply uniform weighting corrections to uv data.
void obimuv_ (AIPSObj uvdata, oint *ifield, oint *nfield, AIPSObj *image, AIPSObj *beam, oint *dobeam, oint *docreate, oint *chan, oint *nchan, oint *imchan, oint *ierr)
 Public: Make beams and image from uv data.
void obiuvi_ (AIPSObj uvdata, gint *ifield, gint *nfield, AIPSObj *image, AIPSObj *beam, oint *dobeam, oint *docreate, oint *chan, oint *nchan, oint *imchan, oint *ierr)
 Fortran callable interface routine.


Detailed Description

ObitAIPSFortran module function definitions.


Define Documentation

#define Obit_traceback_end err,
me,
name   ) 
 

Value:

G_STMT_START{           \
     g_snprintf (err->buffer, OBITERRBUFSIZE,                   \
                "Traceback: routine %s:  object %s", me, name); \
     ObitErrPush (err, OBIT_Traceback, err->buffer);            \
     g_snprintf (err->buffer, OBITERRBUFSIZE,                   \
                 " Occured at file %s: line %d (%s)",           \
                  __FILE__, __LINE__, __PRETTY_FUNCTION__);     \
      ObitErrPush (err, OBIT_Traceback, err->buffer);           \
      ObitErrLog(err); /* log errors */                         \
      err = ObitErrUnref(err); /* free error stack */           \
      return;                                                   \
     }G_STMT_END
Macro for traceback when an error in a called routine is encountered.

Writes traceback info, writes error log, deleted obitErr and returns (no return value). This whould be used when returning from a fortran callable routine.

  • err = ObitErr structure to log to.
  • me = name of calling routine;
  • name = object name.


Function Documentation

void obimuv_ AIPSObj  uvdata,
oint ifield,
oint nfield,
AIPSObj image,
AIPSObj beam,
oint dobeam,
oint docreate,
oint chan,
oint nchan,
oint imchan,
oint ierr
 

Public: Make beams and image from uv data.

Makes beams or images from a uv data set. If NFIELD is <= 0 then a beam is made. If an image is to be made the normalization factor is obtained from the beam, if absent, the beam is remade. The input uvdata is assumed to have been calibrated, selected and had any uniform weighting corrections applied. Note: output IMAGE and BEAM objects should exist (full instantation) prior to call.

Two methods of Fourier transform are available: FFT and DFT. The FFT method supports multiple fields and allows images to be a different size from the beam. The DFT method does a full 3D DFT but supports only a single field and the beam must be the same size as the image. DFT NYI.

Parameters:
uvdata Name of uvdata object Members:
  • STOKES C*4 Desired Stokes parameter (I)
  • UVRANGE R(2) UV range in kilo wavelengths (all)
  • GUARDBND R(2) Fractional guardband around edge of uv grid (0)
ifield Field to image: 0 => all nfield (note 1 beam made on ifield = 1 when doBeam true (1) and DO3DIM false)
nfield Number of fields.
image Array of image AIPS object names MUST be previously instantiated. Members of image(1):
  • FTTYPE C*4 Fourier transform type 'FFT' or 'DFT'. ('FFT')
  • IMSIZE I(2,*) Image size per field (no default)
  • CELLSIZE R(2) Cellsize in arcseconds in X and Y (no default)
  • CHTYPE C*4 'LINE', or 'SUM ' for imaging ('SUM')
  • SHIFT R(2) Shift in arcsec (DFT imaging)
  • RASHIFT R(*) X position shift in arcseconds per field (0) FFT
  • DECSHIFT R(*) Y position shift in arcseconds per field (0) FFT
  • CENTERX I(*) Center X pixel position per field (std default)
  • CENTERY I(*) Center Y pixel position per field (std default)
  • CTYPX I X convolving function type (std default)
  • XPARM R(10) X convolving function parameters( std default)
  • CTYPY I Y convolving function type (std default)
  • YPARM R(10) Y convolving function parameters (std default)
  • DOZERO L IF true do Zero spacing flux (do if value given)
  • ZEROSP R(5) Zero spacing parameters (no zero spacing flux)
  • TFLUXG R Total flux to be subtracted from ZEROSP (0.0)
  • DOTAPER L If true taper (do if non zero taper given)
  • UVTAPER R(2) X and Y taper values (no taper)
beam Array of beam AIPS object names MUST be previously instantiated. Members:
  • IMSIZE I(2) Size of beam (no default)
  • SUMWTS R Sum of weights used for normalization (make beam) Set when beam gridded.
dobeam if True, make a beam else make an image
docreate if True, create beams and images underlying AIPS files
chan First channel in uv data to image
nchan Number of channels to "average" into the image
imchan First channel number in output image or beam
ierr return code, 0=>OK

void obintx_ const gchar *  pgmName,
const oint lenPgmName,
const oint pgmNumber,
const oint AIPSuser,
const oint numberAIPSdisk,
const gchar *  AIPSdir,
const oint lenAIPSdir,
const oint numberFITSdisk,
const gchar *  FITSdir,
const oint lenFITSdir,
const oint F_TRUE,
const oint F_FALSE,
oint ierr
 

Public: Init Obit System.

Initialize ObitSystem information This should be called ONCE before any Obit routines are called.

  • Initialize AIPS disk information if any
  • Initialize FITS disk information if any
  • Initialize Scratch file list.
    Parameters:
    pgmName Name of program (max 5 char if AIPS)
    lenPgmName Number of characters in pgmName
    pgmNumber Version number of program (e.g. POPS number).
    AIPSuser AIPS user number if using AIPS files
    numberAIPSdisk Number of AIPS disks If 0, no AIPS files.
    AIPSdir List of AIPS directory names as long HOLLERITH string
    lenAIPSdir Number of characters in each entry in AIPSdir
    numberFITSdisk Number of FITS disks If 0, no FITS files.
    FITSdir List of FITS directory names as long HOLLERITH string
    lenFITSdir Number of characters in each entry in FITSdir
    F_TRUE Value of Fortran TRUE (used in Fortran interface)
    F_FALSE Value of Fortran FALSE
    err Obit error stack for any error messages.

void obiuvi_ AIPSObj  uvdata,
gint *  ifield,
gint *  nfield,
AIPSObj image,
AIPSObj beam,
oint dobeam,
oint docreate,
oint chan,
oint nchan,
oint imchan,
oint ierr
 

Fortran callable interface routine.

Optionally does Ionospheric calibration for each field using IN table attached to uvdata. Makes beams or images from a uv data set. If nfield is <= 0 then a beam is made. If an image is to be made the normalization factor is obtained from the beam, if absent, the beam is remade. The input uvdata is assumed to have been calibrated, selected and had any uniform weighting corrections applied. Note: output image and beam objects should exist (full instantation) prior to call.

Two methods of Fourier transform are available: FFT and DFT. The FFT method supports multiple fields and allows images to be a different size from the beam. The DFT method does a full 3D DFT but supports only a single field and the beam must be the same size as the image. DFT NYI.

Parameters:
uvdata Name of uvdata object Members:
  • STOKES C*4 Desired Stokes parameter (I)
  • UVRANGE R(2) UV range in kilo wavelengths (all)
  • GUARDBND R(2) Fractional guardband areound edge of uv grid (0)
  • DOIONS L If present and true then do ionospheric
  • calibration using NI table IONTAB.
  • If DOINONS then the following:
  • IONTAB C*32 Name of IoNosphere table
  • UVINSCR C*32 Name of a scratch uv data file.
  • NSUBARR I Number of subarrays in data to image
ifield Field to image: 0 => all nfield (note 1 beam made on ifield = 1 when doBeam true (1) and DO3DIM false)
nfield Number of fields.
image Array of image AIPS object names Members of image(1):
  • FTTYPE C*4 Fourier transform type 'FFT' or 'DFT'. ('FFT')
  • IMSIZE I(2,*) Image size per field (no default)
  • CELLSIZE R(2) Cellsize in arcseconds in X and Y (no default)
  • CHTYPE C*4 'LINE', or 'SUM ' for imaging ('SUM')
  • SHIFT R(2) Shift in arcsec (DFT imaging)
  • RASHIFT R(*) X position shift in arcseconds per field (0) FFT
  • DECSHIFT R(*) Y position shift in arcseconds per field (0) FFT
  • CENTERX I(*) Center X pixel position per field (std default)
  • CENTERY I(*) Center Y pixel position per field (std default)
  • CTYPX I X convolving function type (std default)
  • XPARM R(10) X convolving function parameters( std default)
  • CTYPY I Y convolving function type (std default)
  • YPARM R(10) Y convolving function parameters (std default)
  • DOZERO L IF true do Zero spacing flux (do if value given)
  • ZEROSP R(5) Zero spacing parameters (no zero spacing flux)
  • TFLUXG R Total flux to be subtracted from ZEROSP (0.0)
  • DOTAPER L If true taper (do if non zero taper given)
  • UVTAPER R(2) X and Y taper values (no taper)
beam Array of beam AIPS object names Members:
  • IMSIZE I(2) Size of beam (no default)
  • SUMWTS R Sum of weights used for normalization (make beam) Set when beam gridded.
dobeam if True, make a beam else make an image
docreate if True, create beams and images underlying AIPS files
chan First channel in uv data to image
nchan Number of channels to "average" into the image
imchan First channel number in output image or beam
ierr return code, 0=>OK

void obshtx_ void   ) 
 

Public: Shutdown Obit System.

Shutdown ObitSystem information This should be called ONCE after all Obit routines are called. Any remaining scratch objects/files are deleted.

void obufwt_ AIPSObj  uv,
AIPSObj  image,
oint ierr
 

Public: Determine and apply uniform weighting corrections to uv data.

Determine and apply uniform weighting corrections to uv data Note: this routine weights by the sum of the weights in a weighting box rather than the number of counts.

Parameters:
uv Name of uvdata, Members
  • CHINC I Channel increment (1)
  • MAXBLINE R Maximum baseline length
image Name of image defining grid size with members
  • CHTYPE C*4 'LINE' or 'SUM ' ('SUM ')
  • UVWTFN C*2 Uniform weighting option ('UN')
  • UVTAPER R(2) U, V taper
  • UVBOX I Uniform weighting box (0)
  • UVBXFN I box function type (1) 1=pillbox, 2=linear, 3=exponential, 4=Gaussian
  • IMSIZE I(2) Number of pixels in X,Y direction. no default
  • CELLSIZE R(2) Cellspacing in x,y in arcsec no default.
  • NCHAV I Number of channels to be averaged.
  • ROBUST R Brigg's weighting factor, -5->Uniform, 5->Natural (0)
ierr return code, 0=>OK

void obuvcp_ AIPSObj  uvin,
AIPSObj  uvout,
oint ierr
 

Public: Copy a uvdata set potentially applying calibration, editing and selection,.

Copies uvdata from one object to another optionally applying calibration editing and selection/translation.

Parameters:
uvin Name of input uvdata, Members
  • UMAX R Maximum acceptable U in wavelengths (default all)
  • VMAX R Maximum acceptable V in wavelengths (default all)
  • SOURCS C(30)*16 Names of up to 30 sources, *=>all
  • First character of name '-' => all except
  • those specified.
  • SELQUA I Qualifier wanted (-1 => all)
  • SELCOD C*4 Cal code (' ')
  • TIMRNG R(8) Start day, hour, min, sec, end day, hour,
  • min, sec. 0's => all
  • UVRNG R(2) Minimum and maximum baseline lengths in
  • 1000's wavelengths. 0's => all
  • STOKES C*4 Stokes types wanted.
  • 'I','Q','U','V','R','L','IQU','IQUV'
  • ' '=> Leave data in same form as in input.
  • BCHAN I First channel number selected, 1 rel. to first
  • channel in data base. 0 => all
  • ECHAN I Last channel selected. 0=>all
  • BIF I First IF number selected, 1 rel. to first
  • IF in data base. 0 => all
  • EIF I Last IF selected. 0=>all
  • DOCAL I If >0 apply calibration, else not.
  • DOPOL I If >0 then correct for feed polarization
  • based on antenna file info.
  • DOACOR L True if autocorrelations wanted (false)
  • DOXCOR L True if cross-correlations wanted (true)
  • DOWTCL L True if weight calibration wanted.
  • DOFQSL L True if FREQSEL random parm present (false)
  • FRQSEL I Default FQ table entry to select (-1)
  • SELBAN R Bandwidth (Hz) to select (-1.0)
  • SELFRQ R Frequency (Hz) to select (-1.0)
  • DOBAND I >0 if bandpass calibration. (-1)
  • DOSMTH L True if smoothing requested. (false)
  • SMOOTH R(3) Smoothing parameters (0.0s)
  • DXTIME R Integration time (days). Used when applying
  • delay corrections to correct for delay error.
  • ANTENS I(50) List of antennas selected, 0=>all,
  • any negative => all except those specified
  • SUBARR I Subarray desired, 0=>all
  • FGVER I FLAG file version number, if < 0 then
  • NO flagging is applied. 0 => use highest
  • numbered table.
  • CLUSE I Cal (CL or SN) file version number to apply.
  • BLVER I BL Table to apply .le. 0 => none
  • BPVER I BP table to apply .le. 0 => none
uvout Name of output uvdata
ierr return code, 0=>OK


Generated on Fri Aug 31 22:13:04 2007 for Obit by  doxygen 1.3.9.1