示例#1
0
# -*- coding: utf-8 -*-
"""
Created on Sun Apr 24 18:55:33 2016

@author: thomasaref
"""

from TA88_fundamental import TA88_VNA_Lyzer, TA88_Read, TA88_VNA_Pwr_Lyzer
from taref.plotter.api import colormesh, line, scatter
from numpy import absolute

a = TA88_VNA_Lyzer(
    name="testing",
    on_res_ind=58,
    VNA_name="RS VNA",  #241
    rd_hdf=TA88_Read(main_file="Data_0307/S1A4_TA88_wide_f_flux_swp2.hdf5"
                     ),  #S1A4_TA88_coupling_search.hdf5"),
    desc="looking",
    #offset=-0.09,
    #fit_indices=[range(19, 259+1),range(300, 566+1)],
)  #33, 70

a.filt.center = 150  #125
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
a.bgsub_type = "dB"

if 0:
示例#2
0
# -*- coding: utf-8 -*-
"""
Created on Sun Apr 24 18:55:33 2016

@author: thomasaref
"""

from TA88_fundamental import TA88_VNA_Lyzer, TA88_Read, qdt, TA88_Read_NP, TA88_Save_NP
from TA53_fundamental import TA53_VNA_Pwr_Lyzer, TA53_Read
from numpy import array, absolute, squeeze, append, sqrt, pi, arccos, shape, linspace
from taref.physics.fundamentals import h
from taref.plotter.api import colormesh, line, scatter
from taref.physics.filtering import Filter

a = TA88_VNA_Lyzer(
    on_res_ind=201,
    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 = "flux"  #"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),
示例#3
0
from TA88_fundamental import TA88_VNA_Lyzer, TA88_VNA_Pwr_Lyzer, TA88_Read, qdt as qdt88, idt as idt88, TA88_Read_NP, TA88_Save_NP, bg_A4, bg_A1
from TA53_fundamental import TA53_VNA_Pwr_Lyzer, TA53_Read, idt, qdt

from taref.plotter.api import colormesh, line, scatter, Plotter
from numpy import log10, absolute, linspace, mean, sqrt
from D0527_trans_careful import MagcomFilt as MagcomFilt88
from D0527_trans_careful import a as d0527
from D0317_S4A1_frq_pulse_flux import a as d0317
from matplotlib.pyplot import colorbar  #, tight_layout

c = TA88_VNA_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)],
    flux_factor=qdt88.flux_factor * 1000.0 / 560.0,
    offset=-0.045)
c.filt.center = 31
c.filt.halfwidth = 22
c.fitter.fit_type = "lorentzian"
c.fitter.gamma = 0.055  #0.01
c.flux_axis_type = "flux"  #"fq" #"flux"
c.end_skip = 10

pl = "pwr_sat"

fig_width = 7.2
fig_height = 5.0
示例#4
0
from TA88_fundamental import TA88_VNA_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 taref.physics.fitting_functions import lorentzian, rpt_fit, lorentzian2
from time import time
a = TA88_VNA_Lyzer(
    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.08,  #indices=range(50, 534),
    fit_indices=[range(200, 1901)],
)  #33, 70
a.filt.center = 51
a.filt.halfwidth = 20
a.flux_axis_type = "yoko"
a.end_skip = 10
a.fitter.gamma = 0.03
#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)
# -*- coding: utf-8 -*-
"""
Created on Sun May  8 13:25:50 2016

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

a = TA88_VNA_Lyzer(
    name="S4A1_wide",
    desc="S4A1 wide",
    on_res_ind=260,
    VNA_name='RS VNA',
    port_name='S21',
    rd_hdf=TA88_Read(main_file="Data_0312/S4A1_TA88_coupling_search.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 = 129
a.filt.halfwidth = 30
a.fitter.fit_type = "lorentzian"
a.fitter.gamma = 0.055  #0.01
a.flux_axis_type = "flux"  #"fq" #"flux"
a.end_skip = 10

a.save_folder.main_dir = a.name
#a.read_data()
        Magcom = Magvec[:, 0, :] + 1j * Magvec[:, 1, :]
        Magcom = reshape(Magcom, s, order="F")
        self.frequency = linspace(fstart, fstart + fstep * (sm - 1), sm)
        #if self.swp_type=="pwr_first":
        #    Magcom=swapaxes(Magcom, 1, 2)
        self.MagcomData = squeeze(Magcom)  #[:, 2, :]
        print self.MagcomData.shape
        #self.stop_ind=len(self.yoko)-1
        self.filt.N = len(self.frequency)


a = TA88_VNA_Lyzer(
    name="d0530",
    on_res_ind=0,
    VNA_name="RS VNA",
    rd_hdf=TA88_Read(main_file="Data_0530/S4A4l_careful_refl.hdf5"),
    #fit_func=lorentzian,  #[0.2,2.3, 3e-7, 7.5e-7],
    offset=0.07,  #fit_type="yoko",
    rt_atten=30.0,  #indices=range(50, 534),
    read_data=read_data,
)  #33, 70
#print s3a4_wg.filt_center, s3a4_wg.filt_halfwidth, s3a4_wg.filt_start_ind, s3a4_wg.filt_end_ind
a.filt.center = 209
a.filt.halfwidth = 200

a.read_data()
a.save_folder.main_dir = a.name
b = TA88_VNA_Lyzer(
    on_res_ind=0,
    VNA_name="RS VNA",
    rd_hdf=TA88_Read(main_file="Data_0531/S4A4_careful_unswitched.hdf5"),
    # fit_func=lorentzian,  #[0.2,2.3, 3e-7, 7.5e-7],
from TA88_fundamental import TA88_VNA_Lyzer, TA88_Read, qdt, TA88_Read_NP, TA88_Save_NP
from taref.plotter.api import colormesh, line, Plotter, scatter
from taref.core.api import set_tag, set_all_tags
from numpy import array, absolute, squeeze, append, sqrt, pi, mod, floor_divide, trunc, arccos, shape
from atom.api import FloatRange
from taref.core.api import tag_property, reset_properties, reset_property
from taref.plotter.api import LineFitter
from taref.physics.fundamentals import h
from scipy.optimize import fsolve

from scipy.signal import savgol_filter
#savgol_filter(x, 5, 2)
from scipy.interpolate import interp1d

a=TA88_VNA_Lyzer(on_res_ind=215,# VNA_name="RS VNA", filt_center=15, filt_halfwidth=15,
        rd_hdf=TA88_Read(main_file="Data_0704/S4A4_gate_flux_swp.hdf5"))

a.filt.center=40#0 #107
a.filt.halfwidth=90
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()
from TA88_fundamental import TA88_VNA_Lyzer, TA88_Read, qdt, TA88_Read_NP, TA88_Save_NP
from taref.plotter.api import colormesh, line, Plotter, scatter
from taref.core.api import set_tag, set_all_tags
from numpy import array, absolute, squeeze, append, sqrt, pi, mod, floor_divide, trunc, arccos, shape
from atom.api import FloatRange
from taref.core.api import tag_property, reset_properties, reset_property
from taref.plotter.api import LineFitter
from taref.physics.fundamentals import h
from scipy.optimize import fsolve

from scipy.signal import savgol_filter
#savgol_filter(x, 5, 2)
from scipy.interpolate import interp1d

a = TA88_VNA_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),
示例#9
0
# -*- coding: utf-8 -*-
"""
Created on Sun Apr 24 18:55:33 2016

@author: thomasaref
"""

from TA88_fundamental import TA88_VNA_Lyzer, TA88_Read, TA88_VNA_Pwr_Lyzer
from taref.plotter.api import colormesh, line, scatter
from numpy import absolute

a=TA88_VNA_Lyzer(name="testing", on_res_ind=662, VNA_name="RS VNA", #241
              rd_hdf=TA88_Read(main_file="Data_0406/S3A1_gate_listen_fft.hdf5"), #S1A4_TA88_coupling_search.hdf5"),
              desc="looking",
              #offset=-0.09,
            #fit_indices=[range(19, 259+1),range(300, 566+1)],
            ) #33, 70

a.filt.center=-5 #15*0#125
a.filt.halfwidth=10
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
a.bgsub_type="Abs"#"dB"

if 0:
    b=TA88_VNA_Pwr_Lyzer(name="testing", on_res_ind=231, VNA_name="RS VNA",
                  rd_hdf=TA88_Read(main_file="Data_0222/S4A1_TA88_powswp.hdf5"),
                  desc="looking", swp_type="yoko_first",
        Magcom = Magvec[:, 0, :] + 1j * Magvec[:, 1, :]
        Magcom = reshape(Magcom, s, order="F")
        self.frequency = linspace(fstart, fstart + fstep * (sm - 1), sm)
        #if self.swp_type=="pwr_first":
        #    Magcom=swapaxes(Magcom, 1, 2)
        self.MagcomData = squeeze(Magcom)  #[:, 2, :]
        print self.MagcomData.shape
        #self.stop_ind=len(self.yoko)-1
        self.filt.N = len(self.frequency)


a = TA88_VNA_Lyzer(
    name="d0527",
    on_res_ind=0,
    VNA_name="RS VNA",
    rd_hdf=TA88_Read(main_file="Data_0527/S1A4_careful_trans.hdf5"),
    offset=0.07,
    #fit_type="yoko",
    rt_atten=30.0,  #indices=range(50, 534),
    read_data=read_data,
)  #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 = 200
a.read_data()
a.save_folder.main_dir = a.name
b = TA88_VNA_Lyzer(
    on_res_ind=0,
    VNA_name="RS VNA",
    rd_hdf=TA88_Read(main_file="Data_0531/S4A4_careful_unswitched.hdf5"),
    offset=0.07,
示例#11
0
# -*- coding: utf-8 -*-
"""
Created on Tue May 17 20:49:11 2016

@author: thomasaref
"""

from TA88_fundamental import TA88_VNA_Lyzer, TA88_Read

a = TA88_VNA_Lyzer(
    name="d0502",
    on_res_ind=176,
    VNA_name="RS VNA",
    rd_hdf=TA88_Read(main_file="Data_0502/S1A4_midpeak_trans.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()
示例#12
0
# -*- coding: utf-8 -*-
"""
Created on Sun Apr 24 18:55:33 2016

@author: thomasaref
"""

from TA88_fundamental import TA88_VNA_Lyzer, TA88_Read, TA88_VNA_Pwr_Lyzer
from taref.plotter.api import colormesh, line, scatter
from numpy import absolute

a = TA88_VNA_Lyzer(
    name="testing",
    on_res_ind=182,
    VNA_name="RS VNA",
    rd_hdf=TA88_Read(
        main_file="Data_0306/S4A4_TA88_wide_f_flux_swp_overnight.hdf5"),
    desc="looking",
    #offset=-0.09,
    #fit_indices=[range(19, 259+1),range(300, 566+1)],
)  #33, 70

a.filt.center = 14
a.filt.halfwidth = 5
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 0:
    b = TA88_VNA_Pwr_Lyzer(
示例#13
0
# -*- coding: utf-8 -*-
"""
Created on Sun Apr 24 18:55:33 2016

@author: thomasaref
"""

from TA88_fundamental import TA88_VNA_Lyzer, TA88_Read, TA88_VNA_Pwr_Lyzer
from taref.plotter.api import colormesh, line, scatter
from numpy import absolute

a = TA88_VNA_Lyzer(
    name="testing",
    on_res_ind=341,
    VNA_name="RS VNA",  #241
    rd_hdf=TA88_Read(main_file="Data_0312/S4A1_TA88_coupling_search.hdf5"),
    desc="looking",
    #offset=-0.09,
    #fit_indices=[range(19, 259+1),range(300, 566+1)],
)  #33, 70

a.filt.center = 127  #15*0#125
a.filt.halfwidth = 50
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
a.bgsub_type = "dB"  #"Abs"#"dB"

if 0:
示例#14
0
        print fstart, fstep

        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

#S3A1_pulsing_new_osc_frq_swp.hdf5
a=TA88_VNA_Lyzer(name="d0703_time_try", on_res_ind=251, read_data=read_data, # VNA_name="RS VNA",
        rd_hdf=TA88_Read(main_file="Data_0704/S3A1_pulsing_new_osc_frq_swp.hdf5"))#"Data_0703/S3A1_pulsing_new_osc_flux_swp.hdf5"))
a.save_folder.main_dir=a.name
a.filt.center=4469
a.filt.halfwidth=300
a.filt.reflect=True
from taref.physics.filtering import Filter#, window_ifft, fir_filt_prep, fir_filter, fir_freqz, fft_filt_prep, fft_filter, ifft_x_fs
from scipy.signal import decimate, resample
from numpy import exp

a.read_data()
#line(a.MagcomData[10000,:])
#f=a.frequency[250]

pl=line(a.MagcomData[:,250])
t=a.frequency
f=a.yoko[250]
from TA53_fundamental import TA53_VNA_Pwr_Lyzer, TA53_Read, idt, qdt
from numpy import diag, mean, log10, array, absolute, squeeze, append, sqrt, pi, arccos, shape, linspace, argmin
from taref.physics.fundamentals import h
from taref.plotter.api import colormesh, line, scatter
from D1122_trans_direct import a as d1122
from D1122_trans_direct import MagcomFilt

from matplotlib.pyplot import colorbar  #, tight_layout

idt.Np = 56
idt.f0 = 4.46e9  #4.452
idt.K2 = 0.032

a = TA88_VNA_Lyzer(
    on_res_ind=201,
    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 = "flux"  #"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),
示例#16
0
# -*- coding: utf-8 -*-
"""
Created on Sun Apr 24 18:55:33 2016

@author: thomasaref
"""

from TA88_fundamental import TA88_VNA_Lyzer, TA88_Read, TA88_VNA_Pwr_Lyzer, bg_A1
from taref.plotter.api import colormesh, line, scatter
from numpy import absolute, log10

a=TA88_VNA_Lyzer(name="testing", on_res_ind=182, VNA_name="RS VNA",
              rd_hdf=TA88_Read(main_file="Data_0222/S4A1_TA88_swp_5Vtn5V.hdf5"),
              desc="looking",
              #offset=-0.09,
            #fit_indices=[range(19, 259+1),range(300, 566+1)],
            ) #33, 70

a.filt.center=14
a.filt.halfwidth=5
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 1:
    b=TA88_VNA_Pwr_Lyzer(name="testing", on_res_ind=370, VNA_name="RS VNA",
                  rd_hdf=TA88_Read(main_file="Data_0222/S4A1_TA88_powswp.hdf5"),
                  desc="looking", swp_type="yoko_first",
                )
from TA88_fundamental import TA88_VNA_Lyzer, TA88_Read, qdt, TA88_Read_NP, TA88_Save_NP
from taref.plotter.api import colormesh, line, Plotter, scatter
from taref.core.api import set_tag, set_all_tags
from numpy import array, absolute, squeeze, append, sqrt, pi, mod, floor_divide, trunc, arccos, shape
from atom.api import FloatRange
from taref.core.api import tag_property, reset_properties, reset_property
from taref.plotter.api import LineFitter
from taref.physics.fundamentals import h
from scipy.optimize import fsolve

from scipy.signal import savgol_filter
#savgol_filter(x, 5, 2)
from scipy.interpolate import interp1d

a = TA88_VNA_Lyzer(
    on_res_ind=201,  # VNA_name="RS VNA", filt_center=15, filt_halfwidth=15,
    rd_hdf=TA88_Read(main_file="Data_0705/reflection_S4A4_widecoilsweep.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),