Пример #1
0
# -*- coding: utf-8 -*-
"""
Created on Tue May 17 20:49:11 2016

@author: thomasaref
"""


from TA88_fundamental import TA88_Lyzer, TA88_Read


a=TA88_Lyzer( name="d0518", on_res_ind=374, VNA_name="RS VNA",
              rd_hdf=TA88_Read(main_file="Data_0519/S1A4_high_frq_trans_3_sidelobe.hdf5"),
            desc="S1A4 high frequency side lobe 3",
            offset=-0.04,
            fit_indices=[range(80,499)]) #33, 70
a.filt.center=27
a.filt.halfwidth=6
a.fitter.fit_type="lorentzian"
a.fitter.gamma=0.1
a.flux_axis_type="fq" #"flux"
a.end_skip=20
a.save_folder.main_dir=a.name

if __name__=="__main__":
    pls=a.fft_plots()
    a.save_plots(pls)
    a.widths_plot()
    a.center_plot()
    a.heights_plot()
    a.background_plot().show()
Пример #2
0
#f.subplots_adjust(left = 0.0, right = 1.0, bottom = 0.0, top = 1.0, wspace = 0.0, hspace = 0.0)
#axes=f.add_subplot(111)
#axes.get_xaxis().set_visible(False)
#axes.get_yaxis().set_visible(False)
import_image = True
show_axes = False
color = "black"
linewidth = 1.0
fontsize = 7
sp = 20
x = 20
y = 28
#f.text(0, 0.9, "a)", fontsize=fontsize)

pl = "fig1"
a = TA88_Lyzer()
a.save_folder.main_dir = "fig1_setup"


def capacitor(x=0,
              y=0,
              w=5,
              h=22,
              g=2,
              label="$C_C$",
              lx=5,
              ly=7,
              color=color,
              fontsize=fontsize,
              linewidth=linewidth,
              **kwargs):
# -*- coding: utf-8 -*-
"""
Created on Tue May 17 20:49:11 2016

@author: thomasaref
"""

from TA88_fundamental import TA88_Lyzer, TA88_Read
from taref.physics.fitting_functions import lorentzian

a = TA88_Lyzer(
    filt_center=22,
    filt_halfwidth=10,
    on_res_ind=256,
    VNA_name="RS VNA",
    rd_hdf=TA88_Read(
        main_file="Data_0503/S1A4_lowfrq_trans_1st_sidelobe.hdf5"),
    fit_func=
    lorentzian,  # p_guess=[5e6,4.32e9, 3e-7, 3e-6], #[0.2,2.3, 3e-7, 7.5e-7],
    offset=-0.03)  #33, 70
a.read_data()

if __name__ == "__main__":
    pl = a.magabsfilt_colormesh()
    #line(a.frequency, a.ls_f)[0].show()
    a.widths_plot()
    a.center_plot()
    a.heights_plot()
    a.background_plot().show()
    #pl=a.magabs_colormesh()#magabs_colormesh3(s3a4_wg)
    pl = a.hann_ifft_plot()
Пример #4
0
from D0509_lowfrq2sidelobe import a as d0509
from D0503_lowfrq1sidelobe import a as d0503
from D0518_highfrq3sidelobe import a as d0518

from numpy import array, linspace, absolute, sqrt
from taref.plotter.api import line, colormesh, scatter

from taref.core.api import process_kwargs

from TA88_fundamental import qdt, TA88_Lyzer, TA88_VNA_Lyzer, TA88_Read
from TA53_fundamental import TA53_VNA_Pwr_Lyzer, TA53_Read

colormesh(qdt.MagAbs)

a = TA88_Lyzer(
    name="combo",
    desc="combined data",
)
a.save_folder.main_dir = "fig3_ls2"

lyzers = [
    d0514,
    d0316,
    d0629,
    d0518,
    d0506,
    d0509,
    d0503  #, d0629wg,
]

b = TA53_VNA_Pwr_Lyzer(
    name="d1118",
Пример #5
0
@author: thomasaref
"""

from TA88_fundamental import TA88_Lyzer, TA88_Read  #, qdt
from taref.plotter.api import colormesh, line, Plotter
from taref.core.api import set_tag, set_all_tags
from numpy import pi, array, squeeze, append, sqrt, pi, mod, floor_divide, trunc, arccos, shape, linspace, interp
from atom.api import FloatRange
from taref.core.api import tag_property
from taref.plotter.fitter import LineFitter2
from taref.physics.fundamentals import h
from scipy.optimize import fsolve

a = TA88_Lyzer(
    filt_center=61,
    filt_halfwidth=60,
    on_res_ind=493,  # VNA_name="RS VNA",
    rd_hdf=TA88_Read(main_file="Data_0423/S3A4_widegate.hdf5"))
a.read_data()
if __name__ == "__main__":
    a.magabs_colormesh()  #magabs_colormesh3(s3a4_wg)
    a.hann_ifft_plot()
    a.ifft_plot()  #.show()
    #a.magdBfiltbgsub_colormesh()
    a.magabsfilt_colormesh()  #.show()
    pl = a.magphasefilt_colormesh().show()

    class Fitter(LineFitter2):
        Ejmax = FloatRange(0.001, 100.0,
                           a.qdt.Ejmax / h / 1e9).tag(tracking=True)
        offset = FloatRange(-5.0, 5.0, a.offset).tag(tracking=True)
# -*- coding: utf-8 -*-
"""
Created on Tue May 17 20:49:11 2016

@author: thomasaref
"""

from TA88_fundamental import TA88_Lyzer, TA88_Read

a = TA88_Lyzer(name="d0503",
               on_res_ind=322,
               VNA_name="RS VNA",
               rd_hdf=TA88_Read(
                   main_file="Data_0503/S1A4_lowfrq_trans_1st_sidelobe.hdf5"),
               desc="S1A4 low frequency side lobe 1",
               offset=-0.08,
               fit_indices=[range(111, 570)])  #33, 70
a.filt.center = 22
a.filt.halfwidth = 10
a.fitter.fit_type = "lorentzian"
a.fitter.gamma = 0.01
a.flux_axis_type = "fq"  #"flux"
a.end_skip = 10
a.save_folder.main_dir = a.name

if __name__ == "__main__":
    pls = a.fft_plots()
    a.save_plots(pls)
    a.widths_plot()
    a.center_plot()
    a.heights_plot()
Пример #7
0
from taref.plotter.api import colormesh, line, Plotter, scatter
from taref.core.api import set_tag, set_all_tags
from numpy import array, squeeze, append, sqrt, pi, mod, floor_divide, trunc, arccos, shape, linspace, interp, absolute, fft, log10, angle, unwrap
from atom.api import FloatRange, Int, Float
from taref.core.api import tag_property
from taref.plotter.api import LineFitter
from taref.physics.fundamentals import h  #, filt_prep
from scipy.optimize import fsolve
from scipy.signal import freqz
from taref.physics.fitting_functions import lorentzian, rpt_fit, lorentzian2
from time import time
a = TA88_Lyzer(
    filt_center=51,
    filt_halfwidth=20,
    on_res_ind=440,
    VNA_name="RS VNA",
    rd_hdf=TA88_Read(main_file="Data_0523/S1A4_trans_mainlobe.hdf5"),
    fit_func=lorentzian,  #[0.2,2.3, 3e-7, 7.5e-7],
    offset=0.07,
    fit_type="yoko",  #indices=range(50, 534),
)  #33, 70
#print s3a4_wg.filt_center, s3a4_wg.filt_halfwidth, s3a4_wg.filt_start_ind, s3a4_wg.filt_end_ind

a.read_data()

if __name__ == "__main__":

    pl = a.magabs_colormesh()  #magabs_colormesh3(s3a4_wg)
    pl = a.hann_ifft_plot()
    pl = a.ifft_plot()
    #a.filt_compare(a.on_res_ind)
    #filt=filt_prep(601, s3a4_wg.filt_start_ind, s3a4_wg.filt_end_ind)
Пример #8
0
@author: thomasaref
"""

from TA88_fundamental import TA88_Lyzer, TA88_Read#, qdt
from taref.plotter.api import colormesh, line, Plotter, scatter
from taref.core.api import set_tag, set_all_tags
from numpy import array, squeeze, append, sqrt, pi, mod, floor_divide, trunc, arccos, shape, linspace, interp, absolute, fft, log10, angle, unwrap
from atom.api import FloatRange
from taref.plotter.api import LineFitter
from taref.physics.fundamentals import h#, filt_prep
from time import time

a=TA88_Lyzer(name="d0506", on_res_ind=329, VNA_name="RS VNA",
              rd_hdf=TA88_Read(main_file="Data_0505/S1A4_lowfrq_trans_3and4_sidelobe.hdf5"),
              desc="S1A4 low frequency side lobes 3 and 4",
              offset=-0.09,
            fit_indices=[range(19, 259+1),range(300, 566+1)],
            ) #33, 70
a.filt.center=50
a.filt.halfwidth=20
a.fitter.fit_type="lorentzian"
a.fitter.gamma=0.05 #0.01
a.flux_axis_type="fq" #"flux"
a.end_skip=10
a.save_folder.main_dir=a.name

if __name__=="__main__":

    #pls=d0506_plots()
    pls=a.fft_plots()
    #a.save_plots(pls)
Пример #9
0
from taref.physics.qdt2 import QDT
qdt = QDT(
    material='LiNbYZ',
    ft="double",
    a=80.0e-9,
    Np=9,
    Rn=3780.0,  #(3570.0+4000.0)/2.0,
    W=25.0e-6,
    eta=0.5,
    flux_factor=0.2945,
    voltage=1.21,
    offset=0.0)

s3a4_wg = TA88_Lyzer(
    filt_start_ind=50,
    filt_end_ind=85,
    on_res_ind=260,  # VNA_name="RS VNA", #48, 78
    rd_hdf=TA88_Read(main_file="Data_0425/S3A4_lowfrqgate.hdf5"))
s3a4_wg.read_data(s3a4_wg)


def magabs_colormesh2(self, f0=5.35e9, alpha=0.45, pl=None):
    fq_vec = array([
        sqrt(f *
             (f -
              2 * qdt.call_func("Lamb_shift", f=f, f0=f0, couple_mult=alpha)))
        for f in self.frequency
    ])
    pl = Plotter(fig_width=9.0,
                 fig_height=6.0,
                 name="magabs_{}".format(self.name))
Пример #10
0
qdt = QDT(
    material='LiNbYZ',
    ft="double",
    a=80.0e-9,
    Np=9,
    Rn=3780.0,  #(3570.0+4000.0)/2.0,
    W=25.0e-6,
    eta=0.5,
    flux_factor=0.2945,
    voltage=1.21,
    offset=0.0)

s3a4_wg = TA88_Lyzer(
    filt_start_ind=48,
    filt_end_ind=78,
    on_res_ind=260,  # VNA_name="RS VNA", #48, 78
    rd_hdf=TA88_Read(main_file="Data_0424/S3A4_widegate_fft_try.hdf5"))
s3a4_wg.read_data(s3a4_wg)


def magabs_colormesh2(self, f0=5.35e9, alpha=0.45, pl=None):
    fq_vec = array([
        sqrt(f *
             (f -
              2 * qdt.call_func("Lamb_shift", f=f, f0=f0, couple_mult=alpha)))
        for f in self.frequency
    ])
    pl = Plotter(fig_width=9.0,
                 fig_height=6.0,
                 name="magabs_{}".format(self.name))
Пример #11
0
from TA88_fundamental import TA88_Read_NP, TA88_Lyzer, TA88_Read, qdt, ideal_qdt
from taref.physics.qdt import QDT
from taref.plotter.api import scatter, line, LineFitter, Plotter
from atom.api import FloatRange, Typed, Unicode
from taref.core.universal import ODict
from numpy import append, linspace
from taref.core.api import tag_property, get_all_tags, get_tag
from taref.physics.fundamentals import h

npr = TA88_Read_NP(
    file_path=
    r"/Users/thomasaref/Dropbox/Current stuff/Logbook/TA210715A88_cooldown210216/tex_source_files/TA88_processed/D0629_flux_parabola.txt",
    show_data_str=True)

a = TA88_Lyzer(
    name="fluxparabola",
    desc="flux parabola data",
)
a.save_folder.main_dir = a.name


def flux_plots():
    data = npr.read()
    frequency = linspace(3.5e9, 7.5e9, 1000)
    freq = append(frequency / 1e9, frequency / 1e9)
    freq = append(freq, freq)
    V = qdt._get_Vfq0_many(f=frequency)[1]

    pl1 = scatter(data[:, 0],
                  data[:, 1],
                  fig_width=6.0,
                  fig_height=4.0,
Пример #12
0
from taref.core.api import set_tag, set_all_tags
from numpy import array, squeeze, append, sqrt, pi, mod, floor_divide, trunc, arccos, shape, linspace, interp, absolute, fft, log10, angle, unwrap
from atom.api import FloatRange, Int
from taref.core.api import tag_property
from taref.plotter.api import LineFitter
from taref.physics.fundamentals import h  #, filt_prep
from scipy.optimize import fsolve
from scipy.signal import freqz
from taref.physics.fitting_functions import lorentzian, rpt_fit, lorentzian2
from time import time
a = TA88_Lyzer(
    filt_center=26,
    filt_halfwidth=15,
    on_res_ind=413,
    VNA_name="RS VNA",
    rd_hdf=TA88_Read(
        main_file="Data_0514/S1A4_high_frq_trans_1_sidelobe.hdf5"),
    fit_func=lorentzian,
    p_guess=[5e6, 4.9e9, 5e-5, 4e-5],  #[0.2,2.3, 3e-7, 7.5e-7],
    offset=0.0,
    indices=range(50, 534))  #33, 70
#print s3a4_wg.filt_center, s3a4_wg.filt_halfwidth, s3a4_wg.filt_start_ind, s3a4_wg.filt_end_ind

a.read_data()

if __name__ == "__main__":

    #pl=a.magabs_colormesh()#magabs_colormesh3(s3a4_wg)
    #pl=a.hann_ifft_plot()
    #pl=a.ifft_plot()
    #a.filt_compare(a.on_res_ind)
from taref.plotter.api import colormesh, line, Plotter, scatter
from taref.core.api import set_tag, set_all_tags
from numpy import array, squeeze, append, sqrt, pi, mod, floor_divide, trunc, arccos, shape, linspace, interp, absolute, fft, log10, angle, unwrap
from atom.api import FloatRange, Int, Float
from taref.core.api import tag_property, private_property
from taref.plotter.api import LineFitter
from taref.physics.fundamentals import h  #, filt_prep
from scipy.optimize import fsolve
from scipy.signal import freqz
#from taref.physics.fitting_functions import lorentzian, rpt_fit, lorentzian2
#from taref.physics.fitting import Fitter
from time import time
a = TA88_Lyzer(name="d0514",
               on_res_ind=413,
               VNA_name="RS VNA",
               rd_hdf=TA88_Read(
                   main_file="Data_0514/S1A4_high_frq_trans_1_sidelobe.hdf5"),
               desc="S1A4 First high frequency side lobe",
               fit_indices=[range(50, 534)])  #33, 70
a.filt.center = 26
a.filt.halfwidth = 10
a.fitter.fit_type = "lorentzian"
a.fitter.gamma = 0.05
a.flux_axis_type = "fq"  #"flux"
a.end_skip = 10

a.save_folder.main_dir = a.name

if __name__ == "__main__":
    pls = a.fft_plots()
    a.save_plots(pls)
from taref.plotter.api import colormesh, line, Plotter, scatter
from taref.core.api import set_tag, set_all_tags
from numpy import array, squeeze, append, sqrt, pi, mod, floor_divide, trunc, arccos, shape, linspace, interp, absolute, fft, log10, angle, unwrap
from atom.api import FloatRange
from taref.core.api import tag_property
from taref.plotter.api import LineFitter
from taref.physics.fundamentals import h  #, filt_prep
from scipy.optimize import fsolve
from scipy.signal import freqz
from taref.physics.fitting_functions import lorentzian, rpt_fit, lorentzian2
from time import time
a = TA88_Lyzer(
    filt_center=50,
    filt_halfwidth=20,
    on_res_ind=256,
    VNA_name="RS VNA",
    rd_hdf=TA88_Read(
        main_file="Data_0505/S1A4_lowfrq_trans_3and4_sidelobe.hdf5"),
    fit_func=lorentzian,
    p_guess=[50e6, 4.1e9, 3e-7, 7.5e-7],  #[0.2,2.3, 3e-7, 7.5e-7],
    offset=-0.035)  #33, 70
#print s3a4_wg.filt_center, s3a4_wg.filt_halfwidth, s3a4_wg.filt_start_ind, s3a4_wg.filt_end_ind

a.read_data()

if __name__ == "__main__":
    #pl=a.magabs_colormesh()#magabs_colormesh3(s3a4_wg)
    #pl=a.hann_ifft_plot()
    #pl=a.ifft_plot()
    #a.filt_compare(a.on_res_ind)
    #filt=filt_prep(601, s3a4_wg.filt_start_ind, s3a4_wg.filt_end_ind)
    #line(filt*0.001, plotter=pl)
from TA88_fundamental import TA88_Lyzer, TA88_Read#, qdt
from taref.plotter.api import colormesh, line, Plotter, scatter
from taref.core.api import set_tag, set_all_tags
from numpy import array, squeeze, append, sqrt, pi, mod, floor_divide, trunc, arccos, shape, linspace, interp, absolute, fft, log10, angle, unwrap
from atom.api import FloatRange, Int, Float
from taref.core.api import tag_property
from taref.plotter.api import LineFitter
from taref.physics.fundamentals import h#, filt_prep
from scipy.optimize import fsolve
from scipy.signal import freqz

from time import time
a=TA88_Lyzer(on_res_ind=333, VNA_name="RS VNA",
              rd_hdf=TA88_Read(main_file="Data_0528/S1A4_careful_trans_swp.hdf5"),
            #fit_func=lorentzian,  #[0.2,2.3, 3e-7, 7.5e-7],
            offset=0.07#, fit_type="yoko", #indices=range(50, 534),
            ) #33, 70
#print s3a4_wg.filt_center, s3a4_wg.filt_halfwidth, s3a4_wg.filt_start_ind, s3a4_wg.filt_end_ind
a.filt.center=731
a.filt.halfwidth=300
a.end_skip=10


a.read_data()

if __name__=="__main__":
    a.filter_type="FFT"
    #a.bgsub_type="Complex" #"dB"

Пример #16
0
@author: thomasaref
"""

from TA88_fundamental import TA88_Lyzer, TA88_Read, qdt
from taref.plotter.api import colormesh, line, Plotter
from taref.core.api import set_tag, set_all_tags
from numpy import array, nan_to_num, squeeze, append, sqrt, pi, mod, floor_divide, trunc, arccos, shape
from atom.api import FloatRange
from taref.core.api import tag_Property
from taref.plotter.api import LineFitter
from taref.physics.fundamentals import h
from scipy.optimize import fsolve

s3a4_wg = TA88_Lyzer(
    filt_start_ind=0,
    filt_end_ind=0,
    on_res_ind=260,  # VNA_name="RS VNA",
    rd_hdf=TA88_Read(main_file="Data_0423/S3A4_widegate.hdf5"))
s3a4_wg.read_data(s3a4_wg)


def magabs_colormesh2(self,
                      offset=-0.08,
                      flux_factor=0.52,
                      Ejmax=h * 44.0e9,
                      f0=5.35e9,
                      alpha=0.7,
                      pl=None):
    fq_vec = array([
        sqrt(f * (f + alpha * calc_freq_shift(f, qdt.ft, qdt.Np, f0,
                                              qdt.epsinf, qdt.W, qdt.Dvv)))
Created on Sun May  8 13:25:50 2016

@author: thomasaref
"""
from TA88_fundamental import TA88_Lyzer, TA88_Read, qdt
from taref.physics.fitting_functions import lorentzian
from numpy import absolute, fft
from taref.plotter.api import Plotter, line, scatter

a = TA88_Lyzer(
    name="S4A1_midpeak",
    filt_center=31,
    filt_halfwidth=22,
    on_res_ind=260,
    VNA_name='RS VNA',
    port_name='S21',
    rd_hdf=TA88_Read(
        main_file="Data_0316/S4A1_TA88_coupling_search_midpeak.hdf5"),
    indices=range(65, 984 + 1),
    fit_func=lorentzian,
    flux_factor=qdt.flux_factor * 1000.0 / 560.0,
    offset=-0.025)  #, fit_type="yoko")
a.read_data()

if __name__ == "__main__":
    pl = a.magabsfilt_colormesh()
    #line(a.frequency, a.ls_f)[0].show()
    a.widths_plot()
    a.center_plot()
    a.heights_plot()
    a.background_plot().show()
# -*- coding: utf-8 -*-
"""
Created on Tue May 17 20:49:11 2016

@author: thomasaref
"""

from TA88_fundamental import TA88_Lyzer, TA88_Read
from taref.physics.fitting_functions import lorentzian

a = TA88_Lyzer(
    filt_center=27,
    filt_halfwidth=6,
    on_res_ind=360,
    VNA_name="RS VNA",
    rd_hdf=TA88_Read(
        main_file="Data_0519/S1A4_high_frq_trans_3_sidelobe.hdf5"),
    fit_func=
    lorentzian,  # p_guess=[5e6,4.32e9, 3e-7, 3e-6], #[0.2,2.3, 3e-7, 7.5e-7],
    offset=-0.03)  #33, 70
a.read_data()

if __name__ == "__main__":
    a.magabs_colormesh()
    pl = a.magabsfilt_colormesh()
    #line(a.frequency, a.ls_f)[0].show()
    pl = a.hann_ifft_plot()

    a.widths_plot()
    a.center_plot()
    a.heights_plot()
Пример #19
0
@author: thomasaref
"""

from TA88_fundamental import TA88_Lyzer, TA88_Read#, qdt
from taref.plotter.api import colormesh, line, Plotter, scatter
from taref.core.api import set_tag, set_all_tags
from numpy import array, squeeze, append, sqrt, pi, mod, floor_divide, trunc, arccos, shape, linspace, interp, absolute, fft, log10, angle, unwrap
from atom.api import FloatRange
from taref.plotter.api import LineFitter
from taref.physics.fundamentals import h#, filt_prep
from time import time

a=TA88_Lyzer(name="testing", on_res_ind=182, VNA_name="RS VNA",
              rd_hdf=TA88_Read(main_file="Data_0221/S4A4_TA88_swp.hdf5"),
              desc="looking",
              #offset=-0.09,
            #fit_indices=[range(19, 259+1),range(300, 566+1)],
            ) #33, 70
a.filt.center=110
a.filt.halfwidth=30
a.fitter.fit_type="lorentzian"
a.fitter.gamma=0.05 #0.01
a.flux_axis_type="fq" #"flux"
a.end_skip=10
a.save_folder.main_dir=a.name

if __name__=="__main__":

    #pls=a.fft_plots()
    #a.save_plots(pls)
    #pls[0].show()
Пример #20
0
            f0=self.f0 * 1e9,
            Ct=self.Ct * 1e-13,
            Ejmax=self.Ejmax * h * 1e9,
            offset=self.offset,
            flux_factor=self.flux_factor
        )  #, plotter=pl, color="red", linewidth=1.0)
        #return flux_par3(s3a4_wg, offset=self.offset, flux_factor=self.flux_factor,
        #                 C=self.Ct*1e-13, Ejmax=self.Ejmax*h*1e9, f0=self.f0*1e9, alpha=self.alpha)

f = Fitter(plot_name="centers")
pl1 = f.plotter
scatter(data[:, 0], data[:, 1], fig_width=9, fig_height=6, pl=pl1,
        color="red").show()

a = TA88_Lyzer(
    on_res_ind=201,  # VNA_name="RS VNA", filt_center=15, filt_halfwidth=15,
    rd_hdf=TA88_Read(
        main_file="Data_0628/S4A4_just_gate_overnight_flux_swp.hdf5"))

a.filt.center = 0
a.filt.halfwidth = 200
a.fitter.fit_type = "lorentzian"
a.fitter.gamma = 0.01
a.flux_axis_type = "yoko"  #"flux"
#a.end_skip=10
#a.fit_indices=[range(2, 14), range(15, 17), range(19,23), range(24, 26), range(29, 37), range(38, 39), range(44, 46), range(48, 52),
#               range(54, 66), range(67, 69), range(70, 85), range(105, 107), range(108, 116), range(122, 129), [130], range(132, 134), [138],
# range(182,184), range(188, 193), range(217, 251+1), range(266, 275+1), range(314, 324+1)]
#a.flux_indices=[range(400,434), range(436, 610)]
#a.flux_indices=[range(200, 400)]
a.read_data()
a.ifft_plot()
Пример #21
0
from TA88_fundamental import TA88_Lyzer, TA88_Read  #, qdt
from taref.plotter.api import colormesh, line, Plotter, scatter
from taref.core.api import set_tag, set_all_tags
from numpy import array, squeeze, append, sqrt, pi, mod, floor_divide, trunc, arccos, shape, linspace, interp, absolute, fft, log10, angle, unwrap
from atom.api import FloatRange
from taref.core.api import tag_property
from taref.plotter.api import LineFitter
from taref.physics.fundamentals import h  #, filt_prep

from time import time

a = TA88_Lyzer(
    name="d0509",
    on_res_ind=256,
    VNA_name="RS VNA",
    rd_hdf=TA88_Read(main_file="Data_0509/S1A4_lowfrq_trans_2_sidelobe.hdf5"),
    desc="S1A4 low frequency side lobe 2",
    offset=-0.09,
    fit_indices=[range(93, 298 + 1)],  #[range(30,580+1)]) #33, 70
)
#print s3a4_wg.filt_center, s3a4_wg.filt_halfwidth, s3a4_wg.filt_start_ind, s3a4_wg.filt_end_ind
a.filt.center = 28
a.filt.halfwidth = 15
a.fitter.fit_type = "lorentzian"
a.fitter.gamma = 0.01
a.flux_axis_type = "fq"  #"flux"
a.end_skip = 10

a.save_folder.main_dir = a.name

if __name__ == "__main__":
# -*- coding: utf-8 -*-
"""
Created on Sun May  8 13:25:50 2016

@author: thomasaref
"""
from TA88_fundamental import TA88_Lyzer, TA88_Read, qdt
from numpy import absolute, fft
from taref.plotter.api import Plotter, line, scatter

a = TA88_Lyzer(
    name="S4A1_midpeak",
    desc="S4A1 Main peak",
    on_res_ind=260,
    VNA_name='RS VNA',
    port_name='S21',
    rd_hdf=TA88_Read(
        main_file="Data_0316/S4A1_TA88_coupling_search_midpeak.hdf5"),
    fit_indices=[range(65, 984 + 1)],
    #fit_func=lorentzian,
    flux_factor=qdt.flux_factor * 1000.0 / 560.0,
    offset=-0.045)  #, fit_type="yoko")
a.filt.center = 31
a.filt.halfwidth = 22
a.fitter.fit_type = "lorentzian"
a.fitter.gamma = 0.055  #0.01
a.flux_axis_type = "fq"  #"flux"
a.end_skip = 10

a.save_folder.main_dir = a.name
#a.read_data()
Пример #23
0
"""
Created on Sun May  8 13:25:50 2016

@author: thomasaref
"""
from TA88_fundamental import TA88_Lyzer, TA88_Read
from taref.physics.fitting_functions import refl_lorentzian
from numpy import absolute, fft
from taref.plotter.api import Plotter, line

s4a1_mp = TA88_Lyzer(
    name="S1A1_midpeak",
    filt_center=37,
    filt_halfwidth=7,
    on_res_ind=260,
    VNA_name='RS VNA',
    port_name='S21',
    rd_hdf=TA88_Read(
        main_file="Data_0315/S1A1_TA88_coupling_search_midpeak.hdf5"),
    indices=range(65, 984 + 1),
    fit_func=refl_lorentzian)

s4a1_mp.read_data()
s4a1_mp.magabs_colormesh()  #"colormesh S4A1")
s4a1_mp.magabsfilt_colormesh()  #"filtcolormesh S4A1")
s4a1_mp.filt_compare(s4a1_mp.on_res_ind)
s4a1_mp.filt_compare(s4a1_mp.start_ind)

s4a1_mp.magdBfilt_colormesh()
s4a1_mp.magdBfiltbgsub_colormesh()
#s4a1_mp.filt_compare("filt_compare_on_res", s4a1_mp.on_res_ind)
Пример #24
0
        print shape(Magvec), shape(self.yoko)
        sm=shape(Magvec)[0]
        sy=shape(data)
        #print sy
        s=(sm, sy[0], 1)#sy[2])
        Magcom=Magvec[:,0, :]#+1j*Magvec[:,1, :]
        Magcom=reshape(Magcom, s, order="F")
        self.frequency=linspace(fstart, fstart+fstep*(sm-1), sm)
        self.MagcomData=squeeze(Magcom)
        print shape(self.MagcomData)
        self.stop_ind=len(self.yoko)-1

a=TA88_Lyzer(name="d0629", on_res_ind=240, filt=Filter(center=2, halfwidth=10, reflect=False),#read_data=read_data, # VNA_name="RS VNA",
        rd_hdf=TA88_Read(main_file="Data_0629/S4A4_just_gate_FFT_high_frq_n20dBm.hdf5"),
        fit_indices=[range(48,154+1), range(276, 578+1)],
         desc="Gate high frequency",
        )
#a.filt.center=0
#a.filt.halfwidth=50
#a.filt.reflect=True
#, window_ifft, fir_filt_prep, fir_filter, fir_freqz, fft_filt_prep, fft_filter, ifft_x


from scipy.signal import decimate, resample
from numpy import exp, log10
from time import time

#a.filt.center=26
#a.filt.halfwidth=10
a.fitter.fit_type="lorentzian"