Software development for upcoming FM-RU tests

1 Overall design

  • Suitable classes for test and receivers:
    • Setting600GHz, a class to handle a setting for the 600 GHz receiver, including validation
    • Setting1200GHz, ditto for the 1200 GHz receiver
    • Receiver, a general class for representing a receiver with methods to control the FDM
    • SWI600GHz, a class derived from Receiver to represent the 600 GHz receiver
    • SWI1200GHz, ditto for the 1200 GHz receiver
    • ReceiverTest, from which all other tests derive
  • The ReceiverTest class has a work method which takes three functions as parameters:
    • a generator function to yield settings for the 600 GHz receiver, i.e. every time this function is called it returns a tuple (RF frequency, RF power, MPA TTL setting, doubler TTL setting, doubler bias, etc), one at a time. These could come from a file, a database, an algorithm, etc.
    • ditto for the 1200 GHz receiver, where of course the tuple has a few more parameters
    • a measurement function, which would be called for each setting and typically takes power readings or takes spectra using the ACS
  • For each of the tests we want to do, we derive a test from the ReceiverTest class. We define two methods to generate the settings for the 600 and/or 1200 GHz receivers and override the work function with the specific test we want to carry out. Override the measure function if necessary. So work would
    • check if there are more 600 GHz settings, if yes tune the receiver to that setting
    • check if there are more 1200 GHz settings, if yes tune the receiver to that setting
    • perform the measurement, e.g. move mirrors, etc and return a result (power reading, noise temperature, spectrum, …) for each of the two receivers which returned a valid setting.
    • when all settings for both receivers have been exhausted, return
  • The framework makes heavy use of Pythons logging facility, with INFO, WARNING and ERROR messages generated by the test class and additional DEBUG messages generated by low level hardware control routines. This is easily configurable: where should messages go (file, terminal or both) and which level do we want to see (e.g. show DEBUG messages or not).
    • Data for further analysis is logged by the work routine with a particular DATA keyword. That way data are always stored in the context of all messages, but can trivially be extracted by running grep DATA on the logfile.
  • All hardare access is collected in an instrument module, with individual python modules for each instrument. These modules can typically be run stand-alone to do a quick functional test of that instrument.
  • All instrument modules also exist in a form where they don't actually access any hardware, this allows to run the test software in a kind of fake mode to check for programming errors and check control flow. (These "fake" modules are currently not in the repository)
  • All python modules follow PEP8 style guide and are syntax checked using pylint.

2 DONE TTL control

  • the code in raspy.py has been altered to now offer additional group of bits to control 2 x MPA079, 2 x FRM158 and 1 SHM for the tuning of the 1200 GHz receiver. I propose the following:
      TTL-1 TTL-2 TTL-3
      bit 0 bit 1 bit 2
    MPA079600 GPIO17 GPIO27 GPIO22
    FRM158600 GPIO25 GPIO8 GPIO7
    EGSESHM GPIO16 GPIO20 GPIO21
    PCA0791200A GPIO2 GPIO3 GPIO4
    PCA0791200B GPIO10 GPIO9 GPIO11
    FRM1581200A GPIO13 GPIO19 GPIO26
    FRM1581200B GPIO14 GPIO15 GPIO18
  • [X] waiting for confirmation that the necessary connections have been made

3 DONE IP addresses

  • We need to confirm/update the following table:
    instrument address comment
    laptop 192.168.56.2 also on 134.76.237.86
    Raspberry Pi 192.168.56.5  
    Phytron PhyMotion controller 192.168.56.20 MPI flip mirror
    Keithley source meter 192.168.56.31 600 GHz Rx, 300 GHz doubler
    Keithley source meter 192.168.56.42 1200 GHz Rx, 300 GHz doubler
    Keithley source meter 192.168.56.44 1200 GHz Rx, 600 GHz doubler
    Keithley source meter 192.168.56.45 1200 GHz Rx, batter replacement
    Lakeshore temperature logger 192.168.56.41  
    NRP33SN power sensor 192.168.56.43 600 GHz Rx
    NRP33SN power sensor 192.168.56.54 1200 GHz Rx
    R&S SMF100A signal generator 192.168.56.100  
    R&S FSP40 spectrum analyzer 192.168.56.101  
    Phytron MCC1 controller 192.168.56.110 RU flip mirror
    R&S HMP4040 power supply 192.168.56.107 SHM regulator inhibit
    R&S HMP4040 power supply 192.168.56.108 FDM current
    R&S HMP4040 power supply 192.168.56.???  
    R&S HMP4040 power supply 192.168.56.???  
  • [X] waiting for update on addresses

4 DONE Receiver test framework

  • [X] receiver switch on
  • [X] receiver switch on
  • [X] receiver tune
  • [X] power measurement
  • [X] take ACS spectrum
  • [X] send ACS meta data
  • [X] flip mirrors
  • [X] MPI motor controller
  • [X] signal generator
  • [X] spectrum analyzer

5 Prerequisites

5.1 DONE FDM table power vs attenuator settings

  • [X] waiting for table from FDM characterization

5.2 DONE List of temperature sensors used during FM RU tests

channel unit name comment
A RU AMP1  
B RU MX1  
C1 RU AMP2  
C2 RU MX2  
C3 MPI H1F 1st hot load front
C4 MPI H2F 2nd hot load front
C5 MPI CF cold load front
D1 RU LNAX2  
D2 RU CHL  
D3 MPI H1B 1st hot load back
D4 MPI H2B 2nd hot load back
D5 MPI CB cold load back

Channels are listed in the order they are read by the Lakeshore temperature monitor.

  • [X] waiting for response from Ali

5.3 DONE Logging of temperatures via Lakeshore

  • MQTT broker set up on laptop, verify that it is running via
systemctl status mosquitto.service

If required, restart it via

sudo systemctl start mosquitto.service

The Lakeshore logging procedure will publish temperature readings under topic <unit>/<name>, where unit and name are taken from table 1, so e.g. the latest reading of the cold load front temperature would be available under topic MPI/CF.

  • [X] implement distribution via MQTT

5.4 TODO Logging of all HMP4040 power supplies

  • [ ] to be implemented

6 Functional/preparatory tests

6.1 DONE Full scan of flip mirror to confirm load positions

  • script: loadscan.py
  • temperature: 140 K
  • date: 20 October 2020
  • setup:
    • power meter
    • MPI flip mirror via phytron stepper motor
  • [X] measure routine
    • move MPI mirror in steps through full circle
    • measure power at each step
  • [X] generator 600 GHz: select one frequency with assumed good setting (from EM-2):
    • freq = 24.744375 # arbitraryly chosen in the mid of the frequency range
    • power = 7.18 # attenuator level to get 13.5dBm (530) power of fdmfreq
    • mpa = 0 # picked to get approx 2mW power of LO
    • frm = 2 # picked to get approx 2mW power of LO
    • bias = -2.4 # picked to get approx 2mW power of LO
  • [X] generator 1200 GHz: not used
  • [ ] analysis: fit positions of hot and cold load, update module Phytron.py with those values

6.2 DONE Functional test of TN measurement at one frequency setting for 600 GHz and 1200 GHz receiver

  • script: fmrutesting.py
  • temperature: 140 K
  • date: 20 October 2020
  • requires: updated values of hot and cold load positions from Full scan of flip mirror to confirm load positions
  • setup:
    • power meter
    • MPI flip mirror via phytron stepper motor
  • [X] measure routine
    • tune to receiver setting
    • move MPI mirror towards MPI cold load, measure power
    • move MPI mirror towards MPI hot load, measure power
    • calculate Y-factor and Trec of receiver
  • [X] generator 600 GHz: select one frequency with assumed good setting (from EM-2?)
    • freq = 24.744375 # arbitraryly chosen
  • [X] generator 1200 GHz: select one frequency with assumed good setting
    • freq = 23.358750 # arbitraryly chosen
  • [X] analysis: verify that routine works and is safe to use

6.3 DONE Receiver temperature optimization for eleven selected frequencies

  • script: optimization.py
  • temperature: 140 K
  • date: 20 October 2020
  • requires: updated values of hot and cold load positions from Full scan of flip mirror to confirm load positions
  • setup:
    • power meter
    • MPI flip mirror via phytron stepper motor
  • [X] measure routine
    • tune to receiver setting
    • move MPI mirror towards MPI cold load, measure power
    • move MPI mirror towards MPI hot load, measure power
    • calculate Y-factor and Trec of receiver
  • [X] generator 600 GHz
    • frequencies of FM LO scan which yield power between 0.5 and 4 mW with priority 1:
      1. 22.404375
      2. 22.490625
      3. 23.070000
      4. 23.233125
      5. 23.456250
      6. 23.604375
      7. 23.662500
      8. 23.761875
      9. 24.234375
      10. 24.746250
      11. 26.096250
  • [X] generator 1200 GHz
    • frequencies of LERMA table with priority 1, i.e. tune as close as possible to the following molecular lines:
      molecule fLO USB fLO LSB LERMA LSB df [MHz] LERMA USB df [MHz]
      H2-16O 1119343 1107343 23.31938 12.77 23.07188 107.23
      H2-18O 1107698 1095698 23.07188 248.02 22.82625 38.26
      HCN 1245895 1233895 25.95375 114.59 25.70625 5.41
      HCl 1257452 1245452 26.19750 28.07 25.95375 328.07
      CO 1273014 1261014 26.52188 35.75 26.27063 24.25
      CS 1130820 1118820 23.55938 29.76 23.31000 59.52
      H2-17O 1113167 1101167 23.19000 46.86 22.94063 16.62
      HDO 1223258 1211258 25.47750 338.25 25.23375 38.25
      NH3 1221246 1209246 25.43813 215.47 25.18875 185.71
      ClO 1171602 1159602 24.41063 108.01 24.14813 491.99
      CH4 1262067 1250067 26.29313 3.37 26.04375 33.12
  • [ ] analysis: produce table of optimum settings for all eleven frequencies probed. Decide if plan A still valid, else decide on strategy for plan B.

6.4 DONE Calibration of MPI hot load

  • temperature: 140 K
  • date: 20 October 2020
  • requires: optimum settings for 11 frequencies established in Receiver temperature optimization for eleven selected frequencies
  • setup:
    • power meter
    • MPI flip mirror via phytron stepper motor
    • RU flip mirror via phytron single axis controller
  • [X] measure routine
    • move MPI mirror towards MPI cold load, measure power
    • move MPI mirror towards MPI hot load, measure power
    • move RU mirror towards internal hot load, measure power
  • [X] generator 600 GHz, 11 frequencies with optimum settings from above
  • [X] generator 1200 GHz, 11 frequencies with optimum settings from above
  • [ ] analysis: calculate Y-factor and Trec of receiver based on MPI hot and RU hot, calculate brightness temperature of MPI cold load

7 Test suite

7.1 DONE Receiver temperature optimization

  • script: optimization.py with change of SELECT statement
  • temperature: 140 K
  • date: 20-26 October 2020
  • requires: updated brightness temperature of MPI hot load from Calibration of MPI hot load
  • setup:
    • power meter
    • MPI flip mirror via phytron stepper motor
  • [X] measure routine
    • tune to receiver setting
    • move MPI mirror towards MPI cold load, measure power
    • move MPI mirror towards MPI hot load, measure power
    • calculate Y-factor and Trec of receiver
  • [X] generator 600 GHz
    • frequencies of FM LO scan which yield power between 0.5 and 4 mW with priority 0
  • [ ] generator 1200 GHz
    • frequencies of LERMA table with priority 0
  • [ ] analysis: produce table of optimum settings for all frequencies probed, this should include second best and third best settings.

7.2 DONE Frequency Switch

  • script: frequencyswitch.py
  • temperature: 140 K
  • date: 27 October 2020
  • requires: optimum settings for all frequencies from Receiver temperature optimization, stored in tables optimum600 and optimum1200 in SQLITE database.
  • setup:
    • power meter(?)
    • ACS
    • MPI flip mirror via phytron stepper motor
    • signal generator (transmitter for 600 GHz in TVC), power level?
    • load temperatures Thot and Tcold readings via Lakeshore
  • [X] measure routine
    • tune to receiver setting
    • move MPI mirror towards MPI hot load, take ACS spectrum (measure power?) -> HOT
    • move MPI mirror towards MPI cold load, take ACS spectrum (measure power?) -> COLD
    • switch signal generator on, still on cold load take ACS spectrum -> SIG0
    • detune by -2 steps, take ACS spectrum (measure power?) -> SIG1
    • detune by -1 steps, take ACS spectrum (measure power?) -> SIG2
    • detune by +1 steps, take ACS spectrum (measure power?) -> SIG3
    • detune by +2 steps, take ACS spectrum (measure power?) -> SIG4
    • FDM attenuator needs to be ramped down/up at each detune
  • [X] generator 600 GHz
    • get settings from table optimum600, all frequencies
  • [X] generator 1200 GHz, similar to 600 GHz
    • get settings from table optimum1200, all frequencies
  • [ ] analysis: calculate calibrated spectra according to (Thot-Tcold)*(SIGn-COLD)/(HOT-COLD)

7.3 DONE Shadow bar measurement

  • date: 27 October 2020
  • setup:
    • power meter
    • phytron stepper motor
    • C663 motor controller
  • [X] measure routine
    • move MPI flip mirror in position
    • move to initial position of PI C663 (102 mm)
    • step through 102 mm, taking power readings after each step
    • step through 102 mm in reverse order, taking power readings after each step
    • repeat TBD times
  • [X] generator 600 GHz
    • select three frequencies from optimum600
  • [X] generator 1200 GHz
    • select three frequencies from optimum1200
  • [ ] analysis: determine beam-offsets in x and y direction

7.4 DONE Power output vs temperature

  • temperature cold receiver: 140 K - 180 K
  • temperature warm receiver: -20, 0, +20
  • date: 28-29 October
  • setup:
    • power meter
    • phytron stepper motor
    • access to Lakeshore temperature readings via MQTT
  • [X] measure routine
    • measure receiver noise temperatures at various temperatures of the cold and warm receiver
    • temperature changes to be controlled externally
  • [X] generator 600 GHz, all frequencies, 3 bias settings, i.e. priority -3 from table
  • [X] generator 1200 GHz, all frequencies, 3 bias settings, i.e. priority -3 from table
  • [ ] analysis: determine behaviour of receiver performance as function of temperature. Should priorities be re-assigned based on this?

7.5 DONE Receiver stability

  • temperature: 140 K
  • date: 30-31 October 2020
  • setup:
  • [X] measure routine
    • take sequence of ACS spectra for a duration of 2 hours
  • [X] generator 600 GHz, eleven frequencies
  • [X] generator 1200 GHz, eleven frequencies
  • [ ] analysis: determine receiver stability, Allan variance analysis

7.6 DONE Standing waves

  • temperature: 140 K
  • date: 01 November
  • setup:
    • MPI flip mirror via phytron stepper motor
    • RU flip mirror via phytron single axis controller
    • ACS
  • [X] measure routine
    • move MPI mirror towards MPI hot load, take ACS spectrum (measure power?) -> HOT
    • move MPI mirror towards MPI cold load, take ACS spectrum (measure power?) -> COLD
    • look at RU hot load, take ACS spectrum (measure power?) -> SIG
  • [X] generator 600 GHz, all frequencies
  • [X] generator 1200 GHz, all frequencies
  • [ ] analysis: look for standing wave patterns

7.7 Open TVC

  • date: 01-03 November
  • replace shadow bar with interferometer

7.8 DONE Sideband ratio (first 50 %)

  • temperature: 140 K
  • date: 03-05 November 2020
  • setup:
    • MPI flip mirror via phytron stepper motor
    • C663 motor controller
    • ACS
  • [X] measure routine
    • move MPI flip mirror in position
    • move to initial position of PI C663
    • step through TBD steps of the MPI and take ACS spectrum at each step
  • [X] generator 600 GHz, first half of all frequencies
  • [X] generator 1200 GHz, first half of all frequencies
  • [ ] analysis: from a matrix of all ACS spectra (columns = channels, rows = MPI steps), fit sideband ratio per channel based on interference pattern seen along each column.

7.9 DONE Spectral response of 600 GHz Rx

  • temperature: 140 K
  • date: 06 November 2020
  • setup:
    • R&S SMF100A signal generator (use with multiplication of 36 for 600 GHz band)
    • R&S FSP40 spectrum analyzer (do we set scanning parameters by hand?)
  • [X] measure routine
    • tune SMF100A 36th harmonics to IF centre (USB), 7 dBm max output power.
    • set scanning range of FSP40 to +-25MHz with 1 kHz resolution bandwidth around central peak (6 GHz)
    • repeat with test signal in LSB
  • [X] generator 600 GHz
    • all frequencies
  • [ ] analysis: determine spectral purity from spectraum analyzer traces

7.10 DONE Spurs of 600 GHz Rx

  • temperature: 140 K
  • date: 06 November 2020
  • setup:
    • R&S SMF100A signal generator (use with multiplication of 36 for 600 GHz band)
    • R&S FSP40 spectrum analyzer
  • [X] measure routine
    • set scanning range of FSP40 to 3-9 GHz, 100 kHz resolution
    • tune SMF100A 36th harmonics to IF centre (USB), 7 dBm max output power.
    • tune SMF100A 36th harmonics to IF centre +- 1 GHz
    • tune SMF100A 36th harmonics to IF centre +- 2 GHz
    • tune SMF100A 36th harmonics to IF centre +- 4 GHz
    • tune SMF100A 36th harmonics to IF centre +- 8 GHz
    • repeat with test signal in LSB?
  • [X] generator 600 GHz
    • all frequencies
  • [ ] analysis: determine spectral purity from spectraum analyzer traces

7.11 Open TVC

  • date: 07-08 November 2020
  • replace 600 GHz with 1200 GHz transmitter

7.12 DONE Sideband ratio (second 50 %)

  • temperature: 140 K
  • date: 08-10 November 2020
  • setup:
    • MPI flip mirror via phytron stepper motor
    • C663 motor controller
    • ACS
  • [X] measure routine
    • move MPI flip mirror in position
    • move to initial position of PI C663
    • step through TBD steps of the MPI and take ACS spectrum at each step
  • [X] generator 600 GHz, first half of all frequencies
  • [X] generator 1200 GHz, first half of all frequencies
  • [ ] analysis: from a matrix of all ACS spectra (columns = channels, rows = MPI steps), fit sideband ratio per channel based on interference pattern seen along each column.

7.13 DONE Spectral response of 1200 GHz Rx

  • temperature: 140 K
  • date: 11 November 2020
  • setup:
    • R&S SMF100A signal generator (use with multiplication of 54 for 1200 GHz band)
    • R&S FSP40 spectrum analyzer
  • [X] measure routine
    • tune SMF100A 36th harmonics to IF centre (USB), 7 dBm max output power.
    • set scanning range of FSP40 to +-25MHz with 1 kHz resolution bandwidth around central peak (6 GHz)
    • repeat with test signal in LSB
  • [X] generator 1200 GHz
    • all frequencies
  • [ ] analysis: determine spectral purity from spectraum analyzer traces

7.14 DONE Spurs of 1200 GHz Rx

  • temperature: 140 K
  • date: 11 November 2020
  • setup:
    • R&S SMF100A signal generator (use with multiplication of 54 for 600 GHz band)
    • R&S FSP40 spectrum analyzer
  • [X] measure routine
    • set scanning range of FSP40 to 3-9 GHz, 100 kHz resolution
    • tune SMF100A 36th harmonics to IF centre (USB), 7 dBm max output power.
    • tune SMF100A 36th harmonics to IF centre +- 1 GHz
    • tune SMF100A 36th harmonics to IF centre +- 2 GHz
    • tune SMF100A 36th harmonics to IF centre +- 4 GHz
    • tune SMF100A 36th harmonics to IF centre +- 8 GHz
    • repeat with test signal in LSB?
  • [X] generator 1200 GHz
    • all frequencies
  • [ ] analysis: determine spectral purity from spectraum analyzer traces