Coder Social home page Coder Social logo

scathalmca / sonnet-automation Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 6.99 MB

Tools designed to extract Resonant Frequency & Coupling Quality Factor for Microwave Kinetic Inductance Detector Simulations using a Sonnet .csv data file.

Python 100.00%
automation detector electromagnetic-simulation matlab mkid python sonnet superconductivity superconductors automated-mkids low-temperature-detectors microwave-kinetic-inductance-detectors

sonnet-automation's Introduction

Sonnet-Automation

Tools designed to extract Resonant Frequency & Coupling Quality Factor for Microwave Kinetic Inductance Detector Simulations using a Sonnet .csv data file.

The scripts in this repository allow the extraction of Resonant Frqeuency & Qc from a .csv data file exported from the EM Simulation Software Sonnet. The main purpose of these scripts is to automate the extraction of data from large Sonnet data sets and thus the scripts provided here will automate the extraction of Resonant Frequency and Qc for any number of parameter sweeps.

Please Note: These Scripts will only work with 1 single resonant dip to correctly extract f0 & Qc.

Resonant Frequency (f0) is extracted by finding the minimum S21 value for a given frequency range.

$Q_{C}$ is extracted by calculating the Full-Width Half-Max of the S21 dip. Normally, ($Q_{Total} = \frac{f0}{FWHM}$) & $\frac{1}{Q_{Total}}=\frac{1}{Q_{i}} + \frac{1}{Q_{C}}$, however $Q_{i} \rightarrow \infty$ in Sonnet and so $Q_{Total} \approx Q_{C}$.

Outputting Data From Sonnet

Please note: Ensure the data exported from Sonnet is in the form of S-Paramter, Mag and Phase for accurate values. For outputting simulation data from Sonnet to a .csv file, please refer to the Sonnet manual.

https://www.sonnetsoftware.com/support/manuals.asp

How To Use The Automation Scripts

Python Automation Script

For the Python Script, simply enter the file directory of the .csv data file to line 44 (with open(file directory, "r") as csvfile). The script will output all Parameter names, Resonant Frequencies and Qc Factor for all Parameters into the Python console.

If you wish to plot data, each frequency range is stored in the "b" variable and S-paramter data is stored in S11_Mag, S11_Phase, S21_Mag & S21_Phase variables respectively.

All Parameter names are stored in title All f0 values are stored in ac_res_freq All Qc values are stored in Qual_Fac

MatLab Automation Script

For the Matlab Script, make sure the data file is on the correct path. Then use the function "ResExtract(filename)". For Example: [ResonantFrequencies, QFactors]=ResExtract(filename).

sonnet-automation's People

Contributors

scathalmca avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.