Ignore:
Timestamp:
11/27/08 12:47:15 (16 years ago)
Author:
TakTsutsumi
Message:

New Development: No

JIRA Issue: No

Ready to Release: Yes

Interface Changes: Yes

What Interface Changed: many

Test Programs: sd.scantable(), sd.scantable.save()

Put in Release Notes: N/A

Description: copied from current casapy code tree


File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/alma/external/atnf/PKSIO/PKSMS2writer.cc

    r1393 r1453  
    9393
    9494  Int maxNPol = max(cNPol);
     95  cGBT = cAPEX = cSMT = cALMA = False;
    9596
    9697  // check if it is GBT data
    97   cGBT = antName.contains("GBT");
     98  if (antName.contains("GBT")) {
     99    cGBT = True;
     100  }
     101  else if (antName.contains("APEX")) {
     102    cAPEX = True;
     103  }
     104  else if (antName.contains("HHT") || antName.contains("SMT")) {
     105    cSMT = True;
     106  }
     107  else if (antName.contains("ALMA")) {
     108    cALMA = True;
     109  }
     110 
     111
     112   
     113  //cGBT = antName.contains("GBT");
     114  //cAPEX = antName.contains("APEX");
     115  //cSMT = antName.contains("HHT");
     116  //cALMA = antName.contains("ALMA");
    98117
    99118  // Add the non-standard CALFCTR column.
     
    125144
    126145    MS::addColumnToDesc(pksDesc, MS::DATA, 2);
     146    //pksDesc.rwColumnDesc(MS::columnName(MS::DATA)).rwKeywordSet().
     147    //            define("UNIT", "Jy");
    127148    pksDesc.rwColumnDesc(MS::columnName(MS::DATA)).rwKeywordSet().
    128                 define("UNIT", "Jy");
     149                define("UNIT", fluxUnit);
    129150    pksDesc.rwColumnDesc(MS::columnName(MS::DATA)).rwKeywordSet().
    130151                define("MEASURE_TYPE", "");
     
    391412        const Double          bandwidth,
    392413        const Double          freqInc,
    393         const Double          restFreq,
     414        //const Double          restFreq,
     415        const Vector<Double>  restFreq,
    394416        const Vector<Float>   tcal,
    395417        const String          tcalTime,
     
    533555  Vector<Float> weight(nPol, 1.0f);
    534556  cMSCols->weight().put(irow, weight);
     557  //imaging weight
     558  //Vector<Float> imagingWeight(nChan);
     559  //cMSCols->imagingWeight().put(irow, imagingWeight);
    535560
    536561  // Flag information.
     
    612637  // do specific things for GBT
    613638  // Data.
     639  // plus some more telescopes
    614640  cAntennaCols->name().put(n, antName);
    615641  //cAntennaCols->station().put(n, "ATNF_PARKES");
    616642  if (cGBT) {
    617643    cAntennaCols->station().put(n, "GREENBANK");
     644    cAntennaCols->dishDiameter().put(n, 110.0);
     645  }
     646  else if (cAPEX) {
     647    cAntennaCols->station().put(n, "CHAJNANTOR");
     648    cAntennaCols->dishDiameter().put(n, 12.0);
     649  }
     650  else if (cALMA) {
     651    cAntennaCols->station().put(n, "CHAJNANTOR");
     652    cAntennaCols->dishDiameter().put(n, 12.0);
     653  }
     654  else if (cSMT) {
     655    cAntennaCols->station().put(n, "MT_GRAHAM");
     656    cAntennaCols->dishDiameter().put(n, 10.0);
    618657  }
    619658  else {
    620659    cAntennaCols->station().put(n, "ATNF_PARKES");
     660    cAntennaCols->dishDiameter().put(n, 64.0);
    621661  }
    622662  cAntennaCols->type().put(n, "GROUND-BASED");
     
    626666  cAntennaCols->offset().put(n, antOffset);
    627667  //cAntennaCols->dishDiameter().put(n, 64.0);
    628   if (cGBT) {
    629     cAntennaCols->dishDiameter().put(n, 110.0);
    630   }
    631   else {
    632     cAntennaCols->dishDiameter().put(n, 64.0);
    633   }
     668  //if (cGBT) {
     669  //  cAntennaCols->dishDiameter().put(n, 110.0);
     670  //}
     671  //else {
     672  //  cAntennaCols->dishDiameter().put(n, 64.0);
     673  //}
    634674  // Flags.
    635675  cAntennaCols->flagRow().put(n, False);
     
    950990        const Vector<Double> direction,
    951991        const Vector<Double> properMotion,
    952         const Double restFreq,
     992        //const Double restFreq,
     993        const Vector<Double> restFreq,
    953994        const Double radialVelocity)
    954995{
     
    9841025//  cSourceCols->position().put(n, position);
    9851026    cSourceCols->properMotion().put(n, properMotion);
    986     Vector<Double> restFrequency(1, restFreq);
    987     cSourceCols->restFrequency().put(n, restFrequency);
     1027//  Vector<Double> restFrequency(1, restFreq);
     1028//  cSourceCols->restFrequency().put(n, restFrequency);
     1029    cSourceCols->restFrequency().put(n, restFreq);
    9881030    Vector<Double> sysvel(1, radialVelocity);
    9891031    cSourceCols->sysvel().put(n, sysvel);
Note: See TracChangeset for help on using the changeset viewer.