Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.atnf.csiro.au/vlbi/dokuwiki/doku.php/difx/configcode
Дата изменения: Unknown
Дата индексирования: Sun Apr 10 18:44:28 2016
Кодировка: IBM-866

Поисковые слова: р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п п п п п п п
difx:configcode [ATNF VLBI Wiki]

User Tools

Site Tools


difx:configcode

Chris' Note on Configuration Coding

int getMaxNumChannels() Returns the maximum number of spectral channels of all frequency bands.

int getStartMJD() Return the MJD of the start of the correlation

int getStartSeconds() Return the seconds from start of UT day at the start of correlation

int getCoreResultLength(int configindex) Return the size in тАЬcomplex floatsтАЭ (cf32) of the data blob containing all complex cross correlations, real autocorrelations and associated weights.

int getCoreResultBaselineOffset(configindex, freqindex, baselineindex) Return cf32 offset to the start of freq/baseline cross correlation data

int getCoreResultBWeightOffset(configindex, freqindex, baselineindex) Return cf32 offset to start of f32 weight array for freq/baseline

int getCoreResultAutocorrOffset(configindex, datastreamindex) Return cf32 offset to start of autocorrelation data

int getCoreResultACWeightOffset(configindex, datastreamindex) Return cf32 offset to start of autocorrelation weights

Looping Over All Products

The following loops iterates over all products

int binloop = 1;    
if(config->pulsarBinOn(configindex) && !config->scrunchOutputOn(configindex))
  binloop = config->getNumPulsarBins(configindex);

for (int i=0;i<config->getNumBaselines();i++) {
  // i loops over all baselines
  int ds1index = config->getBDataStream1Index(configindex, i);
  int ds2index = config->getBDataStream2Index(configindex, i);

  for(int j=0;j<config->getBNumFreqs(configindex,i);j++) {
    // j loops over all frequencies for this baseline
    int /freqindex = config->getBFreqIndex(configindex, i, j);
    int resultindex = config->getCoreResultBaselineOffset(configindex, freqindex, i);
    int freqchannels = config->getFNumChannels(freqindex)/config->getFChannelsToAverage(freqindex);

    for(int s=0;s<model->getNumPhaseCentres(currentscan);s++) {
      for(int b=0;b<binloop;b++) {
        for(int k=0;k<config->getBNumPolProducts(configindex, i, j);k++) {
          //results[resultindex] is start of vector of freqchennels spectral points
          resultindex += freqchannels;
        }
      }
    }
  }
}
difx/configcode.txt ۤ Last modified: 2015/10/21 10:08 (external edit)