SEPIA
Software documentation for the APEX SEPIA receivers
dualsidebandmixer.h
Go to the documentation of this file.
1 /* Copyright 2017 Michael Olberg <michael.olberg@chalmers.se> */
2 #ifndef DUALSIDEBANDMIXER_H
3 #define DUALSIDEBANDMIXER_H
4 
5 #include <QGroupBox>
6 #include <qwt_plot.h>
7 #include <qwt_plot_curve.h>
8 #include <qwt_plot_zoomer.h>
9 #include <qwt_plot_panner.h>
10 #include <qwt_plot_picker.h>
11 
12 #include "mixer.h"
13 #include "lownoiseamplifier.h"
14 
23 class DualSidebandMixer : public QGroupBox
24 {
25  Q_OBJECT
26  Q_PROPERTY(bool expertMode READ expertMode WRITE setExpertMode)
27  Q_PROPERTY(bool tuned READ isTuned WRITE setTuned)
28 
29  public:
30  explicit DualSidebandMixer(Mixer::Polarization pol, QWidget *parent = 0);
31  void setCommanded(Mixer::Element sis, double mV);
32 
33  MixerElement *sis1() const { return m_SIS1; }
34  MixerElement *sis2() const { return m_SIS2; }
35  LowNoiseAmplifier *lna1() const { return m_LNA1; }
36  LowNoiseAmplifier *lna2() const { return m_LNA2; }
37 
38  bool expertMode() const { return m_expert; }
43  bool isTuned() const { return m_tuned; }
44 
45  signals:
46  void mixerTuning(Mixer::Polarization pol);
47  void mixerDeflux(Mixer::Polarization pol);
48 
49  public slots:
54  void reset();
55 
56  void tune();
57  void deflux();
58  void test(Mixer::Element sis);
59  void setBias(Mixer::Element sis, double V);
60  void setCurrent(Mixer::Element sis, double I);
61  void clearCurve(Mixer::Element sis);
62  void showCurve(Mixer::Element sis, QVector<double> x, QVector<double> y,
63  QVector<double> z, const QString &xlab, const QString &ylab);
64  void setExpertMode(bool flag);
70  void setTuned(bool flag);
71 
72 private:
73  MixerElement *m_SIS1;
74  MixerElement *m_SIS2;
75  LowNoiseAmplifier *m_LNA1;
76  LowNoiseAmplifier *m_LNA2;
77  QwtPlot *mixerPlot;
78  QwtPlotZoomer *zoomer;
79  QwtPlotPanner *panner;
80  QwtPlotPicker *picker;
81  QwtPlotCurve *mixer1curve;
82  QwtPlotCurve *mixer2curve;
83  QwtPlotCurve *mixer3curve;
84  QwtPlotCurve *mixer4curve;
85 
86  const Mixer::Polarization m_pol;
87  bool m_expert;
88  bool m_tuned;
89 };
90 
91 #endif // DUALSIDEBANDMIXER_H
void setTuned(bool flag)
Set mixer tuned status.
Definition: dualsidebandmixer.cpp:218
Polarization
An enumeration for the two polarizations.
Definition: constants.h:9
Element
An enumeration for the two mixer elements in each polarization.
Definition: constants.h:17
bool isTuned() const
Query if mixer is tuned.
Definition: dualsidebandmixer.h:43
A class to represent a 2SB mixer in the GUI.
Definition: dualsidebandmixer.h:23
void reset()
reset the widget after a band de-selection
Definition: dualsidebandmixer.cpp:223