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

ObitOTFGetSoln.c File Reference

ObitOTFGetSoln utuility module calibration function definitions. More...

#include <gsl/gsl_multifit.h>
#include <stdlib.h>
#include "ObitOTFGetSoln.h"
#include "ObitTimeFilter.h"
#include "ObitPennArrayAtmFit.h"
#include "ObitPlot.h"

Defines

#define MAXSAMPSCAN   5000
#define MAXSAMPLE   1000
#define MAXBLSAMPLE   1000
#define MAXSISAMPLE   100
#define MAXSAMPLE   1000
#define MAXSAMPLE   1000

Functions

ObitTableOTFSolnObitOTFGetSolnCal (ObitOTF *inOTF, ObitOTF *outOTF, ObitErr *err)
 Public: Determine offset calibration from a residual data.
ObitTableOTFSolnObitOTFGetSolnGain (ObitOTF *inOTF, ObitOTF *outOTF, ObitErr *err)
 Public: Determine Gain calibration from a residual data.
ObitTableOTFSolnObitOTFGetSolnFilter (ObitOTF *inOTF, ObitOTF *outOTF, ObitErr *err)
 Public: Offset calibration from filtered residual data.
ObitTableOTFSolnObitOTFGetSolnPolyBL (ObitOTF *inOTF, ObitOTF *outOTF, ObitErr *err)
 Public: Fit polynomial baseline to median filtered residual OTF data.
ObitTableOTFSolnObitOTFGetSolnMBBase (ObitOTF *inOTF, ObitOTF *outOTF, ObitErr *err)
 Public: Determine multibeam baseline calibration from data.
gfloat ObitOTFGetSolnAvgCal (gint n, gboolean *isCal, gfloat *data)
 Public: Determine median value of the cal from a set of data.
ObitTableOTFSolnObitOTFGetInstCal (ObitOTF *inOTF, ObitOTF *outOTF, ObitErr *err)
 Public: Determine instrumental calibration.
ObitTableOTFSolnObitOTFGetSolnPARGain (ObitOTF *inOTF, ObitOTF *outOTF, ObitErr *err)
 Public: Determine Penn Array type gain calibration from data.
ObitTableOTFCalObitOTFGetDummyCal (ObitOTF *inOTF, ObitOTF *outOTF, glong ver, oint ncoef, ObitErr *err)
 Public: Create Dummy Cal table.


Detailed Description

ObitOTFGetSoln utuility module calibration function definitions.


Define Documentation

#define MAXBLSAMPLE   1000
 

#define MAXSAMPLE   1000
 

#define MAXSAMPLE   1000
 

#define MAXSAMPLE   1000
 

#define MAXSAMPSCAN   5000
 

#define MAXSISAMPLE   100
 


Function Documentation

ObitTableOTFCal* ObitOTFGetDummyCal ObitOTF inOTF,
ObitOTF outOTF,
glong  ver,
oint  ncoef,
ObitErr *  err
 

Public: Create Dummy Cal table.

Parameters:
inOTF Input OTF data.
outOTF OTF with which the output OTFCal is to be associated
ver OTFCal table version
ncoef Number of coefficients in table
err Error stack, returns if not empty.
Returns:
Pointer to the newly created OTFCal object which is associated with inOTF.

ObitTableOTFSoln* ObitOTFGetInstCal ObitOTF inOTF,
ObitOTF outOTF,
ObitErr *  err
 

Public: Determine instrumental calibration.

Calculates average gain from cal measurements calculates median ofset Calibration parameters are on the inOTF info member.

  • "SOLINT" OBIT_float (1,1,1) Solution interval in days [def 1 sec].
    Parameters:
    inOTF Input OTF data.
    outOTF OTF with which the output OTFSoln is to be associated
    err Error stack, returns if not empty.
    Returns:
    Pointer to the newly created OTFSoln object which is associated with outOTF.

gfloat ObitOTFGetSolnAvgCal gint  n,
gboolean *  isCal,
gfloat *  data
 

Public: Determine median value of the cal from a set of data.

Successive off/on/off triplets are used for each estimate.

Parameters:
n number of data values
isCal For each datum, TRUE if cal on.
data On input the data values, will be replaced on output by the sequence of valid estimates of the cal.
Returns:
Median Cal value or fblank if not possible

ObitTableOTFSoln* ObitOTFGetSolnCal ObitOTF inOTF,
ObitOTF outOTF,
ObitErr *  err
 

Public: Determine offset calibration from a residual data.

Calibration parameters are on the inOTF info member.

  • "SOLINT" OBIT_float (1,1,1) Solution interval in days [def 1 sec].
  • "MINEL" OBIT_float (1,1,1) Minimum elevation allowed (deg)
  • "CLIP" OBIT_float (1,1,1) data outside of range +/- CLIP are replaced by + or - CLIP. [Def 1.0e20]
    Parameters:
    inOTF Input OTF data.
    outOTF OTF with which the output OTFSoln is to be associated
    err Error stack, returns if not empty.
    Returns:
    Pointer to the newly created OTFSoln object which is associated with inOTF.

ObitTableOTFSoln* ObitOTFGetSolnFilter ObitOTF inOTF,
ObitOTF outOTF,
ObitErr *  err
 

Public: Offset calibration from filtered residual data.

The time series of each detector is filtered to remove structure on time scales longer than SOLINT. Scans in excess of 5000 samples will be broken into several. Calibration parameters are on the inOTF info member.

  • "SOLINT" OBIT_float (1,1,1) Solution interval in days [def 10 sec]. There will be 4 Soln table entries per SolInt This should not exceed 1000 samples. Solutions will be truncated at this limit.
  • "MINEL" OBIT_float (1,1,1) Minimum elevation allowed (deg)
  • "CLIP" OBIT_float (1,1,1) data outside of range +/- CLIP are replaced by + or - CLIP. [Def 1.0e20]
    Parameters:
    inOTF Input OTF data. Prior calibration applied if requested.
    outOTF OTF with which the output OTFSoln is to be associated
    err Error stack, returns if not empty.
    Returns:
    Pointer to the newly created OTFSoln object which is associated with inOTF.

ObitTableOTFSoln* ObitOTFGetSolnGain ObitOTF inOTF,
ObitOTF outOTF,
ObitErr *  err
 

Public: Determine Gain calibration from a residual data.

Gain Calibration is based on the "Cal" values in the data. Average value of the noise Cal is computed and entered in the data. (Gain only) Additive values are determined from the median values of the residual data. Solution type controlled by calType Calibration parameters are on the inOTF info member.

  • "SOLINT" OBIT_float (1,1,1) Solution interval in days [def 10 sec]. This should not exceed 1000 samples. Solutions will be truncated at this limit.
  • "MINRMS" OBIT_float (1,1,1) minimum allowable fractional solution RMS [def 0.1]. bad solutions are replaced with pervious good value. [Gain soln]
  • "CALJY" OBIT_float (*,1,1) Calibrator value in Jy per detector [Gain soln] [def 1.0] .
  • "MINEL" OBIT_float (1,1,1) Minimum elevation allowed (deg)
  • "calType" OBIT_string (*,1,1) Calibration type desired "Gain" => Gain (multiplicative, cal) solution only "Offset" => Offset (additive) solution only "GainOffset" both gain and offset calibration (probably bad idea). anything else or absent => Gain only.
    Parameters:
    inOTF Input OTF data.
    outOTF OTF with which the output OTFSoln is to be associated
    err Error stack, returns if not empty.
    Returns:
    Pointer to the newly created OTFSoln object which is associated with inOTF.

ObitTableOTFSoln* ObitOTFGetSolnMBBase ObitOTF inOTF,
ObitOTF outOTF,
ObitErr *  err
 

Public: Determine multibeam baseline calibration from data.

Fit one term, time variable common, atmospheric polynomial and a single offset per detector. Since the different detectors each have an individual multiplicative term, the Atmospheric + offset are places in the the detector's additive term and the polynomical is set to zero. Scans in excess of 5000 samples will be broken into several. Either detector offsets, common mode variations or both may be selected to Soln. Calibration parameters are on the inOTF info member.

  • "SolInt" OBIT_float (1,1,1) Solution interval in days [def 10 sec].
  • "MinEl" OBIT_float (1,1,1) Minimum elevation allowed (deg)
  • "ClipSig" OBIT_float (1,1,1) data outside of range +/- CLIP sigma are blanked [def very large -> no clipping]
  • "plotDet" OBIT_int (1,1,1) Detector number to plot per scan [def =-1 = none]
  • "calType" OBIT_string (*,1,1) Calibration type desired [def "Both"] "Both" => Detector offsets and common mode poly "Common" => common mode poly "Offset" Detector offsets
    Parameters:
    inOTF Input OTF data.
    outOTF OTF with which the output OTFSoln is to be associated
    err Error stack, returns if not empty.
    Returns:
    Pointer to the newly created OTFSoln object which is associated with inOTF.

ObitTableOTFSoln* ObitOTFGetSolnPARGain ObitOTF inOTF,
ObitOTF outOTF,
ObitErr *  err
 

Public: Determine Penn Array type gain calibration from data.

Average On and Off for each detector and differences Mult factor = CALJY/(cal_on-cal_off) per detector, may be negative. Data scan averaged and repeated for any subsequent scans without cal On data If doWate==True then determine weights from the reciprocal of the variance in scans which have both cal-on and cal-off measurements; values are reused between such scans Write Soln entries at beginning and end of each scan. Note: Any scans prior to a scan with calibration data will be flagged.

  • "CALJY" OBIT_float (*,1,1) Calibrator value in Jy per detector [def 1.0] . Duplicates for all detectors if only one given.
  • "doWate" OBIT_boolean (1,1,1) If true determine Weights from RMS [def False]
  • "minSNR" OBIT_float (1,1,1) Minimum SNR for acceptable cal (ratio cal/RMS) Only used if doWate is True [def. 10.0]
    Parameters:
    inOTF Input OTF data, prior calibration/selection applied if requested
    outOTF OTF with which the output OTFSoln is to be associated
    err Error stack, returns if not empty.
    Returns:
    Pointer to the newly created OTFSoln object which is associated with outOTF.

ObitTableOTFSoln* ObitOTFGetSolnPolyBL ObitOTF inOTF,
ObitOTF outOTF,
ObitErr *  err
 

Public: Fit polynomial baseline to median filtered residual OTF data.

Calibration parameters are on the inOTF info member.

  • "SOLINT" OBIT_float (1,1,1) Solution interval in days [def 10 sec]. This should not exceed 5000 samples. Solutions will be truncated at this limit. This should be a sub multiple of the scan length.
  • "MINEL" OBIT_float (1,1,1) Minimum elevation allowed (deg)
  • "ORDER" OBIT_int (1,1,1) Order of polynomial to fit [def 1] Must not exceed the number of solution intervals in a scan.
    Parameters:
    inOTF Input OTF data.
    outOTF OTF with which the output OTFSoln is to be associated
    err Error stack, returns if not empty.
    Returns:
    Pointer to the newly created OTFSoln object which is associated with inOTF.


Generated on Mon Sep 3 20:43:54 2007 by  doxygen 1.3.9.1