- if (m_traceLevel >= Trace::TRACE_PLOT) {
- SGPDriver sgpDriver ("Frequency Filter: Natural Order");
- SGP sgp (sgpDriver);
- EZPlot ezplot (sgp);
-
- ezplot.ezset ("title Filter Filter: Natural Order");
- ezplot.addCurve (m_adFilter, m_nFilterPoints);
- ezplot.plot();
- cio_put_str ("Press any key to continue");
- cio_kb_getc ();
+
+ // This doesn't work!
+ // Need to add filtering for divergent geometries & Frequency/Direct filtering
+ if (m_idGeometry == Scanner::GEOMETRY_EQUILINEAR) {
+ for (i = 0; i < m_nFilterPoints; i++)
+ m_adFilter[i] *= 0.5;
+ } else if (m_idGeometry == Scanner::GEOMETRY_EQUIANGULAR) {
+ for (i = 0; i < m_nFilterPoints; i++) {
+ int iDetFromZero = i - ((m_nFilterPoints - 1) / 2);
+ double sinScale = sin (iDetFromZero * m_dSignalInc);
+ if (fabs(sinScale) < 1E-7)
+ sinScale = 1;
+ else
+ sinScale = (iDetFromZero * m_dSignalInc) / sinScale;
+ double dScale = 0.5 * sinScale * sinScale;
+ m_adFilter[i] *= dScale;
+ }
+ }
+#ifdef HAVE_SGP
+ EZPlot* pEZPlot = NULL;
+ if (pSGP && m_traceLevel >= Trace::TRACE_PLOT) {
+ pEZPlot = new EZPlot (*pSGP);
+ pEZPlot->ezset ("title Filter Filter: Natural Order");
+ pEZPlot->ezset ("ylength 0.50");
+ pEZPlot->ezset ("yporigin 0.00");
+ pEZPlot->addCurve (m_adFilter, m_nFilterPoints);
+ pEZPlot->plot();