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

ObitDConClean.c File Reference

ObitDConClean class function definitions. More...

#include "ObitDConClean.h"
#include "ObitMem.h"
#include "ObitFFT.h"
#include "ObitTableCCUtil.h"
#include "ObitImageUtil.h"

Functions

void ObitDConCleanInit (gpointer in)
 Private: Deallocate members.
void ObitDConCleanClear (gpointer in)
 Private: Deallocate members.
void ObitDConCleanDecide (ObitDConClean *in, ObitErr *err)
 Private: Set Beam patch, min.
ObitDConCleannewObitDConClean (gchar *name)
 Public: Default Constructor.
gconstpointer ObitDConCleanGetClass (void)
 Public: ClassInfo pointer.
ObitDConCleanObitDConCleanCopy (ObitDConClean *in, ObitDConClean *out, ObitErr *err)
 Public: Copy (deep) constructor.
void ObitDConCleanClone (ObitDConClean *in, ObitDConClean *out, ObitErr *err)
 Public: Copy structure.
ObitDConCleanObitDConCleanCreate (gchar *name, ObitImageMosaic *mosaic, ObitErr *err)
 Public: Create/initialize ObitDConClean structures.
void ObitDConCleanDeconvolve (ObitDCon *inn, ObitErr *err)
 Public: Do deconvolution.
void ObitDConCleanGetParms (ObitDCon *inn, ObitErr *err)
 Public: Get parameters.
void ObitDConCleanDefWindow (ObitDConClean *in, ObitErr *err)
 Public: Set Default CLEAN windows.
void ObitDConCleanPixelStats (ObitDConClean *in, ObitErr *err)
 Public: Prepare for minor cycle.
void ObitDConCleanImageStats (ObitDConClean *in, glong field, ObitErr *err)
 Public: Determine image statistics.
gboolean ObitDConCleanSelect (ObitDConClean *in, ObitErr *err)
 Public:Select components to be subtracted .
void ObitDConCleanSub (ObitDConClean *in, ObitErr *err)
 Public: Subtract components and generate new residual image(s).
void ObitDConCleanRestore (ObitDConClean *in, ObitErr *err)
 Public: Restore subtracted components.
void ObitDConCleanFlatten (ObitDConClean *in, ObitErr *err)
 Public: Flatten multiple facets to one.
void ObitDConCleanXRestore (ObitDConClean *in, ObitErr *err)
 Public: Restore subtracted components from other fields.
void ObitDConCleanAutoWindow (ObitDConClean *in, glong field, ObitErr *err)
 Public: Automatically add window.
void ObitDConCleanClassInit (void)
 Public: Class initializer.


Detailed Description

ObitDConClean class function definitions.

Virtual CLEAN base class. This class is derived from the ObitDCon class.


Function Documentation

ObitDConClean* newObitDConClean gchar *  name  ) 
 

Public: Default Constructor.

Virtual routine - should never be called Initializes class if needed on first call.

Parameters:
name An optional name for the object.
Returns:
the new object.

void ObitDConCleanAutoWindow ObitDConClean in,
glong  field,
ObitErr err
 

Public: Automatically add window.

Each cycle the residuals inside the outer window are searched to the maximum value; if the peak is outside the inner window and > 5 sigma, a new round box is added to the window. Cleaning in each cycle will stop when the peak residual drops to the level of the highest value outside the CLEAN window.

Parameters:
in The object to restore
field Field number (1-rel) in ImageMosaic
err Obit error stack object.

void ObitDConCleanClassInit void   ) 
 

Public: Class initializer.

void ObitDConCleanClear gpointer  inn  ) 
 

Private: Deallocate members.

Does (recursive) deallocation of parent class members.

Parameters:
inn Pointer to the object to deallocate. Actually it should be an ObitDConClean* cast to an Obit*.

void ObitDConCleanClone ObitDConClean in,
ObitDConClean out,
ObitErr err
 

Public: Copy structure.

Parameters:
in The object to copy
out An existing object pointer for output, must be defined.
err Obit error stack object.

ObitDConClean* ObitDConCleanCopy ObitDConClean in,
ObitDConClean out,
ObitErr err
 

Public: Copy (deep) constructor.

Parameters:
in The object to copy
out An existing object pointer for output or NULL if none exists.
err Obit error stack object.
Returns:
pointer to the new object.

ObitDConClean* ObitDConCleanCreate gchar *  name,
ObitImageMosaic mosaic,
ObitErr err
 

Public: Create/initialize ObitDConClean structures.

Parameters:
name An optional name for the object.
mosaic from which to create object
err Obit error stack object.
Returns:
the new object.

void ObitDConCleanDecide ObitDConClean in,
ObitErr err
 

Private: Set Beam patch, min.

Output members are beamPatchSize, minFluxLoad and depend on the members currentField, window, BeamHist and PixelHist being up to date. If the histogram is too coarse (too many in top bin) then numberSkip is set to decimate the residuals so that they will fit;

Parameters:
in The object to deconvolve
err Obit error stack object.

void ObitDConCleanDeconvolve ObitDCon inn,
ObitErr err
 

Public: Do deconvolution.

CLEAN control parameters are in the ObitInfoList member:

  • "Niter" OBIT_int scalar = Maximum number of CLEAN iterations
  • "maxPixel" OBIT_int scalar = Maximum number of residuals [def 20000]
  • "minPatch" OBIT_int scalar = Minimum beam patch in pixels [def 50]
  • "BMAJ" OBIT_float scalar = Restoring beam major axis (deg)
  • "BMIN" OBIT_float scalar = Restoring beam minor axis (deg)
  • "BPA" OBIT_float scalar = Restoring beam position angle (deg)
  • "Beam" = OBIT_float [3] = (BMAJ, BMIN, BPA) alternate form (",", deg)
  • "CCVer" OBIT_int array = CLEAN table version for all fields
  • "Gain" OBIT_float array = CLEAN loop gain per field
  • "minFlux" OBIT_float array = Minimum flux density (Jy) per field
  • "Factor" OBIT_float array = CLEAN depth factor per field
  • "Plane" OBIT_int array = Plane being processed, 1-rel indices of axes 3-?
    Parameters:
    in The object to deconvolve
    err Obit error stack object.

void ObitDConCleanDefWindow ObitDConClean in,
ObitErr err
 

Public: Set Default CLEAN windows.

If mosaic member Radius>0 then make round boxes on Fly's eye field with this radius, else use rectangular box including all but outer 5 pixels On outlier fields, use rectangular box of width OutlierSize. If CLEANBox defined in in->info then its contents are used for field 1. Sets outer windows the same as inner windows except for field 1 when CLEANBox set. If autoWindow, no default inner windows are set. Assumes all images in mosaic have descriptors defined. Any previously existing Windows will be lost.

Parameters:
in The CLEAN object, info may have CLEAN Boxes:
  • "CLEANBox" OBIT_int [4,?] = Array of Clean boxes for field 1 Any entries with first element=0 are ignored.
err Obit error stack object.

void ObitDConCleanFlatten ObitDConClean in,
ObitErr err
 

Public: Flatten multiple facets to one.

Parameters:
in The object to deconvolve
err Obit error stack object.

gconstpointer ObitDConCleanGetClass void   ) 
 

Public: ClassInfo pointer.

Returns:
pointer to the class structure.

void ObitDConCleanGetParms ObitDCon inn,
ObitErr err
 

Public: Get parameters.

  • "Niter" OBIT_int scalar = Maximum number of CLEAN iterations
  • "maxPixel" OBIT_int scalar = Maximum number of residuals [def 20000]
  • "minPatch" OBIT_int scalar = Minimum beam patch in pixels [def 100]
  • "BMAJ" OBIT_float scalar = Restoring beam major axis (deg)
  • "BMIN" OBIT_float scalar = Restoring beam minor axis (deg)
  • "BPA" OBIT_float scalar = Restoring beam position angle (deg)
  • "Beam" = OBIT_float [3] = (BMAJ, BMIN, BPA) alternate form
  • "CCVer" OBIT_int array = CLEAN table version for all fields
  • "Gain" OBIT_float array = CLEAN loop gain per field If only one given it is used for all.
  • "minFlux" OBIT_float array = Minimum flux density (Jy) per field If only one given it is used for all.
  • "Factor" OBIT_float array = CLEAN depth factor per field
  • "autoWindow" OBIT_boolean scalar = True if autoWindow feature wanted. From Parent classes:
  • "Plane" OBIT_int array = Plane being processed, 1-rel indices of axes 3-? def (1,1,1,1,1)
    Parameters:
    in The CLEAN object as base class
    err Obit error stack object.

void ObitDConCleanImageStats ObitDConClean in,
glong  field,
ObitErr err
 

Public: Determine image statistics.

For this version the following are calculated:

  • maxAbsRes Maximum absolute windowed residual value
  • avgRes Average windowed residual value
Parameters:
in The object to deconvolve
field Which field? (1-rel) <=0 -> all;
err Obit error stack object.

void ObitDConCleanInit gpointer  inn  ) 
 

Private: Deallocate members.

Parent classes portions are (recursively) initialized first

Parameters:
inn Pointer to the object to initialize.

void ObitDConCleanPixelStats ObitDConClean in,
ObitErr err
 

Public: Prepare for minor cycle.

Parameters:
in The object to deconvolve
err Obit error stack object.

void ObitDConCleanRestore ObitDConClean in,
ObitErr err
 

Public: Restore subtracted components.

Parameters:
in The object to restore
err Obit error stack object.

gboolean ObitDConCleanSelect ObitDConClean in,
ObitErr err
 

Public:Select components to be subtracted .

Parameters:
in The object to deconvolve
err Obit error stack object.
Returns:
TRUE if deconvolution is complete

void ObitDConCleanSub ObitDConClean in,
ObitErr err
 

Public: Subtract components and generate new residual image(s).

Virtual routine, only defined in derived classes

Parameters:
in The object to deconvolve
err Obit error stack object.

void ObitDConCleanXRestore ObitDConClean in,
ObitErr err
 

Public: Restore subtracted components from other fields.

Does brute force convolution. Adopted from the AIPSish QOOP:QCLEAN.FOR(CLOVER) Presumes in->mosaic and image descriptors filled in.

Parameters:
in The object to restore
err Obit error stack object.


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