diff --git a/src/plotdata.cpp b/src/plotdata.cpp index 377b916ed0100c4b69fed1d11d66a66dbb068500..0ddaee2f392b1b3b8c9674e42921660797e1f55f 100644 --- a/src/plotdata.cpp +++ b/src/plotdata.cpp @@ -3,9 +3,13 @@ PlotData::PlotData() : m_dataLHO(360*PERIODS, 0.0), m_dataLLO(360*PERIODS, 0.0), - m_dataVirgo(360*PERIODS, 0.0) + m_dataVirgo(360*PERIODS, 0.0), + m_dataKAGRA(360*PERIODS, 0.0), + m_dataLI(360*PERIODS, 0.0) { m_colorLHO = "blue"; m_colorLLO = "red"; m_colorVirgo = "green"; + m_colorKAGRA = "yellow"; + m_colorLI = "purple"; } diff --git a/src/plotdata.h b/src/plotdata.h index 0001ee5558dbea65f7924fb61f4076b181abc2a1..f778118f02531c0e3a9c85572c7e395a688ce9d5 100644 --- a/src/plotdata.h +++ b/src/plotdata.h @@ -18,22 +18,32 @@ public: QVector<double> m_dataLHO; QVector<double> m_dataLLO; QVector<double> m_dataVirgo; + QVector<double> m_dataKAGRA; + QVector<double> m_dataLI; double m_ampLHO; double m_ampLLO; double m_ampVirgo; + double m_ampKAGRA; + double m_ampLI; double m_phiLHO; double m_phiLLO; double m_phiVirgo; + double m_phiKAGRA; + double m_phiLI; double m_dtLHO; double m_dtLLO; double m_dtVirgo; + double m_dtKAGRA; + double m_dtLI; QString m_colorLHO; QString m_colorLLO; QString m_colorVirgo; + QString m_colorKAGRA; + QString m_colorLI; }; #endif // PLOTDATA_H diff --git a/src/pulsaranimationwidget.cpp b/src/pulsaranimationwidget.cpp index c64108f8148b2e29edcc0ba27e67237dd9cae7cc..0c02de04189e4cab3cba6b67ed19bd4cd0195bf9 100644 --- a/src/pulsaranimationwidget.cpp +++ b/src/pulsaranimationwidget.cpp @@ -60,6 +60,10 @@ PulsarAnimationWidget::PulsarAnimationWidget(QWidget *parent) : m_quadricSourcePlaneNormalCenter = NULL; m_quadricLHOv = NULL; m_quadricLHOh = NULL; + m_quadricKAGRAv = NULL; + m_quadricKAGRAh = NULL; + m_quadricLIv = NULL; + m_quadricLIh = NULL; // initialize texture pointers m_beamTexture = 0; @@ -68,6 +72,8 @@ PulsarAnimationWidget::PulsarAnimationWidget(QWidget *parent) : m_LHOAngle = 0; m_LLOAngle = 0; m_VirgoAngle = 0; + m_KAGRAAngle = 0; + m_LIAngle = 0; m_sourceIota = 0.0; m_sourceInclination = 0; @@ -102,6 +108,10 @@ PulsarAnimationWidget::~PulsarAnimationWidget() if(m_quadricSourcePlaneNormalCenter) gluDeleteQuadric(m_quadricSourcePlaneNormalCenter); if(m_quadricLHOv) gluDeleteQuadric(m_quadricLHOv); if(m_quadricLHOh) gluDeleteQuadric(m_quadricLHOh); + if(m_quadricKAGRAv) gluDeleteQuadric(m_quadricKAGRAv); + if(m_quadricKAGRAh) gluDeleteQuadric(m_quadricKAGRAh); + if(m_quadricLIv) gluDeleteQuadric(m_quadricLIv); + if(m_quadricLIh) gluDeleteQuadric(m_quadricLIh); } void PulsarAnimationWidget::initializeGL() @@ -145,6 +155,10 @@ void PulsarAnimationWidget::initializeGL() m_quadricSourcePlaneNormalCenter = gluNewQuadric(); m_quadricLHOv = gluNewQuadric(); m_quadricLHOh = gluNewQuadric(); + m_quadricKAGRAv = gluNewQuadric(); + m_quadricKAGRAh = gluNewQuadric(); + m_quadricLIv = gluNewQuadric(); + m_quadricLIh = gluNewQuadric(); gluQuadricNormals(m_quadricVirgoh, GLU_SMOOTH); gluQuadricNormals(m_quadricVirgov, GLU_SMOOTH); @@ -157,6 +171,10 @@ void PulsarAnimationWidget::initializeGL() gluQuadricNormals(m_quadricSourcePlaneNormalCenter, GLU_SMOOTH); gluQuadricNormals(m_quadricLHOv, GLU_SMOOTH); gluQuadricNormals(m_quadricLHOh, GLU_SMOOTH); + gluQuadricNormals(m_quadricKAGRAh, GLU_SMOOTH); + gluQuadricNormals(m_quadricKAGRAv, GLU_SMOOTH); + gluQuadricNormals(m_quadricLIh, GLU_SMOOTH); + gluQuadricNormals(m_quadricLIv, GLU_SMOOTH); // query max texture size (estimate) GLint maxTextureSize; @@ -352,6 +370,66 @@ void PulsarAnimationWidget::paintGL() } glPopMatrix(); + // draw KAGRA + glPushMatrix(); + { + glColor3f(1.0f, 1.0f, 1.0f); + + glRotatef(137.3058, 0.0, 1.0, 0.0); + glRotatef(-(36.4119), 1.0, 0.0, 0.0); + + glTranslatef(0.0, 0.0, m_earthRadius); + + glRotatef(m_KAGRAAngle+90 + 25, 0.0, 0.0, 1.0); + glPushMatrix(); + { + glRotatef(90, 0.0, 1.0, 0.0); + gluCylinder(m_quadricKAGRAh, 0.020, 0.020, 0.40, 32, 1); + } + glPopMatrix(); + + glPushMatrix(); + { + glRotatef(90, 0.0, 1.0, 0.0); + glRotatef(90, 1.0, 0.0, 0.0); + glColor3f(1.0f, 1.0f, 0.0f); + gluCylinder(m_quadricKAGRAv, 0.020, 0.020, 0.40, 32, 1); + } + glPopMatrix(); + } + glPopMatrix(); + + // draw LIGO-Infa + // position and orientation taken from fig. 17 of + // http://iopscience.iop.org/article/10.1088/0264-9381/30/15/155004#cqg460254s2 + glPushMatrix(); + { + glColor3f(1.0f, 1.0f, 1.0f); + + glRotatef(77.76, 0.0, 1.0, 0.0); + glRotatef(-(10.02), 1.0, 0.0, 0.0); + + glTranslatef(0.0, 0.0, m_earthRadius); + + glRotatef(m_LIAngle+180 + 58.2, 0.0, 0.0, 1.0); + glPushMatrix(); + { + glRotatef(90, 0.0, 1.0, 0.0); + gluCylinder(m_quadricLIh, 0.020, 0.020, 0.40, 32, 1); + } + glPopMatrix(); + + glPushMatrix(); + { + glRotatef(90, 0.0, 1.0, 0.0); + glRotatef(90, 1.0, 0.0, 0.0); + glColor3f(1.0f, 0.0f, 1.0f); + gluCylinder(m_quadricLIv, 0.020, 0.020, 0.40, 32, 1); + } + glPopMatrix(); + } + glPopMatrix(); + // draw source glPushMatrix(); { @@ -566,6 +644,22 @@ void PulsarAnimationWidget::setVirgoAngle(const int degrees) updateGL(); } +void PulsarAnimationWidget::setKAGRAAngle(const int degrees) +{ + m_KAGRAAngle = degrees; + updatePulseProfile(); + + updateGL(); +} + +void PulsarAnimationWidget::setLIAngle(const int degrees) +{ + m_LIAngle = degrees; + updatePulseProfile(); + + updateGL(); +} + void PulsarAnimationWidget::setSourceIota(const int degrees) { m_sourceIota = degrees; @@ -608,6 +702,8 @@ void PulsarAnimationWidget::updatePulseProfile() in.orientation[0] = m_LLOAngle; in.orientation[1] = m_LHOAngle; in.orientation[2] = m_VirgoAngle; + in.orientation[3] = m_KAGRAAngle; + in.orientation[4] = m_LIAngle; // get actual detector data get_antenna(&out, &in); @@ -623,9 +719,9 @@ void PulsarAnimationWidget::updatePulseProfile() // 360*out.dt/(freq0*30ms). double freq0 = 1.0/pow(1.1,0.375); - double dx[3]; + double dx[5]; - for (int i=0; i<3; i++) dx[i]=360*out.dt[i]/(30.0*freq0); + for (int i=0; i<5; i++) dx[i]=360*out.dt[i]/(30.0*freq0); for(int x = 0; x < 360*PERIODS; ++x) { double t=x/(PERIODS*360.0); @@ -633,19 +729,27 @@ void PulsarAnimationWidget::updatePulseProfile() m_plotData.m_dataLLO[x] = 0.8 * out.amp[0] * freq * freq * sin((freq*(x + dx[0]) + 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_dataKAGRA[x] = 0.8 * out.amp[3] * freq * freq * sin((freq*(x + dx[3]) + out.phase[3]) * deg2rad); + m_plotData.m_dataLI[x] = 0.8 * out.amp[4] * freq * freq * sin((freq*(x + dx[4]) + out.phase[4]) * deg2rad); } m_plotData.m_ampLLO = out.amp[0]; m_plotData.m_ampLHO = out.amp[1]; m_plotData.m_ampVirgo = out.amp[2]; + m_plotData.m_ampKAGRA = out.amp[3]; + m_plotData.m_ampLI = out.amp[4]; m_plotData.m_phiLLO = out.phase[0]; m_plotData.m_phiLHO = out.phase[1]; m_plotData.m_phiVirgo = out.phase[2]; + m_plotData.m_phiKAGRA = out.phase[3]; + m_plotData.m_phiLI = out.phase[4]; m_plotData.m_dtLLO = out.dt[0]; m_plotData.m_dtLHO = out.dt[1]; m_plotData.m_dtVirgo = out.dt[2]; + m_plotData.m_dtKAGRA = out.dt[3]; + m_plotData.m_dtLI = out.dt[4]; // propagate new plot data emit pulseProfileUpdated(m_plotData); diff --git a/src/pulsaranimationwidget.h b/src/pulsaranimationwidget.h index a73db47a90ac11c3cd6a6655aa0b487335c5e3cf..9877d18d4b6c85c0f3b276faa9bb4586b067bc24 100644 --- a/src/pulsaranimationwidget.h +++ b/src/pulsaranimationwidget.h @@ -50,6 +50,8 @@ public: void setLHOAngle(const double degrees); void setLLOAngle(const double degrees); void setVirgoAngle(const int degrees); + void setKAGRAAngle(const int degrees); + void setLIAngle(const int degrees); void setSourceIota(const int degrees); void setSourceInclination(const double length); void getCameraPosition(double& cameraAngleH, double& cameraAngleV, double& cameraZoom); @@ -82,6 +84,10 @@ private: GLUquadricObj *m_quadricSourcePlaneNormalCenter; GLUquadricObj *m_quadricLHOv; GLUquadricObj *m_quadricLHOh; + GLUquadricObj *m_quadricKAGRAv; + GLUquadricObj *m_quadricKAGRAh; + GLUquadricObj *m_quadricLIv; + GLUquadricObj *m_quadricLIh; GLuint m_beamTexture; @@ -89,6 +95,8 @@ private: double m_LHOAngle; double m_LLOAngle; double m_VirgoAngle; + double m_KAGRAAngle; + double m_LIAngle; double m_sourceIota; double m_sourceInclination; diff --git a/src/pulsatingscience.cpp b/src/pulsatingscience.cpp index 7466884d4d12f1a29ae64d1eae2e203780d2153c..157203f33b167f431e2664c0be2817a8bca2c338 100644 --- a/src/pulsatingscience.cpp +++ b/src/pulsatingscience.cpp @@ -151,6 +151,18 @@ void PulsatingScience::on_sliderVirgoAngle_valueChanged(int value) ui.lcdVirgoAngle->display(QString::number(value)); } +void PulsatingScience::on_sliderKAGRAAngle_valueChanged(int value) +{ + ui.pulsarGlWidget->setKAGRAAngle(value); + ui.lcdKAGRAAngle->display(QString::number(value)); +} + +void PulsatingScience::on_sliderLIAngle_valueChanged(int value) +{ + ui.pulsarGlWidget->setLIAngle(value); + ui.lcdLIAngle->display(QString::number(value)); +} + void PulsatingScience::on_sliderSourceIota_valueChanged(int value) { ui.pulsarGlWidget->setSourceIota(value); @@ -359,6 +371,8 @@ void PulsatingScience::updateAmplitudes(const PlotData& data) { ui.lcdAmpLHO->display(s.sprintf("%.2f", data.m_ampLHO)); ui.lcdAmpLLO->display(s.sprintf("%.2f", data.m_ampLLO)); ui.lcdAmpVirgo->display(s.sprintf("%.2f", data.m_ampVirgo)); + ui.lcdAmpKAGRA->display(s.sprintf("%.2f", data.m_ampKAGRA)); + ui.lcdAmpLI->display(s.sprintf("%.2f", data.m_ampLI)); } void PulsatingScience::saveOrRestoreInitialAnimationSettings() @@ -368,6 +382,8 @@ void PulsatingScience::saveOrRestoreInitialAnimationSettings() static int sliderLHOAngle; static int sliderLLOAngle; static int sliderVirgoAngle; + static int sliderKAGRAAngle; + static int sliderLIAngle; static int sliderSourceIota; static int sliderSourceInclination; @@ -381,6 +397,8 @@ void PulsatingScience::saveOrRestoreInitialAnimationSettings() ui.sliderLLOAngle->setValue(sliderLLOAngle); ui.sliderSourceIota->setValue(sliderSourceIota); ui.sliderVirgoAngle->setValue(sliderVirgoAngle); + ui.sliderKAGRAAngle->setValue(sliderKAGRAAngle); + ui.sliderLIAngle->setValue(sliderLIAngle); ui.sliderSourceInclination->setValue(sliderSourceInclination); ui.pulsarGlWidget->resetCameraPosition(cameraAngleH, cameraAngleV, cameraZoom); } @@ -390,6 +408,8 @@ void PulsatingScience::saveOrRestoreInitialAnimationSettings() sliderLLOAngle = ui.sliderLLOAngle->value(); sliderSourceIota = ui.sliderSourceIota->value(); sliderVirgoAngle = ui.sliderVirgoAngle->value(); + sliderKAGRAAngle = ui.sliderKAGRAAngle->value(); + sliderLIAngle = ui.sliderLIAngle->value(); sliderSourceInclination = ui.sliderSourceInclination->value(); ui.pulsarGlWidget->getCameraPosition(cameraAngleH, cameraAngleV, cameraZoom); initialized = true; diff --git a/src/pulsatingscience.h b/src/pulsatingscience.h index e79dd314d50a207e251f9c14fac39ee4afeba559..dfb9a1054ab6715f2ba3f89c1bd917988083f124 100644 --- a/src/pulsatingscience.h +++ b/src/pulsatingscience.h @@ -42,6 +42,8 @@ public slots: void on_sliderLHOAngle_valueChanged(int value); void on_sliderLLOAngle_valueChanged(int value); void on_sliderVirgoAngle_valueChanged(int value); + void on_sliderKAGRAAngle_valueChanged(int value); + void on_sliderLIAngle_valueChanged(int value); void on_sliderSourceIota_valueChanged(int value); void on_sliderSourceInclination_valueChanged(int value); diff --git a/src/pulsatingscience.ui b/src/pulsatingscience.ui index 54ecbdfe832f5a357432c6a0d2b761fc1ba0d34e..72b51e8b4bee1453e205a075a1874b639f8fb1e8 100644 --- a/src/pulsatingscience.ui +++ b/src/pulsatingscience.ui @@ -73,15 +73,24 @@ <layout class="QGridLayout" name="gridLayout_3"> <item row="1" column="0"> <layout class="QGridLayout" name="gridLayout_2"> - <item row="1" column="5"> - <widget class="QLabel" name="label_10"> - <property name="text"> - <string>A:</string> + <item row="2" column="4"> + <spacer name="horizontalSpacer_3"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> </property> - </widget> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> </item> - <item row="3" column="5"> - <widget class="QLabel" name="label_11"> + <item row="1" column="5"> + <widget class="QLabel" name="label_10"> <property name="text"> <string>A:</string> </property> @@ -94,13 +103,6 @@ </property> </widget> </item> - <item row="3" column="3"> - <widget class="QLabel" name="label_7"> - <property name="text"> - <string>deg</string> - </property> - </widget> - </item> <item row="1" column="2"> <widget class="QLCDNumber" name="lcdLLOAngle"> <property name="digitCount"> @@ -130,7 +132,7 @@ </property> </spacer> </item> - <item row="5" column="2"> + <item row="6" column="2"> <widget class="QLCDNumber" name="lcdSourceInclination"> <property name="digitCount"> <number>6</number> @@ -159,14 +161,14 @@ </property> </spacer> </item> - <item row="4" column="3"> + <item row="5" column="3"> <widget class="QLabel" name="label_6"> <property name="text"> <string>deg</string> </property> </widget> </item> - <item row="4" column="2"> + <item row="5" column="2"> <widget class="QLCDNumber" name="lcdSourceIota"> <property name="digitCount"> <number>6</number> @@ -179,7 +181,7 @@ </property> </widget> </item> - <item row="5" column="1"> + <item row="6" column="1"> <widget class="QSlider" name="sliderSourceInclination"> <property name="statusTip"> <string>Use this slider to adjust the longitude (psi) of the binary system's orbital ascending node</string> @@ -204,25 +206,6 @@ </property> </widget> </item> - <item row="3" column="1"> - <widget class="QSlider" name="sliderVirgoAngle"> - <property name="statusTip"> - <string>Use this slider to rotate Virgo away from its actual orientation. The meter on the far right shows the relative Virgo strain amplitude.</string> - </property> - <property name="maximum"> - <number>360</number> - </property> - <property name="value"> - <number>0</number> - </property> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="tickPosition"> - <enum>QSlider::TicksBelow</enum> - </property> - </widget> - </item> <item row="0" column="2"> <widget class="QLCDNumber" name="lcdLHOAngle"> <property name="digitCount"> @@ -243,29 +226,13 @@ </property> </widget> </item> - <item row="4" column="0"> + <item row="5" column="0"> <widget class="QLabel" name="label_5"> <property name="text"> <string>Source: iota</string> </property> </widget> </item> - <item row="3" column="2"> - <widget class="QLCDNumber" name="lcdVirgoAngle"> - <property name="digitCount"> - <number>6</number> - </property> - <property name="segmentStyle"> - <enum>QLCDNumber::Flat</enum> - </property> - <property name="value" stdset="0"> - <double>0.000000000000000</double> - </property> - <property name="intValue" stdset="0"> - <number>0</number> - </property> - </widget> - </item> <item row="0" column="1"> <widget class="QSlider" name="sliderLHOAngle"> <property name="statusTip"> @@ -291,22 +258,6 @@ </property> </widget> </item> - <item row="3" column="4"> - <spacer name="horizontalSpacer_3"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Fixed</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> <item row="0" column="3"> <widget class="QLabel" name="label_13"> <property name="text"> @@ -314,13 +265,6 @@ </property> </widget> </item> - <item row="3" column="0"> - <widget class="QLabel" name="label_4"> - <property name="text"> - <string><html><head/><body><p><span style=" color:#009900;">Virgo Orientation</span></p></body></html></string> - </property> - </widget> - </item> <item row="1" column="3"> <widget class="QLabel" name="label_8"> <property name="text"> @@ -335,7 +279,7 @@ </property> </widget> </item> - <item row="4" column="1"> + <item row="5" column="1"> <widget class="QSlider" name="sliderSourceIota"> <property name="statusTip"> <string>Use this slider to adjust the orbital plane inclination angle (iota) of the binary system</string> @@ -391,14 +335,14 @@ </property> </widget> </item> - <item row="5" column="3"> + <item row="6" column="3"> <widget class="QLabel" name="label_9"> <property name="text"> <string>deg</string> </property> </widget> </item> - <item row="5" column="0"> + <item row="6" column="0"> <widget class="QLabel" name="label_3"> <property name="text"> <string>Source: psi</string> @@ -431,7 +375,31 @@ </property> </widget> </item> + <item row="3" column="2"> + <widget class="QLCDNumber" name="lcdKAGRAAngle"/> + </item> <item row="3" column="6"> + <widget class="QLCDNumber" name="lcdAmpKAGRA"> + <property name="statusTip"> + <string>Relative strain amplitude of KAGRA</string> + </property> + <property name="styleSheet"> + <string notr="true">color:rgb(200, 200, 0) +</string> + </property> + <property name="digitCount"> + <number>4</number> + </property> + </widget> + </item> + <item row="3" column="5"> + <widget class="QLabel" name="label_16"> + <property name="text"> + <string>A:</string> + </property> + </widget> + </item> + <item row="2" column="6"> <widget class="QLCDNumber" name="lcdAmpVirgo"> <property name="statusTip"> <string>Relative strain amplitude of Virgo</string> @@ -444,6 +412,177 @@ </property> </widget> </item> + <item row="3" column="3"> + <widget class="QLabel" name="label_15"> + <property name="text"> + <string>deg</string> + </property> + </widget> + </item> + <item row="2" column="3"> + <widget class="QLabel" name="label_7"> + <property name="text"> + <string>deg</string> + </property> + </widget> + </item> + <item row="3" column="1"> + <widget class="QSlider" name="sliderKAGRAAngle"> + <property name="statusTip"> + <string>Use this slider to rotate KAGRA away from its actual orientation. The meter on the far right shows the relative KAGRA strain amplitude.</string> + </property> + <property name="maximum"> + <number>360</number> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="tickPosition"> + <enum>QSlider::TicksBelow</enum> + </property> + </widget> + </item> + <item row="3" column="0"> + <widget class="QLabel" name="label_14"> + <property name="text"> + <string><html><head/><body><p><span style=" color:#c8c800;">KAGRA Orientation</span></p></body></html></string> + </property> + </widget> + </item> + <item row="2" column="0"> + <widget class="QLabel" name="label_4"> + <property name="text"> + <string><html><head/><body><p><span style=" color:#009900;">Virgo Orientation</span></p></body></html></string> + </property> + </widget> + </item> + <item row="2" column="5"> + <widget class="QLabel" name="label_11"> + <property name="text"> + <string>A:</string> + </property> + </widget> + </item> + <item row="2" column="1"> + <widget class="QSlider" name="sliderVirgoAngle"> + <property name="statusTip"> + <string>Use this slider to rotate Virgo away from its actual orientation. The meter on the far right shows the relative Virgo strain amplitude.</string> + </property> + <property name="maximum"> + <number>360</number> + </property> + <property name="value"> + <number>0</number> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="tickPosition"> + <enum>QSlider::TicksBelow</enum> + </property> + </widget> + </item> + <item row="2" column="2"> + <widget class="QLCDNumber" name="lcdVirgoAngle"> + <property name="digitCount"> + <number>6</number> + </property> + <property name="segmentStyle"> + <enum>QLCDNumber::Flat</enum> + </property> + <property name="value" stdset="0"> + <double>0.000000000000000</double> + </property> + <property name="intValue" stdset="0"> + <number>0</number> + </property> + </widget> + </item> + <item row="4" column="0"> + <widget class="QLabel" name="label_17"> + <property name="text"> + <string><html><head/><body><p><span style=" color:#ff00ff;">LIGO-India Orientation</span></p></body></html></string> + </property> + </widget> + </item> + <item row="4" column="3"> + <widget class="QLabel" name="label_18"> + <property name="text"> + <string>deg</string> + </property> + </widget> + </item> + <item row="4" column="5"> + <widget class="QLabel" name="label_19"> + <property name="text"> + <string>A:</string> + </property> + </widget> + </item> + <item row="4" column="2"> + <widget class="QLCDNumber" name="lcdLIAngle"/> + </item> + <item row="4" column="6"> + <widget class="QLCDNumber" name="lcdAmpLI"> + <property name="statusTip"> + <string>Relative strain amplitude of LIGO-India</string> + </property> + <property name="styleSheet"> + <string notr="true">color:rgb(255, 0, 255)</string> + </property> + <property name="digitCount"> + <number>4</number> + </property> + </widget> + </item> + <item row="4" column="1"> + <widget class="QSlider" name="sliderLIAngle"> + <property name="statusTip"> + <string>Use this slider to rotate LIGO-India away from its actual orientation. The meter on the far right shows the relative LIGO-India strain amplitude.</string> + </property> + <property name="maximum"> + <number>360</number> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="tickPosition"> + <enum>QSlider::TicksBelow</enum> + </property> + </widget> + </item> + <item row="3" column="4"> + <spacer name="horizontalSpacer_4"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item row="4" column="4"> + <spacer name="horizontalSpacer_5"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> </layout> </item> </layout> diff --git a/src/pulsescopewidget.cpp b/src/pulsescopewidget.cpp index 8de8ae650e9383e71a6ab855e4e5086207118b1f..6ce8875f5e3ea35150e123e81d322d4e545e74bc 100644 --- a/src/pulsescopewidget.cpp +++ b/src/pulsescopewidget.cpp @@ -55,6 +55,8 @@ PulseScopeWidget::PulseScopeWidget(QWidget *parent) : QGraphicsView(parent), m_pathLHO = NULL; m_pathLLO = NULL; m_pathVirgo = NULL; + m_pathKAGRA = NULL; + m_pathLI = NULL; m_xAxis = m_scene.addLine(0.0, m_scopeSizeV/2.0, m_scopeSizeH, m_scopeSizeV/2.0, QPen(QBrush(QColor("white")), 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); m_xAxis->setZValue(1); @@ -87,20 +89,28 @@ void PulseScopeWidget::plot(const PlotData& data) QPainterPath pulsePathLHO(QPointF(0.0, m_scopeSizeV - data.m_dataLHO.at(0)*m_scaling - m_scopeSizeV/2.0)); QPainterPath pulsePathLLO(QPointF(0.0, m_scopeSizeV - data.m_dataLLO.at(0)*m_scaling - m_scopeSizeV/2.0)); QPainterPath pulsePathVirgo(QPointF(0.0, m_scopeSizeV - data.m_dataVirgo.at(0)*m_scaling - m_scopeSizeV/2.0)); + QPainterPath pulsePathKAGRA(QPointF(0.0, m_scopeSizeV - data.m_dataKAGRA.at(0)*m_scaling - m_scopeSizeV/2.0)); + QPainterPath pulsePathLI(QPointF(0.0, m_scopeSizeV - data.m_dataLI.at(0)*m_scaling - m_scopeSizeV/2.0)); for(int i = 1; i < m_scopeSizeH; ++i) { pulsePathLHO.lineTo(i, m_scopeSizeV - data.m_dataLHO.at(i)*m_scaling - m_scopeSizeV/2.0); pulsePathLLO.lineTo(i, m_scopeSizeV - data.m_dataLLO.at(i)*m_scaling - m_scopeSizeV/2.0); pulsePathVirgo.lineTo(i, m_scopeSizeV - data.m_dataVirgo.at(i)*m_scaling - m_scopeSizeV/2.0); + pulsePathKAGRA.lineTo(i, m_scopeSizeV - data.m_dataKAGRA.at(i)*m_scaling - m_scopeSizeV/2.0); + pulsePathLI.lineTo(i, m_scopeSizeV - data.m_dataLI.at(i)*m_scaling - m_scopeSizeV/2.0); } if(m_pathLHO == NULL) { m_pathLHO = m_scene.addPath(pulsePathLHO, QPen(QBrush(QColor(data.m_colorLHO)), 3, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); m_pathLLO = m_scene.addPath(pulsePathLLO, QPen(QBrush(QColor(data.m_colorLLO)), 3, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); m_pathVirgo = m_scene.addPath(pulsePathVirgo, QPen(QBrush(QColor(data.m_colorVirgo)), 3, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); + m_pathKAGRA = m_scene.addPath(pulsePathKAGRA, QPen(QBrush(QColor(data.m_colorKAGRA)), 3, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); + m_pathLI = m_scene.addPath(pulsePathLI, QPen(QBrush(QColor(data.m_colorLI)), 3, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); } else { m_pathLHO->setPath(pulsePathLHO); m_pathLLO->setPath(pulsePathLLO); m_pathVirgo->setPath(pulsePathVirgo); + m_pathKAGRA->setPath(pulsePathKAGRA); + m_pathLI->setPath(pulsePathLI); } } diff --git a/src/pulsescopewidget.h b/src/pulsescopewidget.h index 18b986b6fd31d6f33e5343c3a5f807366f0378cc..d4ef0bfab93d1607a15c8e5537743b7860fce4f9 100644 --- a/src/pulsescopewidget.h +++ b/src/pulsescopewidget.h @@ -52,6 +52,8 @@ private: QGraphicsPathItem *m_pathLHO; QGraphicsPathItem *m_pathLLO; QGraphicsPathItem *m_pathVirgo; + QGraphicsPathItem *m_pathKAGRA; + QGraphicsPathItem *m_pathLI; QGraphicsLineItem *m_xAxis; double m_scopeSizeH;