Skip to content

This repository implements https://doi.org/10.1063/1.3692073 (An analysis method for asymmetric resonator transmission applied to superconducting devices) for use in a laboratory setting. This also implements an older method, which is the phi-RM method as described in the PhD thesis of J. Gao

License

Notifications You must be signed in to change notification settings

SamarthH/phiRM-DCM

Repository files navigation

Dependencies

  • gcc
  • GSL (The GNU Scientific Library)
  • Python 3 with numpy, matplotlib, sys, and subprocess modules (optional, Used for the helper script)

Compiling

  1. Go into the main directory
  2. run make
  3. It will generate resonanceFactor. This is the program that you need to run with your data.

Using the Program

Using just the C program

In the terminal (in Windows, open it by Shift+Right Click and then select Open Linux shell here), go to where the resonanceFactor executable binary is. Type ./resonanceFactor <filename for data file> <Cable delay in ns> <Detrend Mode> <Number of Initial Points fro Detrending> <Number of Final Points fro Detrending> This will generate the output.

Eg. ./resonanceFactor data.txt 30.0 2 100 150 This will take in input from the file data.txt ,correct for a cable delay of 30ns, and then perform quadratic detrending using the first 100 and the final 150 datapoints to find Qr, Qc from the phiRM and the DCM methods.

Input Format

The data file should be a space separated, tab separated or a new-line separated file with no headers, and data in the form freq(Arb Units) Re(S21) Im(S21). For example, see exampleData.txt.

Using the Python Script with Labber Outputs

As of now, the script handles only outputs from Labber for Power sweeps and single runs. To use it,

python3 analyse_labber_files.py <Input Labber File Name>

This will generate and show the plots of the sweeps. The magnitude plots would be saved. The resonanceFactor executable binary should be in the same folder as the python script.

For example, to analyse data from data.txt, use

python3 analyse_labber_files.py data.txt

This would save the generated magnitude plots in a folder with the same name as your text file with the extension removed. In the above example, the plots would be stored in a folder called data

If you want logmag plots, just use logmag = True at the top of the script

Possible errors / Problems during compilation

  1. You do not have GCC. For most linux systems, you can use the command sudo apt install build-essential or the appropriate variant according to your distribution. For Windows, either use this command in WSL/WSL2, or use MinGW.
  2. You do not have GSL. For most linux systems, you can use the command sudo apt install libgsl-dev or the appropriate variant according to your distribution. For Windows, either use this command in WSL/WSL2, or look up the appropriate method here https://www.gnu.org/software/gsl/
  3. The GSL installation is not in the right location. To correct for this, go to phiRM_DCM.c and change all the headers of the form <gsl/xxxx.h> to just <xxxx.h>. That might help. Otherwise, look up how to do this. (A good starting point would be to look into your /usr/local/include for a folder called gsl)

Reminder

This program is under development. In case if you find any issues, please let me know at my email address [email protected]. Please keep the Subject as `Bug Report for phiRM'. You can also submit an issue on Github and I will try to solve it.

About

This repository implements https://doi.org/10.1063/1.3692073 (An analysis method for asymmetric resonator transmission applied to superconducting devices) for use in a laboratory setting. This also implements an older method, which is the phi-RM method as described in the PhD thesis of J. Gao

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published