Commit a81f67f8 authored by Bruce Allen's avatar Bruce Allen
Browse files

Modified graphing to display fewer cycles, and to incorporate offset times.

I am assuming that the initial lower frequency is 30 Hz.  Need to check code in this
respect.
parent 74d0770f
......@@ -594,7 +594,6 @@ void PulsarAnimationWidget::updatePulseProfile()
{
struct InputStruct in;
struct OutputStruct out;
double dx[3];
in.iota = m_sourceIota;
in.psi = m_sourceInclination;
......@@ -616,14 +615,16 @@ void PulsarAnimationWidget::updatePulseProfile()
// 360*out.dt/(freq0*30ms).
double freq0 = 1.0/pow(1.1,0.375);
double dx[3];
for (int i=0; i<3; i++) dx[i]=360*out.dt[0]/(30.0*freq0);
for(int x = 0; x < 360*PERIODS; ++x) {
double t=x/(PERIODS*360.0);
double freq = 1.0/pow(1.1-t,0.375);
m_plotData.m_dataLLO[x] = 0.8 * out.amp[0] * freq * freq * sin((freq*(x + dx[i]) + out.phase[0]) * deg2rad);
m_plotData.m_dataLHO[x] = 0.8 * out.amp[1] * freq * freq * sin((freq*(x + dx[1]) + out.phase[1]) * deg2rad);
m_plotData.m_dataVirgo[x] = 0.8 * out.amp[2] * freq * freq * sin((freq*(x + dx[2]) + out.phase[2]) * deg2rad);
m_plotData.m_dataLLO[x] = 0.8 * out.amp[0] * freq * freq * sin((freq*0.5*(x + dx[0]) + out.phase[0]) * deg2rad);
m_plotData.m_dataLHO[x] = 0.8 * out.amp[1] * freq * freq * sin((freq*0.5*(x + dx[1]) + out.phase[1]) * deg2rad);
m_plotData.m_dataVirgo[x] = 0.8 * out.amp[2] * freq * freq * sin((freq*0.5*(x + dx[2]) + out.phase[2]) * deg2rad);
}
m_plotData.m_ampLLO = out.amp[0];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment