Both sides previous revision
Previous revision
Next revision
|
Previous revision
|
difx:configcode [2010/07/07 12:16] chrisphillips |
difx:configcode [2010/08/03 17:38] cormac Page moved from configcode to difx:configcode |
''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 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, b --- //[[Chris.Phillips@csiro.au|Chris Phillips]] 2010/07/07 10:13//aselineindex)'' Return cf32 offset to the start of freq/baseline cross correlation data | ''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 getCoreResultBWeightOffset(configindex, freqindex, baselineindex)'' Return cf32 offset to start of f32 weight array for freq/baseline |
The following loops iterates over all products | The following loops iterates over all products |
| |
'' | <code> |
| |
int binloop = 1; if(config->pulsarBinOn(currentconfigindex) && !config->scrunchOutputOn(curre | int binloop = 1; |
ntconfigindex)) | if(config->pulsarBinOn(configindex) && !config->scrunchOutputOn(configindex)) |
binloop = config->getNumPulsarBins(currentconfigindex); | binloop = config->getNumPulsarBins(configindex); |
| |
for (int i=0;i<config->getNumBaselines();i++) { | for (int i=0;i<config->getNumBaselines();i++) { |
int ds1index = config->getBDataStream1Index(currentconfigindex, i); | // i loops over all baselines |
int ds2index = config->getBDataStream2Index(currentconfigindex, i); | int ds1index = config->getBDataStream1Index(configindex, i); |
| int ds2index = config->getBDataStream2Index(configindex, i); |
| |
for(int j=0;j<config->getBNumFreqs(currentconfigindex,i);j++) { | for(int j=0;j<config->getBNumFreqs(configindex,i);j++) { |
freqindex = config->getBFreqIndex(currentconfigindex, 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 b=0;b<binloop;b++) { for(int k=0;k<config->getBNumPolProducts(currentconfigindex, i, j);k++ | 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; |
| } |
| } |
| } |
| } |
| } |
| |
| </code> |
'' | |
| |