-
Notifications
You must be signed in to change notification settings - Fork 0
Setup
This page explains how to set up the software and firmware to readout an MKID array. The process is summarized by the following flowchart. Each oval represents a program to run and each rectangle is a file output from one program that may be fed into the next program. See below for more detail on each program.

SegmentedSweep.vi interfaces with our network analyzer (Agilent E5071C). It has the network analyzer sweep through the entire range of frequencies where resonances are expected, which it divides into segments. The IQ values for each frequency are taken from the network analyzer and saved in a txt file. This is done once per feedline into the ADR.
The resulting wide sweep file starts with a 7 row header describing the data, then gives the data in the following 5 columns:
- Frequency
- I value
- Uncertainty in I value
- Q value
- Uncertainty in Q value
Each feedline's wide sweep file is then fed into WideAna.pro, which graphs the transmission and IQ velocity (distance from one data point to the next in the IQ plane) for each frequency segment. It guesses where resonances are based on the IQ velocity. The user then flips through the segments correcting the guesses.
This program outputs plots of all of the IQ data in a postscript file, and outputs the frequencies chosen by the user in the Approximate Resonant Frequency File. This file has 3 columns:
- Index
- Index of Frequency in wide sweep file corresponding to this resonant frequency
- Resonant Frequency More accurate resonant frequencies are chosen later.
We then put this file into distributeFreqsToRoaches.py. This program plots histograms of portions of the resonant frequency list that fit into the bandwidth that one roach board can handle (limited by sample rate of ADC). Judging from the histograms, we move the roach bandwidth windows around so that we cover as many frequencies as we can with our eight roach boards. This program writes out the resonant frequencies into eight separate files in the format that can be read by the Templar program.
The resulting eight Roach Freq/Atten files start with a one line header, which contains a value used to calculate a suggested IF board attenuation for that roach. The rest of the file contains four columns:
- Resonant Frequency
- I coordinate of IQ loop center (no longer used)
- Q coordinate of IQ loop center (no longer used)
- Attenuation relative to other resonators on this roach At this point the frequencies are still approximate and all attenuations are set to 1.
Before using templar, we next make sure the correct firmware is running on each roach we will use. To start the firmware on all roaches we run startSeqFirmware.sh.
We then open an instance of templar for each roach we want to use. Each is loaded with it's Roach Freq/Atten file. This program is used to set up resonators before actual data readout, but for now we are only using it to plot the IQ loops of the resonators and various powers (power sweep). After adjusting parameters, hitting Define LUTs calculates the timestream of voltage values the DAC needs to output to generate a frequency comb containing all resonant frequencies (at first with random phases and equal amplitudes). These values are loaded into look up tables (LUTs) stored on the roach DDR2 DRAM modules (See DRAM_LUT block in firmware mdl). With the look up tables in place, and the DAC started, set a range of attenuation values to sweep through by changing start atten and stop atten. Templar will sweep the LO frequency for each attenuation value, building up IQ loop data for every resonator at each power. This is saved in a power sweep HDF5 file (ps_....h5).
This Power Sweep Data is then fed into PSFit.py. This GUI program will guess at a best attenuation and resonant frequency for each resonator. The user then confirms the guess, or judging from the IQ loop displayed, chooses another attenuation and frequency, making sure that the IQ loop does not exhibit saturation.
PSFit.py outputs the accurate Roach Freq/Atten files we can use with templar.py to set up to take observation data.
It may happen that some resonators can be driven at much lower attenuations than most others without saturating. In this case, PSFit.py will choose these lower attenuations. However, when the frequency comb is generated, the LUT values are scaled by the sum of all frequencies each scaled by their attenuation. Using these low attenuations for a few resonators causes these resonators to take up most of the DAC's dynamic range. This is why we first feed the accurate Roach Freq/Atten files into cleanUpLowAtten.py. This program helps the user choose what the minimum allowed attenuation should be and adjusts this in the Roach Freq/Atten files