Using archonGUI to get Raw Archon Data
By using the archonGUI interface, one has access to additional raw data from the archons which can be useful in analyzing detector noise. Here’s how to obtain it.
Using ArchonGUI
Start ArchonGUI
First, shut down the normal software for controlling the detectors. I will use the green side in the examples below, but the red side is nearly identical (except where noted):
kpf stop gcamerad
kpf stop kpfgreen0
Now start the archonGUI software from a kpfserver terminal using /opt/archon/archongui
The archonGUI window should come up. Note that it is larger than the size of the typical Keck VNC desktop. A workaround is to put the top part of the GUI (with the menu bar, IP address field, connect button, and log area) in one of the top workspaces, but leave most of the window (from the tab bar down) in the bottom workspace.
Configure the IP Address and connect
In the “Archon IP Address” field, enter the IP address of the archon you’re connecting to (e.g. 192.168.23.110 for Green and 192.168.23.111 for Red) and click the “Connect” button. A log message indicating connection should show up in the log are to the right.
Load an ACF File
Using the GUI menu, choose File → Open ACF option. Navigate to the location of the relevant ACF file. The location of the ACF files can be found via keyword (e.g. gshow -s kpfgreen ACFDIR).
Proceed to the lower workspace to access the bottom section of the GUI window and click the “Apply All” button in the lower left corner.
Configure the CDS / Deint tab
Select the “CDS / Deint” tab.
Click the checkboxes for “Big Buffers” and “Raw Enable”.
Enter the appropriate value in the “Raw Channel Select” dropdown (3 for Green, 2 for Red)
Enter
30as the value for “Raw Start Line”Enter
40as the value for the “Raw End Line”Enter
2000as the value for “Raw Start Pixel”Add 3 zeros to the “Raw Samples” value to make it
25600000Click the “Apply” button in the lower left corner of this tab (not the Apply All button you did before).
Configure the Parameters tab
In the “Parameters” tab, change the “Expose” value to the number of exposures you want to take. Note that the first exposure after a power cycle is often bad and also keep in mind that the Archon. will have enough buffer space to hold two images at the time, so taking more than 2 images is not useful if you want to save the data.
When you are ready to start and exposure, click the “Apply” button in the lower left corner of the tab.
Fetch an Image
Click over to the “System” tab. The images will appear in only 2 of the 3 buffers listed (since we’re using the “Big Buffers” option). Once the images have been fully downloaded to the Arhcon (the lines value will count up to 4110), you can click the “Fetch” button for that buffer. That will pull the data to the GUI where it can be viewed. There will be a small progress bar next to the “Frame” value at the bottom of the GUI which tracks when the fetching process is done.
The “Frame” value at the bottom status bar of the GUI will show the current fetched frame number. The frame number will increment with each exposure and reset on a power cycle of the Archon.
It is recommended to fill in the “Base Filename” field with descriptive text. I recommend beginning with either G_ or R_ to indicate if it is a red or green detector image, then some text indicating the test that is being run. For example, I might use G_initial for the first/baseline image, then G_disconnectLakeShore for an image where we have disconnected a LakeShaore. Additional information, including the frame number will be appended to make the filename (see below).
View/Save the Image
Once a frame has been fetched, you can view the image in the “Image” tab. It is most useful to save the data to a FITS file using the “Save FITS” button. This will result in a FITS file in /opt/archon which starts with the “Base Filename” above, includes the image dimensions, and ends with the frame number.
View/Save the Raw Data
Click over to the “Horizontal Raw Plot” tab. This may take some time as the GUI becomes briefly unresponsive as it loads the very large raw data set we have fetched. Be patient when going to the “Horizontal Raw Plot” tab or when clicking away from it. This can take of order 10 seconds to render.
Once the plot has rendered, you can save the data using the “Save Plot” button. Unfortunately, this always saves to a file called rawhplot.txt in the /opt/archon directory. I suggest renaming it to match the corresponding FITS file, but using the .txt extension for easy association of the raw data with the FITS file.
Analyzing the Data
For past runs, I have manually moved the ArchonGUI data to /s/sdata1701/RawArchonData in a typical Keck format date directory (e.g. 2025oct13).
In that location are two useful scripts: plot_read_noise.py and plot_ffts.py. These are also present in the KPFTranslator repo under the engineering sub-directory.
The plot_read_noise.py script will measure the read noise in all the FITS files in the input and plot the read noise as a function of time for each of red and green (it assumes the FITS file names start with either G or R as an indicator of which side it is).
The plot_ffts.py script will overlay power spectra of the noise in the “horizontal raw plot” data from ArhconGUI for each of the input .txt files.