- ideal
- a delta-function (i.e. zero-noise) distribution. This distribution type should be used when a random component is not desired.
- normal
- the normal distribution. The random component will vary according to a normal (Gaussian) distribution.
- uniform
- the uniform distribution. The random component will vary uniformily over a given range.
- amp
- phase
See VisEquation for definition of the Visibility Measurement Equation. See VisJones for how SimVisJones is to be used.
create a Jones matrix for a given number of antennae and feeds.
Create a copy of another SimVisJones.
delete this SimVisJones
return the number of antennae this matrix is configured for.
return the number of feeds this matrix is configured for.
return the number of feeds this matrix is configured for.
set the number of antennae, feeds, and spectral windows this Jones is configured to handle. This needs to be called before any real calculations can be done--that is, prior to any call to apply() or applyInv or any of the set...() routines. This usually allows this object to set its internal storage appropriately.
set the parameters for the random component of the gain variation. antenna is the (zero-based) index of the antenna set the noise for or a negative value to set the noise for all antennae. receptor is the (zero-based) index of the receptor to set the noise for or negative to set all receptors simultaneously; since only 2x2 Jones matrices are currently supported, this should be less than 2. comp is either SimVisJones::amp or SimVisJones::phase to indicate which component of the gain noise should be applied to. width is the full characteristic width of the distribution. If the distribution is normal, the width is twice the root-mean-square of the distribution (i.e. 2*sigma). A width of zero is equivalent type=ideal. If comp is phase, the width is taken as a phase in radians; if comp is amp, the width is taken to be a gain magnitude. feed is the (zero-based) index of the feed to set the noise for or negative to set all the feeds simultaneously. spwin is the (zero-based) ID of the spectral window to set the noise for or negative to set all windows simultaneously. type is the type of noise distribution as one of the identifiers given in the Distribution enumeration (ideal, normal, or uniform); use ideal to prevent a random component from being added to the gains.
return the type of random distribution associated with a given gain component
return the width of the randome distribution associated with a given gain component. Zero is returned if the distribution is ideal.
reseed the random number generator used to produce noise. seed1 is the primary seed, and
internally cache the antenna gains according to the current parameter settings. This makes them accessible to getGains() without having to actually apply them to the MeasurmentSet. If the gain parameters change, the gain cache will be appropriately invalidated. vi is the vis iterator associated with the MeasreumentSent; it will be set to origin and then advanced to the end of the set. virtual void cacheGains(VisSet& vi) = 0;
write out the gains that would be applied to a given Measurement Set. file is the name of the calibration table to write. ms is the MeasurementSet which will be read through to discover the proper times and telescope configurations; it will be resorted, but otherwise it is not modified.
add the noise for a given antenna and feed to the given gains. gains is a 2x2 matrix containing actual gains (presumably for the antenna and feed specified). Each row contains a gain for one polarization; the columns give the amplitude and phase of the gains. antenna is the (zero-based) index of the antenna to apply the noise for. feed is the (zero-based) index of the receptor to apply the noise for.
Apply the Gradients to the visibilities Since this Jones is not solvable, this default implementation does nothing.
add data to the running sums used to form the gradient. Since this Jones is not solvable, this default implementation does nothing.
solve for the gains using the calculated gradients Since this Jones is not solvable, this default implementation does always returns False.
resize the noise configuration containers. Obviously, this should be called whenever the number of antennae or feeds change.
Return true if polarization re-sequencing required
Re-sequence to (XX,XY,YX,YY) or (RR,RL,LR,LL)
Re-sequence to (XX,YY,XY,YX) or (RR,LL,RL,LR)
reshape the cache. Any previously stored gains will be cleared
return True if a gain matrix has been cached for a given time.
return the cached gain matrix for the given time. If no matrix is found for this time, the default matrix is returned. By updating the values in this matrix implicitly sets the gain in the cache.
return the cached gain matrix for the given time. If no matrix is found for this time, the default matrix is returned
clear the entire contents of the cache
See VisEquation for definition of the Visibility Measurement Equation. See VisJones for how SimVisJones is to be used.
create a Jones matrix for a given number of antennae, feeds, and spectral windows. The reftime should be in seconds in the frame used by the VisBuffer; this time is used as "time0", the starting time, when applying functions set via setTimeDep().
Create a copy of another SimVisJones.
Construct a Jones matrix ready to apply unity gains to a given VisibilitySet. That is, the gain amplitude will be 1, and the phase shift, 0. Clients should use setTimeDep(), setNoise(), and setDelayError() to vary the gain. vs is the VisSet to initialize to. seed is used to seed the random number generator used to create noise (if noise is added later). slotintv is an interval of time (in seconds) over which the gain is considered constant. If <= 0, no such interval is assumed, and gains are integrated over the integration time. slotintv is a somewhat artificial constraint but might be helpful in calibration testing as it mirrors the practice of binning time into slots.
delete this SimVisJones
set the number of antennae, feeds, and spectral windows this Jones is configured to handle. This needs to be called before any real calculations can be done--that is, prior to any call to apply() or applyInv or any of the set...() routines. This usually allows this object to set its internal storage appropriately.
reset the reference time. reftime should be in seconds in the frame used by the VisBuffer; this time is used as "t=0", the starting time, when applying functions set via setTimeDep().
set the function that will control the systematic variation of the gains as a function of Time. This overrides any constant gain set during construction. antenna is the (zero-based) index of the antenna to update or a negative value to update all antennae. receptor is the (zero-based) index of the receptor to update or negative to update all receptors simultaneously; since only 2x2 Jones matrices are currently supported, this should be less than 2. comp is either SimGJones::amp or SimGJones::phase (defined in parent class, SimVisJones) to indicate which component of the gain should be made to vary. func is the function that should be used to calculate the gain as a function of time. feed is the (zero-based) index of the feed to update or negative to update all the feeds simultaneously.
remove the systematic time dependence of a component of the gain. antenna is the (zero-based) index of the antenna to update or a negative value to update all antennae. receptor is the (zero-based) index of the receptor to update or negative to update all receptors simultaneously; since only 2x2 Jones matrices are currently supported, this should be less than 2. comp is either SimGJones::amp or SimGJones::phase (defined in parent class, SimVisJones) to indicate which component of the varying gain should be removed. feed is the (zero-based) index of the feed to update or negative to update all the feeds simultaneously.
Returns true if a delay error (a frequency-dependent effect) has been set
Apply this Jones to some visibility data. vb is the buffer containing the data; that same buffer is returned.
Apply the inverse of this Jones to some visibility data. vb is the buffer containing the data; that same buffer is returned.
write out the gains that would be applied to a given Measurement Set. file is the name of the calibration table to write. ms is the MeasurementSet which will be read through to discover the proper times and telescope configurations; it will be resorted, but otherwise, it is not modified.
return a gain for a given antenna, feed, and spectral window
return a gain for a given interferometer. This calls cacheAntGain().
return the inverse of the gain for a given interferometer. This calls cacheAntGain().
calculate and cache Gains for a given antenna at a given time
return an IPosition to use as an Array index for retreiving the time dependence function.
See VisEquation for definition of the Visibility Measurement Equation. See VisJones for how SimVisJones is to be used.
Construct a Jones matrix that applies unity gain. That is, gain amplitude is 1, and the phase shift is 0. Clients should use setTimeDep(), setNoise(), and setDelayError() to vary the gain. nants is the number of antennae to support, nfeeds is the number of feeds per antenna, and spw is the number of spectral windows. seed is an optional seed for the noise generator.
Construct a Jones matrix ready to apply unity gains to a given VisibilitySet. That is, the gain amplitude will be 1, and the phase shift, 0. Clients should use setTimeDep(), setNoise(), and setDelayError() to vary the gain. vs is the VisSet to initialize to. seed is used to seed the random number generator used to create noise (if noise is added later). slotintv is an interval of time (in seconds) over which the gain is considered constant. If <= 0, no such interval is assumed, and gains are integrated over the integration time. slotintv is a somewhat artificial constraint but might be helpful in calibration testing as it mirrors the practice of binning time into slots.
Construct a Jones matrix ready to apply a constant gain to a given VisibilitySet. The gains set with this constructor will apply to all antennae and feeds. Applications should use setTimeDep(), setNoise(), and setDelayError() to vary the gain. vs is the VisSet to initialize to. The gain amplitude for the first receptor is given by amp0, and its corresponding phase shift is given by phase0. amp1 and phase1 similarly set the gain for the second receptor. seed is used to seed the random number generator used to create noise (if noise is added later). slotintv is an interval of time (in seconds) over which the gain is considered constant. If <= 0, no such interval is assumed, and gains are integrated over the integration time. slotintv is a somewhat artificial constraint but might be helpful in calibration testing as it mirrors the practice of binning time into slots.
delete this Jones matrix
return G as the type of this Jones matrix.
See VisEquation for definition of the Visibility Measurement Equation. See VisJones for how SimVisJones is to be used.
Construct a Jones matrix that applies unity gain. That is, gain amplitude is 1, and the phase shift is 0. Clients should use setTimeDep(), setNoise(), and setDelayError() to vary the gain. nants is the number of antennae to support, nfeeds is the number of feeds per antenna, and spw is the number of spectral windows. seed is an optional seed for the noise generator.
Construct a Jones matrix ready to apply unity gains to a given VisibilitySet. That is, the gain amplitude will be 1, and the phase shift, 0. Clients should use setTimeDep(), setNoise(), and setDelayError() to vary the gain. vs is the VisSet to initialize to. seed is used to seed the random number generator used to create noise (if noise is added later). slotintv is an interval of time (in seconds) over which the gain is considered constant. If <= 0, no such interval is assumed, and gains are integrated over the integration time. slotintv is a somewhat artificial constraint but might be helpful in calibration testing as it mirrors the practice of binning time into slots.
Construct a Jones matrix ready to apply a constant gain to a given VisibilitySet. The gains set with this constructor will apply to all antennae and feeds. Applications should use setTimeDep(), setNoise(), and setDelayError() to vary the gain. vs is the VisSet to initialize to. The gain amplitude for the first receptor is given by amp0, and its corresponding phase shift is given by phase0. amp1 and phase1 similarly set the gain for the second receptor. seed is used to seed the random number generator used to create noise (if noise is added later). slotintv is an interval of time (in seconds) over which the gain is considered constant. If <= 0, no such interval is assumed, and gains are integrated over the integration time. slotintv is a somewhat artificial constraint but might be helpful in calibration testing as it mirrors the practice of binning time into slots.
delete this Jones matrix
return G as the type of this Jones matrix.