Esempio n. 1
0
void KstCSD::commonConstructor(const QString& in_tag, KstVectorPtr in_V,
                               double in_freq, bool in_average, bool in_removeMean, bool in_apodize, 
                               ApodizeFunction in_apodizeFxn, int in_windowSize, int in_averageLength, 
                               double in_gaussianSigma, const QString& in_vectorUnits, 
                               const QString& in_rateUnits, PSDType in_outputType, const QString& vecName) {
  _typeString = i18n("Cumulative Spectral Decay");
  _inputVectors[INVECTOR] = in_V;
  setTagName(in_tag);
  _frequency = in_freq;
  _average = in_average;
  _apodize = in_apodize;
  _windowSize = in_windowSize;
  _apodizeFxn = in_apodizeFxn;
  _gaussianSigma = in_gaussianSigma;
  _removeMean = in_removeMean;
  _averageLength = in_averageLength;
  _vectorUnits = in_vectorUnits;
  _rateUnits = in_rateUnits;
  _outputType = in_outputType;

  if (_frequency <= 0.0) {
    _frequency = 1.0;
  }
  
  KstMatrixPtr outMatrix = new KstMatrix(in_tag+"-csd", this, 1, 1);
  outMatrix->setLabel(i18n("Power [%1/%2^{1/2}]").arg(_vectorUnits).arg(_rateUnits));
  outMatrix->setXLabel(i18n("%1 [%2]").arg(vecName).arg(_vectorUnits));
  outMatrix->setYLabel(i18n("Frequency [%1]").arg(_rateUnits));
  _outMatrix = _outputMatrices.insert(OUTMATRIX, outMatrix);
  KST::addMatrixToList(outMatrix);

  updateMatrixLabels();
  (*_outMatrix)->setDirty();
}
Esempio n. 2
0
void CSD::change(VectorPtr in_V, double in_freq, bool in_average,
    bool in_removeMean, bool in_apodize, ApodizeFunction in_apodizeFxn,
    int in_windowSize, int in_length, double in_gaussianSigma,
    PSDType in_outputType, const QString& in_vectorUnits,
    const QString& in_rateUnits) {

  _inputVectors[CSD_INVECTOR] = in_V;
  QString vecName = in_V ? in_V->Name() : QString();
  _frequency = in_freq;
  _average = in_average;
  _apodize = in_apodize;
  _windowSize = in_windowSize;
  _apodizeFxn = in_apodizeFxn;
  _gaussianSigma = in_gaussianSigma;
  _removeMean = in_removeMean;
  _averageLength = in_length;
  _vectorUnits = in_vectorUnits;
  _rateUnits = in_rateUnits;
  _outputType = in_outputType;

  if (_frequency <= 0.0) {
    _frequency = 1.0;
  }

  updateMatrixLabels();
}
Esempio n. 3
0
void CSD::change(VectorPtr in_V, double in_freq, bool in_average,
    bool in_removeMean, bool in_apodize, ApodizeFunction in_apodizeFxn,
    int in_windowSize, int in_length, double in_gaussianSigma,
    PSDType in_outputType, const QString& in_vectorUnits,
    const QString& in_rateUnits) {

  _inputVectors[CSD_INVECTOR] = in_V;
  QString vecName = in_V ? in_V->Name() : QString();
  _frequency = in_freq;
  _average = in_average;
  _apodize = in_apodize;
  _windowSize = in_windowSize;
  _apodizeFxn = in_apodizeFxn;
  _gaussianSigma = in_gaussianSigma;
  _removeMean = in_removeMean;
  _averageLength = in_length;
  _vectorUnits = in_vectorUnits;
  _rateUnits = in_rateUnits;
  _outputType = in_outputType;

  if (_frequency <= 0.0) {
    _frequency = 1.0;
  }

  _outMatrix->setLabel(i18n("Power \\[%1/%2^{1/2 }\\]").arg(_vectorUnits).arg(_rateUnits));
  _outMatrix->setXLabel(i18n("Time \\[s\\]"));
  _outMatrix->setYLabel(i18n("Frequency \\[%1\\]").arg(_rateUnits));

  updateMatrixLabels();
}
Esempio n. 4
0
void KstCSD::commonConstructor(const QString& in_tag, KstVectorPtr in_V, double in_freq, bool in_average, 
                                bool in_removeMean, bool in_apodize, ApodizeFunction in_apodizeFxn, int in_windowSize, 
                                int in_averageLength, double in_gaussianSigma, const QString& in_vectorUnits,
                                const QString& in_rateUnits, PSDType in_outputType, bool in_interpolateHoles,
                                const QString& vecName) {
  _typeString = i18n("Spectrogram");
  _type = "Spectrogram";
  _inputVectors[INVECTOR] = in_V;
  setTagName(KstObjectTag::fromString(in_tag));
  _frequency = in_freq;
  _average = in_average;
  _apodize = in_apodize;
  _windowSize = in_windowSize;
  _apodizeFxn = in_apodizeFxn;
  _gaussianSigma = in_gaussianSigma;
  _removeMean = in_removeMean;
  _averageLength = in_averageLength;
  _vectorUnits = in_vectorUnits;
  _rateUnits = in_rateUnits;
  _outputType = in_outputType;
  _interpolateHoles = in_interpolateHoles;

  if (_frequency <= 0.0) {
    _frequency = 1.0;
  }

  {
    KstWriteLocker blockMatrixUpdates(&KST::matrixList.lock());

    KstMatrixPtr outMatrix = new KstMatrix(KstObjectTag("csd", tag()), this, 1, 1);
    outMatrix->setLabel(i18n("Power [%1/%2^{1/2}]").arg(_vectorUnits).arg(_rateUnits));
    outMatrix->setXLabel(i18n("%1 [%2]").arg(vecName).arg(_vectorUnits));
    outMatrix->setYLabel(i18n("Frequency [%1]").arg(_rateUnits));
    _outMatrix = _outputMatrices.insert(OUTMATRIX, outMatrix);
  }

  updateMatrixLabels();
  (*_outMatrix)->setDirty();
}
Esempio n. 5
0
void KstCSD::setOutput(PSDType in_outputType)  {
  setDirty();
  _outputType = in_outputType;

  updateMatrixLabels();
}
Esempio n. 6
0
void CSD::setOutput(PSDType in_outputType)  {
  _outputType = in_outputType;

  updateMatrixLabels();
}