Ignore:
Timestamp:
01/09/13 19:27:23 (11 years ago)
Author:
Takeshi Nakazato
Message:

New Development: Yes

JIRA Issue: Yes CAS-4770 and its sub-tickets

Ready for Test: Yes

Interface Changes: No

What Interface Changed: Please list interface changes

Test Programs: List test programs

Put in Release Notes: Yes/No?

Module(s): Module Names change impacts.

Description: Describe your changes here...

First version of applycal for single dish calibration.
Added new classes for the operation (STApplyCal, Calibrator, PSAlmaCalibrator,
Locator, BisectionLocator?, Interpolator1D, NearestInterpolator1D).
Also, modified existing classes to fit with implementation of applycal.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STCalSkyTable.cpp

    r2703 r2720  
    3838}
    3939
     40STCalSkyTable::STCalSkyTable(const String &name)
     41  : STApplyTable(name)
     42{
     43  attachOptionalColumns();
     44}
     45
    4046STCalSkyTable::~STCalSkyTable()
    4147{
     
    6369
    6470void STCalSkyTable::setdata(uInt irow, uInt scanno, uInt cycleno,
    65                        uInt beamno, uInt ifno, uInt polno,
    66                        Double time, Float elevation, Vector<Float> spectra)
     71                            uInt beamno, uInt ifno, uInt polno, uInt freqid,
     72                            Double time, Float elevation, Vector<Float> spectra)
    6773{
    6874  if (irow >= (uInt)nrow()) {
     
    7581  } 
    7682
    77   setbasedata(irow, scanno, cycleno, beamno, ifno, polno, time);
     83  setbasedata(irow, scanno, cycleno, beamno, ifno, polno, freqid, time);
    7884  elCol_.put(irow, elevation);
    7985  spectraCol_.put(irow, spectra);
     
    8187
    8288void STCalSkyTable::appenddata(uInt scanno, uInt cycleno,
    83                           uInt beamno, uInt ifno, uInt polno,
    84                           Double time, Float elevation, Vector<Float> spectra)
     89                               uInt beamno, uInt ifno, uInt polno, uInt freqid,
     90                               Double time, Float elevation, Vector<Float> spectra)
    8591{
    8692  uInt irow = nrow();
    8793  table_.addRow(1, True);
    88   setdata(irow, scanno, cycleno, beamno, ifno, polno, time, elevation, spectra);
     94  setdata(irow, scanno, cycleno, beamno, ifno, polno, freqid, time, elevation, spectra);
    8995}
     96
     97uInt STCalSkyTable::nchan(uInt ifno)
     98{
     99  STSelector org = sel_;
     100  STSelector sel;
     101  sel.setIFs(vector<int>(1,(int)ifno));
     102  setSelection(sel);
     103  uInt n = spectraCol_(0).nelements();
     104  unsetSelection();
     105  if (!org.empty())
     106    setSelection(org);
     107  return n;
    90108}
     109
     110// Vector<Double> STCalSkyTable::getBaseFrequency(uInt whichrow)
     111// {
     112//   assert(whichrow < nrow());
     113//   uInt freqid = freqidCol_(whichrow);
     114//   uInt nc = spectraCol_(whichrow).nelements();
     115//   Block<Double> f = getFrequenciesRow(freqid);
     116//   Vector<Double> freqs(nc);
     117//   indgen(freqs, f[1]-f[0]*f[2], f[2]);
     118//   return freqs;
     119// }
     120}
Note: See TracChangeset for help on using the changeset viewer.