#include "ObitData.h"
#include "ObitUVDesc.h"
#include "ObitUVSel.h"
#include "ObitTableList.h"
#include "ObitDef.h"
#include "ObitDataDef.h"
#include "ObitClassDef.h"
#include "ObitDataClassDef.h"
Go to the source code of this file.
Classes | |
| struct | ObitUV |
| ObitUV Class structure. More... | |
| struct | ObitUVClassInfo |
| ClassInfo Structure. More... | |
Defines | |
| #define | ObitUVUnref(in) ObitUnref (in) |
| Macro to unreference (and possibly destroy) an ObitUV returns a ObitUV*. | |
| #define | ObitUVRef(in) ObitRef (in) |
| Macro to reference (update reference count) an ObitUV. | |
| #define | ObitUVIsA(in) ObitIsA (in, ObitUVGetClass()) |
| Macro to determine if an object is the member of this or a derived class. | |
| #define | ObitUVSetFITS(in, nvis, disk, file, err) |
| Convenience Macro to define UV I/O to a FITS file. | |
| #define | ObitUVSetAIPS(in, nvis, disk, cno, user, err) |
| Convenience Macro to define UV I/O to an AIPS file. | |
| #define | ObitUVCpxDivide(in1, in2, out, work) |
| Divide one complex number by another. | |
| #define | ObitUVWtCpxDivide(in1, in2, out, work) |
| Divide one complex number with weight by another. | |
Typedefs | |
| typedef ObitUV *(* | newObitUVScratchFP )(ObitUV *in, ObitErr *err) |
| typedef void(* | ObitUVFullInstantiateFP )(ObitUV *in, gboolean exist, ObitErr *err) |
| typedef gboolean(* | ObitUVSameFP )(ObitUV *in1, ObitUV *in2, ObitErr *err) |
| typedef ObitIOCode(* | ObitUVReadFP )(ObitUV *in, gfloat *data, ObitErr *err) |
| typedef ObitIOCode(* | ObitUVReadSelectFP )(ObitUV *in, gfloat *data, ObitErr *err) |
| typedef ObitIOCode(* | ObitUVWriteFP )(ObitUV *in, gfloat *data, ObitErr *err) |
| typedef ObitIOCode(* | ObitUVRewritefp )(ObitUV *in, gfloat *data, ObitErr *err) |
| typedef ObitTable *(* | newObitUVTableFP )(ObitUV *in, ObitIOAccess access, gchar *tabType, glong *tabver, ObitErr *err) |
| typedef ObitIOCode(* | ObitUVZapTableFP )(ObitUV *in, gchar *tabType, glong tabVer, ObitErr *err) |
| typedef ObitIOCode(* | ObitUVCopyTablesFP )(ObitUV *in, ObitUV *out, gchar **exclude, gchar **include, ObitErr *err) |
| typedef ObitIOCode(* | ObitUVUpdateTablesFP )(ObitUV *in, ObitErr *err) |
| typedef glong(* | ObitUVChanSelFP )(ObitUV *in, gint32 *dim, gint *IChanSel, ObitErr *err) |
Functions | |
| void | ObitUVClassInit (void) |
| Public: Class initializer. | |
| ObitUV * | newObitUV (gchar *name) |
| Public: Constructor. | |
| ObitUV * | newObitUVScratch (ObitUV *in, ObitErr *err) |
| Public: Copy Constructor for scratch file. | |
| void | ObitUVFullInstantiate (ObitUV *in, gboolean exist, ObitErr *err) |
| Public: Fully instantiate. | |
| gconstpointer | ObitUVGetClass (void) |
| Public: ClassInfo pointer. | |
| ObitUV * | ObitUVZap (ObitUV *in, ObitErr *err) |
| Public: Delete underlying structures. | |
| void | ObitUVRename (ObitUV *in, ObitErr *err) |
| Public: Rename underlying structures. | |
| ObitUV * | ObitUVCopy (ObitUV *in, ObitUV *out, ObitErr *err) |
| Public: Copy (deep) constructor. | |
| void | ObitUVClone (ObitUV *in, ObitUV *out, ObitErr *err) |
| Public: Copy structure. | |
| gboolean | ObitUVSame (ObitUV *in1, ObitUV *in2, ObitErr *err) |
| Public: Do two UVs have the same underlying structures?. | |
| ObitIOCode | ObitUVOpen (ObitUV *in, ObitIOAccess access, ObitErr *err) |
| Public: Create ObitIO structures and open file. | |
| ObitIOCode | ObitUVClose (ObitUV *in, ObitErr *err) |
| Public: Close file and become inactive. | |
| ObitIOCode | ObitUVIOSet (ObitUV *in, ObitErr *err) |
| Public: Reset IO to start of file. | |
| ObitIOCode | ObitUVRead (ObitUV *in, gfloat *data, ObitErr *err) |
| Public: Read specified data. | |
| ObitIOCode | ObitUVReadSelect (ObitUV *in, gfloat *data, ObitErr *err) |
| Public: Read select, edit, calibrate specified data. | |
| ObitIOCode | ObitUVWrite (ObitUV *in, gfloat *data, ObitErr *err) |
| Public: Write specified data. | |
| ObitIOCode | ObitUVRewrite (ObitUV *in, gfloat *data, ObitErr *err) |
| Public: Rewrite specified data. | |
| ObitTable * | newObitUVTable (ObitUV *in, ObitIOAccess access, gchar *tabType, glong *tabver, ObitErr *err) |
| Public: Return an associated Table. | |
| ObitIOCode | ObitUVZapTable (ObitUV *in, gchar *tabType, glong tabVer, ObitErr *err) |
| Public: Destroy an associated Table. | |
| ObitIOCode | ObitUVCopyTables (ObitUV *in, ObitUV *out, gchar **exclude, gchar **include, ObitErr *err) |
| Public: Copy associated Tables. | |
| ObitIOCode | ObitUVUpdateTables (ObitUV *in, ObitErr *err) |
| Public: Update disk resident tables information. | |
| void | ObitUVGetFreq (ObitUV *in, ObitErr *err) |
| Public: Get Frequency arrays. | |
| ObitIOCode | ObitUVGetSubA (ObitUV *in, ObitErr *err) |
| Public: Obtains Subarray info for an ObitUV. | |
| void | ObitUVGetRADec (ObitUV *uvdata, gdouble *ra, gdouble *dec, ObitErr *err) |
| Public: Get source position. | |
| void | ObitUVGetSouInfo (ObitUV *uvdata, ObitErr *err) |
| Public: Get single source info. | |
| void | ObitUVWriteKeyword (ObitUV *in, gchar *name, ObitInfoType type, gint32 *dim, gconstpointer data, ObitErr *err) |
| Public: Write header keyword. | |
| void | ObitUVReadKeyword (ObitUV *in, gchar *name, ObitInfoType *type, gint32 *dim, gpointer data, ObitErr *err) |
| Public: Read header keyword. | |
| glong | ObitUVChanSel (ObitUV *in, gint32 *dim, gint *IChanSel, ObitErr *err) |
| Public: Channel selection in FG table. | |
This class is derived from the ObitData class. Related functions are in the ObitUVUtil , ObitUVEdit and ObitUVPeelUtil modules.
This class contains interoferometric data and allows access. An ObitUV is the front end to a persistent disk resident structure. There maybe (usually are) associated tables which either describe the data or contain calibration and/or editing information. These associated tables are listed in an ObitTableList member and the newObitUVTable function allows access to these tables. Both FITS (as Tables) and AIPS cataloged data are supported. The knowledge of underlying classes should be limited to private function #ObitUVSetupIO in ObitUV.c
A copy of a pointer to an ObitUV should always be made using the ObitUVRef function which updates the reference count in the object. Then whenever freeing an ObitUV or changing a pointer, the function ObitUVUnref will decrement the reference count and destroy the object when the reference count hits 0. There is no explicit destructor.
|
|
Value: G_STMT_START{ \
work[2] = in2[0]*in2[0] + in2[1]*in2[1]; \
if (work[2]==0.0) work[2] = 1; \
work[0] = in1[0]/work[2]; work[1] = in1[1]/work[2]; \
out[0] = work[0]*in2[0] + work[1]*in2[1]; \
out[1] = work[1]*in2[0] - work[0]*in2[1]; \
}G_STMT_END
|
|
|
Macro to determine if an object is the member of this or a derived class. Returns TRUE if a member, else FALSE in = object to reference |
|
|
Macro to reference (update reference count) an ObitUV. returns a ObitUV*. in = object to reference |
|
|
Value: G_STMT_START{ \
in->info->dim[0]=1; in->info->dim[1]=1; in->info->dim[2]=1; \
in->info->dim[3]=1; in->info->dim[4]=1; \
in->info->work[0] = OBIT_IO_AIPS; \
in->info->work[1]= nvis; \
ObitInfoListPut (in->info, "FileType", OBIT_int, \
in->info->dim, (gpointer)&in->info->work[0], err);\
ObitInfoListPut (in->info, "nVisPIO", OBIT_int, in->info->dim,\
(gpointer)&in->info->work[1], err); \
in->info->dim[0] = 1; \
ObitInfoListPut (in->info, "Disk", OBIT_int, \
in->info->dim, (gpointer)&disk, err); \
ObitInfoListPut (in->info, "DISK", OBIT_int, \
in->info->dim, (gpointer)&disk, err); \
ObitInfoListPut (in->info, "CNO", OBIT_int, \
in->info->dim, (gpointer)&cno, err); \
ObitInfoListPut (in->info, "User", OBIT_int, \
in->info->dim, (gpointer)&user, err); \
}G_STMT_END
Sets values on ObitInfoList on input object. |
|
|
Value: G_STMT_START{ \
in->info->dim[0]=1; in->info->dim[1]=1; in->info->dim[2]=1; \
in->info->dim[3]=1; in->info->dim[4]=1; \
in->info->work[0] = OBIT_IO_FITS; \
in->info->work[1] = nvis; in->info->work[2]= disk; \
ObitInfoListPut (in->info, "FileType", OBIT_int, \
in->info->dim, (gpointer)&in->info->work[0], err);\
ObitInfoListPut (in->info, "nVisPIO", OBIT_int, \
in->info->dim, (gpointer)&in->info->work[1], err);\
ObitInfoListPut (in->info, "IOBy", OBIT_int, in->info->dim, \
(gpointer)&in->info->work[1], err); \
in->info->dim[0] = 1; \
ObitInfoListPut (in->info, "Disk", OBIT_int, \
in->info->dim, (gpointer)&in->info->work[2], err); \
in->info->dim[0] = strlen(file); \
ObitInfoListPut (in->info, "FileName", OBIT_string, \
in->info->dim, (gpointer)file, err); \
}G_STMT_END
Sets values on ObitInfoList on input object. |
|
|
Macro to unreference (and possibly destroy) an ObitUV returns a ObitUV*. in = object to unreference |
|
|
Value: G_STMT_START{ \
if ((in1[2]<=0.0) || (in2[2]<=0.0)) { /* bad */ \
out[0] = out[1] = out[2] = 0.0; \
} else { /* do division */ \
work[2] = in2[0]*in2[0] + in2[1]*in2[1]; \
if (work[2]==0.0) {out[0] = out[1] = out[2] = 0.0; \
} else { /* OK */ \
work[0] = in1[0]/work[2]; work[1] = in1[1]/work[2];\
out[0] = work[0]*in2[0] + work[1]*in2[1]; \
out[1] = work[1]*in2[0] - work[0]*in2[1]; \
out[2] *= sqrt(work[2]); \
} \
} \
}G_STMT_END
Sets values on ObitInfoList on input object.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Public: Constructor. Initializes class if needed on first call.
|
|
||||||||||||
|
Public: Copy Constructor for scratch file. A scratch UV is more or less the same as a normal UV except that it is automatically deleted on the final unreference. The output will have the underlying files of the same type as in already allocated. The object is defined but the underlying structures are not created.
|
|
||||||||||||||||||||||||
|
Public: Return an associated Table. If such an object exists, a reference to it is returned, else a new object is created and entered in the ObitTableList.
|
|
||||||||||||||||||||
|
Public: Channel selection in FG table. If a flag table is currently selected it is copied to a new AIPS FG table on the uv data and channel selection added. If no flag table is selected then an new table is created. The new flagging entries includ all channels and IFs in the range specified in the UVSel values of BChan, EChan, BIF and EIF that are NOT specified in the IChanSel array
|
|
|
Public: Class initializer.
|
|
||||||||||||||||
|
Public: Copy structure.
|
|
||||||||||||
|
Public: Close file and become inactive.
|
|
||||||||||||||||
|
Public: Copy (deep) constructor. Copies are made of complex members including disk files; these will be copied applying whatever selection is associated with the input. Objects should be closed on input and will be closed on output. In order for the disk file structures to be copied, the output file must be sufficiently defined that it can be written; the copy does not apply any selection/calibration/translation. The copy will be attempted but no errors will be logged until both input and output have been successfully opened. If the contents of the uv data are copied, all associated tables are copied first. ObitInfoList and ObitThread members are only copied if the output object didn't previously exist. Parent class members are included but any derived class info is ignored. The file etc. info should have been stored in the ObitInfoList:
|
|
||||||||||||||||||||||||
|
Public: Copy associated Tables.
|
|
||||||||||||||||
|
Public: Fully instantiate. If object has previously been opened, as demonstrated by the existance of its myIO member, this operation is a no-op. Virtual - calls actual class member
|
|
|
Public: ClassInfo pointer.
|
|
||||||||||||
|
Public: Get Frequency arrays. These are the myDesc->freqArr and myDesc->fscale array members. Uses source dependent frequency info if available from in->info
|
|
||||||||||||||||||||
|
Public: Get source position. If single source file get from uvDesc, if multisource read from SU table Checks that only one source selected. Also fill in position like information in the descriptor for multi-source datasets
|
|
||||||||||||
|
Public: Get single source info. Also fill in position like information in the descriptor for multi-source datasets If source table is read, the source dependent IF offsets and bandwidth are written to the in->info object as
|
|
||||||||||||
|
Public: Obtains Subarray info for an ObitUV.
|
|
||||||||||||
|
Public: Reset IO to start of file.
|
|
||||||||||||||||
|
Public: Create ObitIO structures and open file. The image descriptor is read if OBIT_IO_ReadOnly, OBIT_IO_ReadCal or OBIT_IO_ReadWrite and written to disk if opened OBIT_IO_WriteOnly. If access is OBIT_IO_ReadCal then the calibration/selection/editing needed is initialized. See the ObitUVSel class for a description of the selection and calibration parameters. After the file has been opened the member, buffer is initialized for reading/storing the data unless member bufferSize is <0. The file etc. info should have been stored in the ObitInfoList:
|
|
||||||||||||||||
|
Public: Read specified data. The ObitUVDesc maintains the current location in the file. The number read will be mySel->nVisPIO (until the end of the selected range of visibilities in which case it will be smaller). The first visibility number after a read is myDesc->firstVis and the number of visibilities is myDesc->numVisBuff.
|
|
||||||||||||||||||||||||||||
|
Public: Read header keyword.
|
|
||||||||||||||||
|
Public: Read select, edit, calibrate specified data. The number read will be mySel->nVisPIO (until the end of the selected range of visibilities in which case it will be smaller). The first visibility number after a read is myDesc->firstVis and the number of visibilities is myDesc->numVisBuff.
|
|
||||||||||||
|
Public: Rename underlying structures. For FITS files:
|
|
||||||||||||||||
|
Public: Rewrite specified data. This routines assumes that the input UV is also being read and so the firstVis values in the UV descriptors on both in and its IO member are left unchanged. Otherwise a call to this routine is equivalent to ObitUVWrite The data in the buffer will be written starting at visibility myDesc->firstVis and the number written will be myDesc->numVisBuff which should not exceed mySel->nVisPIO if the internal buffer is used.
|
|
||||||||||||||||
|
Public: Do two UVs have the same underlying structures?. This test is done using values entered into the ObitInfoList in case the object has not yet been opened.
|
|
||||||||||||
|
Public: Update disk resident tables information.
|
|
||||||||||||||||
|
Public: Write specified data. The data in the buffer will be written starting at visibility myDesc->firstVis and the number written will be myDesc->numVisBuff which should not exceed mySel->nVisPIO if the internal buffer is used. myDesc->firstVis will be maintained and need not be changed for sequential writing. NB: If the same UV data is being both read and rewritten, use ObitUVRewrite instead of ObitUVWrite.
|
|
||||||||||||||||||||||||||||
|
Public: Write header keyword.
|
|
||||||||||||
|
Public: Delete underlying structures.
|
|
||||||||||||||||||||
|
Public: Destroy an associated Table. The table is removed from the ObitTableList but the external form may not be updated.
|
1.3.9.1