#include <math.h>
#include "ObitTableCCUtil.h"
#include "ObitSkyModel.h"
#include "ObitFFT.h"
#include "ObitUVUtil.h"
#include "ObitImageUtil.h"
#include "ObitPBUtil.h"
#include "ObitMem.h"
Defines | |
| #define | HWIDTH 12 |
| Half width of gridded subtraction interpolation kernal. | |
Functions | |
| void | ObitSkyModelInit (gpointer in) |
| Private: Initialize newly instantiated object. | |
| void | ObitSkyModelClear (gpointer in) |
| Private: Deallocate members. | |
| gboolean | ObitSkyModelLoadPoint (ObitSkyModel *in, ObitUV *uvdata, ObitErr *err) |
| Private: Load point model, may be overridden in derived class. | |
| gboolean | ObitSkyModelLoadComps (ObitSkyModel *in, gint n, ObitUV *uvdata, ObitErr *err) |
| Private: Load Components model, may be overridden in derived class. | |
| ObitSkyModel * | newObitSkyModel (gchar *name) |
| Public: Default Constructor. | |
| gconstpointer | ObitSkyModelGetClass (void) |
| Public: ClassInfo pointer. | |
| ObitSkyModel * | ObitSkyModelCopy (ObitSkyModel *in, ObitSkyModel *out, ObitErr *err) |
| Public: Copy (deep) constructor. | |
| void | ObitSkyModelClone (ObitSkyModel *in, ObitSkyModel *out, ObitErr *err) |
| Public: Copy structure. | |
| ObitSkyModel * | ObitSkyModelCreate (gchar *name, ObitImageMosaic *mosaic) |
| Public: Create/initialize ObitSkyModel structures. | |
| void | ObitSkyModelInitMod (ObitSkyModel *in, ObitUV *uvdata, ObitErr *err) |
| Public: initialize ObitSkyModel structures. | |
| void | ObitSkyModelShutDownMod (ObitSkyModel *in, ObitUV *uvdata, ObitErr *err) |
| Public: shutdown ObitSkyModel processes. | |
| void | ObitSkyModelInitModel (ObitSkyModel *in, ObitErr *err) |
| Public: initialize model for pass in time through data. | |
| ObitIOCode | ObitSkyModelSubUV (ObitSkyModel *in, ObitUV *indata, ObitUV *outdata, ObitErr *err) |
| Public: Subtract model from an ObitUV. | |
| ObitIOCode | ObitSkyModelDivUV (ObitSkyModel *in, ObitUV *indata, ObitUV *outdata, ObitErr *err) |
| Public: Divide model into an ObitUV. | |
| gboolean | ObitSkyModelLoad (ObitSkyModel *in, gint image, ObitUV *uvdata, ObitErr *err) |
| Public: Load specified image and plane. | |
| void | ObitSkyModelFT (ObitSkyModel *in, gint field, ObitUV *uvdata, ObitErr *err) |
| Public: Calculate Fourier transform of model for current buffer in an ObitUV. | |
| gboolean | ObitSkyModelGridComps (ObitSkyModel *in, gint n, ObitUV *uvdata, ObitErr *err) |
| Public: Grid Components model, may be overridden in derived class. | |
| gboolean | ObitSkyModelLoadImage (ObitSkyModel *in, gint n, ObitUV *uvdata, ObitErr *err) |
| Public: Load/FT image model, may be overridden in derived class. | |
| void | ObitSkyModelFTDFT (ObitSkyModel *in, gint field, ObitUV *uvdata, ObitErr *err) |
| Public: FT by DFT, may be overridden in derived class. | |
| void | ObitSkyModelFTGrid (ObitSkyModel *in, gint field, ObitUV *uvdata, ObitErr *err) |
| Public: FT by Gridding, may be overridden in derived class. | |
| gfloat | ObitSkyModelSum (ObitSkyModel *in, ObitErr *err) |
| Public: Sum flux in Clean Model. | |
| void | ObitSkyModelCompressCC (ObitSkyModel *in, ObitErr *err) |
| Public: Compress CC Tables. | |
| void | ObitSkyModelGetInput (ObitSkyModel *in, ObitErr *err) |
| Public: Get input parameters from info. | |
| void | ObitSkyModelChose (ObitSkyModel *in, ObitUV *uvdata) |
| Public: Decide model method. | |
| void | ObitSkyModelSetSelect (ObitSkyModel *in, ObitUV *uvdata, ObitErr *err) |
| Public: Fill in data selection values. | |
| gboolean | ObitSkyModelsetPBChans (ObitSkyModel *in, ObitUV *uvdata, ObitErr *err) |
| Public: Decide next block of channels if doing PB correction. | |
| ObitTableCC * | ObitSkyModelgetPBCCTab (ObitSkyModel *in, ObitUV *uvdata, gint field, glong *inCCVer, glong *outCCver, glong *startCC, glong *endCC, gfloat range[2], ObitErr *err) |
| Public: return ObitTableCC with possible PB corrections. | |
| void | ObitSkyModelgetPBImage (ObitSkyModel *in, ObitUV *uvdata, gint field, ObitErr *err) |
| Public: fill in->plane with image and possibly PB corrected. | |
| gboolean | ObitSkyModelGridFTComps (ObitSkyModel *in, gint field, ObitUV *uvdata, ObitErr *err) |
| Public: Grid/FT components. | |
| void | ObitSkyModelLoadGridComps (ObitSkyModel *in, gint field, ObitUV *uvdata, gfloat gparm[3], glong *ncomp, ObitErr *err) |
| Public: Load Grid components. | |
| void | ObitSkyModelFTImage (ObitSkyModel *in, ObitFArray *inArray, ObitCArray *outArray) |
| Public: FT image array in in->plane. | |
| void | ObitSkyModelAddField (ObitSkyModel *in, ObitErr *err) |
| Public: Add field to mosaic. | |
| void | ObitSkyModelClassInit (void) |
| Public: Class initializer. | |
Variables | |
| glong | OverSample = 2 |
| Over sampling factor in uv plane. | |
This class represents sky models and their Fourier transforms and is derived from the Obit base class.
|
|
Half width of gridded subtraction interpolation kernal.
|
|
|
Public: Default Constructor. Initializes class if needed on first call.
|
|
||||||||||||
|
Public: Add field to mosaic.
|
|
||||||||||||
|
Public: Decide model method.
|
|
|
Public: Class initializer.
|
|
|
Private: Deallocate members. Does (recursive) deallocation of parent class members. For some reason this wasn't build into the GType class.
|
|
||||||||||||||||
|
Public: Copy structure.
|
|
||||||||||||
|
Public: Compress CC Tables.
|
|
||||||||||||||||
|
Public: Copy (deep) constructor.
|
|
||||||||||||
|
Public: Create/initialize ObitSkyModel structures.
|
|
||||||||||||||||||||
|
Public: Divide model into an ObitUV.
|
|
||||||||||||||||||||
|
Public: Calculate Fourier transform of model for current buffer in an ObitUV. If doDivide member is true then FT of model is divided into the data, If doReplace member is true then FT of model replaces the data, else, it is subtracted. If doFlip member is true the Fourier transform is multiplied by sqrt(-1) (for Stokes RL and LR) Processes all data selected.
|
|
||||||||||||||||||||
|
Public: FT by DFT, may be overridden in derived class. If doDivide member is true then FT of model is divided into the data, If doReplace member is true then FT of model replaces the data, else, it is subtracted. If doFlip member is true the Fourier transform is multiplied by sqrt(-1) (for Stokes RL and LR) After the AIPSish QXXPTS, QPTDIV and friends This function may be overridden in a derived class and should always be called by its function pointer.
|
|
||||||||||||||||||||
|
Public: FT by Gridding, may be overridden in derived class. If doDivide member is true then FT of model is divided into the data, If doReplace member is true then FT of model replaces the data, else, it is subtracted. This function may be overridden in a derived class and should always be called by its function pointer. Adapted from the AIPSish ALGSTB, QUVINT, QINTP Note: Unlike AIPS, FFTw produces nontransposed images with half the first (U) axis.
|
|
||||||||||||||||
|
Public: FT image array in in->plane.
|
|
|
Public: ClassInfo pointer.
|
|
||||||||||||
|
Public: Get input parameters from info.
|
|
||||||||||||||||||||||||||||||||||||||||
|
Public: return ObitTableCC with possible PB corrections. In the latter case, the table should be Zapped when use is finished. If not making relative Primary Beam correctsions then all selected, else the next block for which the primary beam correction varies by less than 1% at the edge of the FOV. If in->currentMode=OBIT_SkyModel_Mixed then the output table will be merged and only contain entries with abs. flux densities in the range range. If there are no components selected to process, the input table is always returned.
|
|
||||||||||||||||||||
|
Public: fill in->plane with image and possibly PB corrected.
|
|
||||||||||||||||||||
|
Public: Grid Components model, may be overridden in derived class. Multiplies by factor member. This function may be overridden in a derived class and should always be called by its function pointer. Due to the difference with the FFT ordering for half plane complex in AIPS and using FFTW, the method here is different. Components are added to a grid which is then FFTed.
|
|
||||||||||||||||||||
|
Public: Grid/FT components. Scaling of components and any tapering is applied. Grid is double size for increased accuracy. For convenience in interpolation, HWIDTH columns are added by copying from the positive half plane. Due to the difference with the FFT ordering for half plane complex in AIPS and using FFTW, the method here is different. Components are added to a grid which is then FFTed.
|
|
|
Private: Initialize newly instantiated object. Parent classes portions are (recursively) initialized first
|
|
||||||||||||||||
|
Public: initialize ObitSkyModel structures.
|
|
||||||||||||
|
Public: initialize model for pass in time through data.
|
|
||||||||||||||||||||
|
Public: Load specified image and plane.
|
|
||||||||||||||||||||
|
Private: Load Components model, may be overridden in derived class. Multiplies by factor member. This function may be overridden in a derived class and should always be called by its function pointer. Adapted from the AIPSish QNOT:VISDFT
|
|
||||||||||||||||||||||||||||
|
Public: Load Grid components. Grid is oversize for increased accuracy. Due to the difference with the FFT ordering for half plane complex in AIPS and using FFTW, the method here is different. Components are added to a grid which is then FFTed.
|
|
||||||||||||||||||||
|
Public: Load/FT image model, may be overridden in derived class. Multiplies by factor member. This function may be overridden in a derived class and should always be called by its function pointer.
|
|
||||||||||||||||
|
Private: Load point model, may be overridden in derived class. Multiplies by factor member. This function may be overridden in a derived class and should always be called by its function pointer. Adapted from the AIPSish QNOT:VISDFT Output is in member comps with a single row, the entries are
|
|
||||||||||||||||
|
Public: Decide next block of channels if doing PB correction. Works by modifying the followint ObitSkyModel members:
|
|
||||||||||||||||
|
Public: Fill in data selection values. Especially the polarization controls are difficult. All channel, IF, Stokes axis values are 1-rel. Does a number of consistency checks. Looks up the numbers of Clean components in each image. Recognize the following Stokes'
|
|
||||||||||||||||
|
Public: shutdown ObitSkyModel processes.
|
|
||||||||||||||||||||
|
Public: Subtract model from an ObitUV.
|
|
||||||||||||
|
Public: Sum flux in Clean Model.
|
|
|
Over sampling factor in uv plane.
|
1.3.9.1