plateform stringclasses 1
value | repo_name stringlengths 13 113 | name stringlengths 3 74 | ext stringclasses 1
value | path stringlengths 12 229 | size int64 23 843k | source_encoding stringclasses 9
values | md5 stringlengths 32 32 | text stringlengths 23 843k |
|---|---|---|---|---|---|---|---|---|
github | jhwjhw0123/HSIC_Lasso_with_optimization-master | dalsqal1.m | .m | HSIC_Lasso_with_optimization-master/DAL_opt/dalsqal1.m | 2,790 | utf_8 | 976ba39446c76feaeec113048240b2b5 | % dalsqal1 - DAL with the squared loss and the adaptive L1 regularization
%
% Overview:
% Solves the optimization problem:
% xx = argmin 0.5||A*x-bb||^2 + ||pp.*x||_1
%
% Syntax:
% [xx,status]=dalsqal1(xx, A, bb, pp, <opt>)
%
% Inputs:
% xx : initial solution ([nn,1])
% A : the design matrix A ([mm,nn]) ... |
github | jhwjhw0123/HSIC_Lasso_with_optimization-master | gl_spec.m | .m | HSIC_Lasso_with_optimization-master/DAL_opt/gl_spec.m | 324 | utf_8 | 85b9979a663d9937f3cfa0f3ef96c135 | % gl_spec - spectrum function for the grouped L1 regularizer
%
% Copyright(c) 2009 Ryota Tomioka
% This software is distributed under the MIT license. See license.txt
function nm=gl_spec(ww,blks)
nn=length(blks);
nm=zeros(nn,1);
ixw=0;
for kk=1:length(blks)
I=ixw+(1:blks(kk));
ixw=I(end);
nm(kk)=norm(ww(I));
... |
github | jhwjhw0123/HSIC_Lasso_with_optimization-master | loss_sqp.m | .m | HSIC_Lasso_with_optimization-master/DAL_opt/loss_sqp.m | 224 | utf_8 | 22264a52cbc12f19b18430efdb90d6a9 | % loss_sqp - squared loss function
%
% Copyright(c) 2009 Ryota Tomioka
% This software is distributed under the MIT license. See license.txt
function [floss, gloss]=loss_sqp(zz, bb)
gloss = zz-bb;
floss = 0.5*sum(gloss.^2); |
github | jhwjhw0123/HSIC_Lasso_with_optimization-master | dalhsgl.m | .m | HSIC_Lasso_with_optimization-master/DAL_opt/dalhsgl.m | 3,258 | utf_8 | 7094eb2149ed9308f5af6fc035a3755c | % dalhsgl - DAL with hyperbolic secant loss and grouped L1 regularization
%
% Overview:
% Solves the optimization problem:
% [xx,bias] = argmin sum(log(sech(A*x+bias))) + lambda*||x||_G1
% where
% ||x||_G1 = sum(sqrt(sum(xx(Ii).^2)))
% (Ii is the index-set of the i-th group
%
% Syntax:
% [xx,bias,status]=dallr... |
github | jhwjhw0123/HSIC_Lasso_with_optimization-master | dallrds.m | .m | HSIC_Lasso_with_optimization-master/DAL_opt/dallrds.m | 2,882 | utf_8 | 2ec9546bce6e8b6b9424f0ff1e4aee2a | % dallrds - DAL with logistic loss and the dual spectral norm
% (trace norm) regularization
%
% Overview:
% Solves the optimization problem:
% ww = argmin sum(log(1+exp(-yy.*(A*w+b)))) + lambda*||w||_DS
%
% where ||w||_DS = sum(svd(w))
%
% Syntax:
% [ww,bias,status]=dallrds(ww, bias, A, yy, lambda, <op... |
github | jhwjhw0123/HSIC_Lasso_with_optimization-master | loss_sqdw.m | .m | HSIC_Lasso_with_optimization-master/DAL_opt/loss_sqdw.m | 516 | utf_8 | 61ee88516875cda0bd1bd4a5ed3b0468 | % loss_sqd - conjugate of weighted squared loss function
%
% Syntax:
% [floss, gloss, hloss, hmin]=loss_sqd(aa, bb, weight)
%
% Copyright(c) 2009 Ryota Tomioka
% This software is distributed under the MIT license. See license.txt
function varargout = loss_sqdw(aa, bb, weight)
gloss = aa./weight-bb;
floss = 0.5*sum(we... |
github | jhwjhw0123/HSIC_Lasso_with_optimization-master | lbfgs.m | .m | HSIC_Lasso_with_optimization-master/DAL_opt/lbfgs.m | 4,442 | utf_8 | 83c09fde390bb3fe637fb9bd8997bdfb | % lbfgs - L-BFGS algorithm
%
% Syntax:
% [xx, status] = lbfgs(fun, xx, ll, uu, <opt>)
%
% Input:
% fun - objective function
% xx - Initial point for optimization
% ll - lower bound on xx
% uu - upper bound on xx
% Ac - inequality constraint:
% bc - Ac*xx<=bc
% opt - Struct o... |
github | jhwjhw0123/HSIC_Lasso_with_optimization-master | al1_softth.m | .m | HSIC_Lasso_with_optimization-master/DAL_opt/al1_softth.m | 366 | utf_8 | 0d5966a03bcccf0e0716ff9eb364d7db | % al1_softth - soft threshold function for adaptive L1 regularization
%
% Copyright(c) 2009- Ryota Tomioka, Satoshi Hara
% This software is distributed under the MIT license. See license.txt
function [vv,ss]=al1_softth(vv,pp,info)
n = size(vv,1);
Ip=find(vv>pp);
In=find(vv<-pp);
vv=sparse([Ip;In],1,[vv(... |
github | jhwjhw0123/HSIC_Lasso_with_optimization-master | dalsql1n.m | .m | HSIC_Lasso_with_optimization-master/DAL_opt/dalsql1n.m | 2,565 | utf_8 | 29827f9adfbbda961080d78bedcfa02d | % dalsql1n - DAL with the squared loss and the non-negative L1 regularization
%
% Overview:
% Solves the optimization problem:
% xx = argmin 0.5||A*x-bb||^2 + lambda*||x||_1 s.t. x>=0
%
% Syntax:
% [xx,status]=dalsql1(xx, A, bb, lambda, <opt>)
%
% Inputs:
% xx : initial solution ([nn,1])
% A : the design... |
github | jhwjhw0123/HSIC_Lasso_with_optimization-master | gl_softth.m | .m | HSIC_Lasso_with_optimization-master/DAL_opt/gl_softth.m | 733 | utf_8 | 69690be9f0204d2642cd8d56d0ed6ed9 | % gl_softth - soft threshold function for grouped L1 regularization
%
% Copyright(c) 2009 Ryota Tomioka
% This software is distributed under the MIT license. See license.txt
function [vv,ss]=gl_softth(vv, lambda,info)
if all(info.blks==info.blks(1))
n=length(vv);
bsz=info.blks(1);
vv=reshape(vv,[bsz,n/bsz]);
... |
github | jhwjhw0123/HSIC_Lasso_with_optimization-master | randsparse.m | .m | HSIC_Lasso_with_optimization-master/DAL_opt/randsparse.m | 525 | utf_8 | 9edbce6f3773a80edb5dbfbea5e78b89 | % randsparse - generates a random sparse vector or a column-wise
% sparse matrix
%
% Example:
% ww = randsparse(64, 8);
% ww = randsparse([64, 64], 8);
%
% Copyright(c) 2009 Ryota Tomioka
% This software is distributed under the MIT license. See license.txt
function ww = randsparse(n, k, r)
if length(n)... |
github | jhwjhw0123/HSIC_Lasso_with_optimization-master | loss_sqd.m | .m | HSIC_Lasso_with_optimization-master/DAL_opt/loss_sqd.m | 456 | utf_8 | 5e1a573866b0ab6ef9dbf2dab1a96d33 | % loss_sqd - conjugate squared loss function
%
% Syntax:
% [floss, gloss, hloss, hmin]=loss_sqd(aa, bb)
%
% Copyright(c) 2009 Ryota Tomioka
% This software is distributed under the MIT license. See license.txt
function varargout = loss_sqd(aa, bb)
gloss = aa-bb;
floss = 0.5*sum(gloss.^2)-0.5*sum(bb.^2);
hloss = spdia... |
github | jhwjhw0123/HSIC_Lasso_with_optimization-master | dalsqen.m | .m | HSIC_Lasso_with_optimization-master/DAL_opt/dalsqen.m | 2,721 | utf_8 | c3d31a07e41eed3c3facdb9c94eebd6a | % dalsqen - DAL with squared loss and the Elastic-net regularization
%
% Overview:
% Solves the optimization problem:
% [xx, bias] = argmin 0.5||A*x-bb||^2 + lambda*sum(theta*abs(x)+0.5*(1-theta)*x.^2)
%
% Syntax:
% [xx,status]=dalsqen(xx, A, bb, lambda, theta, <opt>)
%
% Inputs:
% xx : initial solution ([nn,1... |
github | jhwjhw0123/HSIC_Lasso_with_optimization-master | en_softth.m | .m | HSIC_Lasso_with_optimization-master/DAL_opt/en_softth.m | 450 | utf_8 | eb1b8dde47c826e2bcb46d180aa69e05 | % en_softth - soft threshold function for the Elastic-net regularization
%
% Copyright(c) 2009 Ryota Tomioka
% This software is distributed under the MIT license. See license.txt
function [vv,ss]=en_softth(vv,lambda,info)
n = size(vv,1);
theta = info.theta;
if theta<1
I=find(abs(vv)>lambda*theta);
vv=sparse(I,1... |
github | jhwjhw0123/HSIC_Lasso_with_optimization-master | newton.m | .m | HSIC_Lasso_with_optimization-master/DAL_opt/newton.m | 2,870 | utf_8 | 86ab8f25bd6ab5b755f157d6b6f04e6a | % newton - a simple implementation of the Newton method
%
% Syntax:
% [xx,fval,gg,status]=newton(fun, xx, ll, uu, Ac, bc, tol, finddir, info, verbose, varargin);
%
% Copyright(c) 2009 Ryota Tomioka
% This software is distributed under the MIT license. See license.txt
%
function [xx,fval,gg,status]=newton(fun, xx, ll, ... |
github | MatCip/Simulation_wireless_channels-master | plot_all.m | .m | Simulation_wireless_channels-master/simulation_final/rician/plot_all.m | 8,108 | utf_8 | 13a37a8d2f7fc1402bab5320338efbce | %% this function plots all the results
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% plot all
function plot_all()
close all;
load('data/all_data.mat')
clc; disp('plotting...')
global delta_t;
... |
github | MatCip/Simulation_wireless_channels-master | gen_channel.m | .m | Simulation_wireless_channels-master/simulation_final/rician/gen_channel.m | 5,371 | utf_8 | d7f08970519eb0f6183f880a4d711468 | %% this function implement the channel based on the work of Jakes, Pop-Beaulieu and Xiao-Zheng.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% INPUT:
% str_mode : string for selecting which channel has to be computed.
% N_stat : number of statistical trials.
% K : ratio be... |
github | MatCip/Simulation_wireless_channels-master | get_LCR_AFD.m | .m | Simulation_wireless_channels-master/simulation_final/rician/get_LCR_AFD.m | 2,768 | utf_8 | 806e5e3a3e989ed30153d6d4dc796058 | %% this function compute the LCR and the AFD.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% INPUT:
% g : fading,
% fd : doppler frequency.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% OUTPUT:
% lambda : lambda = R/Rrms where R is the lev... |
github | MatCip/Simulation_wireless_channels-master | plot_all.m | .m | Simulation_wireless_channels-master/simulation_final/rayleigh/plot_all.m | 11,263 | utf_8 | 33c2e81974d2bb87364373b109d19f39 | %% this function plots all the results
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% plot all
function plot_all()
close all;
load('data/all_data.mat')
clc; disp('plotting...')
global delta_t;
... |
github | MatCip/Simulation_wireless_channels-master | gen_channel.m | .m | Simulation_wireless_channels-master/simulation_final/rayleigh/gen_channel.m | 8,027 | utf_8 | 95e0c7cfd00be2996af5b3813972ac23 | %% this function implement the channel based on the work of Jakes, Pop-Beaulieu and Xiao-Zheng.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% INPUT:
% M : N = 4*M+2 where N is the number of oscillators in the Jakes
% simulator,
% fd : the doppler frequency,... |
github | MatCip/Simulation_wireless_channels-master | get_LCR_AFD.m | .m | Simulation_wireless_channels-master/simulation_final/rayleigh/get_LCR_AFD.m | 2,754 | utf_8 | f8bb6f77466614272e057eefedab0272 | %% this function compute the LCR and the AFD.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% INPUT:
% g : fading,
% fd : doppler frequency.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% OUTPUT:
% lambda : lambda = R/Rrms where R is the lev... |
github | MatCip/Simulation_wireless_channels-master | gen_channel_IIR.m | .m | Simulation_wireless_channels-master/simulation_final/rayleigh/gen_channel_IIR.m | 5,264 | utf_8 | e8c2f73e792bba3624f421765c385585 | %% this function compute the channel based on the work of Komninakis.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% OUTPUT:
% g : fading,
% pdf_abs : pdf of the absolute value of g,
% pdf_ph : pdf of the phase of g,
% R : a cell that contains the autocorrelations and ... |
github | damianomal/Shearlet-Framework-master | AxelRot.m | .m | Shearlet-Framework-master/shearlets_utils/AxelRot.m | 3,606 | utf_8 | 35b06e6d09ea3b89a8386c5c63ddc83a | function varargout=AxelRot(varargin)
%Generate roto-translation matrix for the rotation around an arbitrary line in 3D.
%The line need not pass through the origin. Optionally, also, apply this
%transformation to a list of 3D coordinates.
%
%SYNTAX 1:
%
% M=AxelRot(deg,u,x0)
%
%
%in:
%
% u, x0: 3D vectors specifying... |
github | damianomal/Shearlet-Framework-master | munkres.m | .m | Shearlet-Framework-master/shearlets_to_reorganize/munkres.m | 6,971 | utf_8 | d287696892e8ef857858223a49ad48fd | function [assignment,cost] = munkres(costMat)
% MUNKRES Munkres (Hungarian) Algorithm for Linear Assignment Problem.
%
% [ASSIGN,COST] = munkres(COSTMAT) returns the optimal column indices,
% ASSIGN assigned to each row and the minimum COST based on the assignment
% problem represented by the COSTMAT, where the (i,j... |
github | damianomal/Shearlet-Framework-master | benchminmax.m | .m | Shearlet-Framework-master/shearlets_to_reorganize/MinMaxFilterFolder/benchminmax.m | 1,913 | utf_8 | d889c60b2507d650848cb3c47da26a7c | function benchminmax()
% function benchminmax()
%
% Benchmark runtime minmax filter among four methods: Matlab vectorized,
% for-loop, Lemire's MEX files, and vanherk by Frederico D'Almeida
%
try
lemire_engine(1,1);
catch
minmaxfilter_install();
end
% Data
fprintf('Random, win=100\n');
B = randperm(100000)... |
github | damianomal/Shearlet-Framework-master | vanherk.m | .m | Shearlet-Framework-master/shearlets_to_reorganize/MinMaxFilterFolder/vanherk.m | 4,757 | utf_8 | b2f034412c598fc54a59c79d1c7547fa | function Y = vanherk(X,N,TYPE,varargin)
% VANHERK Fast max/min 1D filter
%
% Y = VANHERK(X,N,TYPE) performs the 1D max/min filtering of the row
% vector X using a N-length filter.
% The filtering type is defined by TYPE = 'max' or 'min'. This function
% uses the van Herk algorithm for min/max filters th... |
github | damianomal/Shearlet-Framework-master | slowminmaxfilt_algo.m | .m | Shearlet-Framework-master/shearlets_to_reorganize/MinMaxFilterFolder/slowminmaxfilt_algo.m | 2,710 | utf_8 | 5f0d989708867b1e7759e19c2bd356c1 | function [minval maxval] = slowminmaxfilt_algo(a, window)
%
% function [minval maxval] = slowminmaxfilt_algo(a, window)
%
% This function uses to illustrate how Lemire's streaming min/max
% works. It is NOT recommended to use in your application.
% This algorithm is used by this package
%
% Reference: Lemire's "STREAMI... |
github | damianomal/Shearlet-Framework-master | SLgetShearlets3D.m | .m | Shearlet-Framework-master/ShearLab3Dv11/Util/SLgetShearlets3D.m | 8,630 | utf_8 | 7c91f62f439af4ab25bd792d48818770 | function [shearlets,RMS,dualFrameWeights] = SLgetShearlets3D(preparedFilters,shearletIdxs)
%SLgetShearlets3D Compute 3D shearlets in the frequency domain.
%
%Usage:
%
% [shearlets, RMS, dualFrameWeights] = SLgetShearlets3D(preparedFilters)
% [shearlets, RMS, dualFrameWeights] = SLgetShearlets3D(preparedFilters, shearl... |
github | libertysoft3/saidit-master | newlink.m | .m | saidit-master/r2/r2/templates/newlink.m | 6,347 | utf_8 | 1a12dbd14cb171dd5f7d09819ee64b05 | ## The contents of this file are subject to the Common Public Attribution
## License Version 1.0. (the "License"); you may not use this file except in
## compliance with the License. You may obtain a copy of the License at
## http://code.reddit.com/LICENSE. The License is based on the Mozilla Public
## License Version ... |
github | libertysoft3/saidit-master | widgetdemopanel.m | .m | saidit-master/r2/r2/templates/widgetdemopanel.m | 9,113 | utf_8 | 40974db660788dadafaaa7b008e93bbc | ## The contents of this file are subject to the Common Public Attribution
## License Version 1.0. (the "License"); you may not use this file except in
## compliance with the License. You may obtain a copy of the License at
## http://code.reddit.com/LICENSE. The License is based on the Mozilla Public
## License Version ... |
github | vandermeerlab/MountainSort-Hackathon-master | readmda_block.m | .m | MountainSort-Hackathon-master/matlab/mdaio/readmda_block.m | 2,963 | utf_8 | 038ab7452375ecd0557ffa24df272223 | function A=readmda_block(fname,index0,size0)
%READMDA - read a subarray from an .mda file.
%
% Syntax: A=readmda_block(fname,index0,size0)
%
% Inputs:
% fname - path to the .mda file
% index0 - the array index, e.g., [1,1,1000], to start reading
% size0 - the size of the array to use
% The length ... |
github | vandermeerlab/MountainSort-Hackathon-master | writemda.m | .m | MountainSort-Hackathon-master/matlab/mdaio/writemda.m | 3,745 | utf_8 | 92328d2311adcaa732cd4738ee391fc0 | function writemda(X,fname,dtype)
%WRITEMDA - write to a .mda file. MDA stands for
%multi-dimensional array.
%
% See http://magland.github.io//articles/mda-format/
%
% Syntax: writemda(X,fname)
%
% Inputs:
% X - the multi-dimensional array
% fname - path to the output .mda file
% dtype - 'complex32',... |
github | vandermeerlab/MountainSort-Hackathon-master | mp_run_process.m | .m | MountainSort-Hackathon-master/matlab/wrap/mp_run_process.m | 1,247 | utf_8 | faf321249ca562430c66c06f8ce102b8 | function mp_run_process(processor_name,inputs,outputs,params,opts)
%% Example: mp_run_process('mountainsort.bandpass_filter',struct('timeseries','tetrode6.mda'),struct('timeseries_out','tetrode6_filt.mda'),struct('samplerate',32556,'freq_min',300,'freq_max',6000));
if nargin<4, params=struct; end;
if nargin<5, opts=s... |
github | aida-alvera/DINEOF-master | dineof.m | .m | DINEOF-master/Scripts/Matlab/dineof.m | 4,327 | utf_8 | ee2dc9735e04629dad991bf1abff3fb2 | % filled = dineof(data,...)
% run DINEOF from Matlab/Octave. data is a 3-d matrix with the dimensions
% longitude, latitude and time.
%
% INSTALLATION: place the binary dineof (or dineof.exe under PC) in the parent
% directory (relative to this script dineof.m) or set the option 'exec'
% described below.
%
% Optiona... |
github | aida-alvera/DINEOF-master | gzfopen.m | .m | DINEOF-master/Scripts/Matlab/IO/gzfopen.m | 563 | utf_8 | 6a9cfc7af379fe303596c7119a18b424 | % fid=gzfopen(fname,permisson,machineformat)
%
% same as fopen except that the file is decompressed if it ends
% with ".gz" or ".bz2"
%
%
% Alexander Barth
function fid=gzfopen(fname,permisson,machineformat)
global GZ_FILE_IDS GZ_FILE_NAMES
if isempty(GZ_FILE_NAMES)
GZ_FILE_NAMES={};
end
[fname] = gread_tilde_... |
github | aida-alvera/DINEOF-master | gzfclose.m | .m | DINEOF-master/Scripts/Matlab/IO/gzfclose.m | 636 | utf_8 | 7ca248f9527f4d19c25c56bdbf4f79a2 | % gzfclose(fid)
%
% same as fclose except that a decompressed temporary file
% is deleted if the file ends with ".gz" or ".bz2"
%
%
% Alexander Barth, 2008-03-19
function fid = gzfclose(fid)
global GZ_FILE_IDS GZ_FILE_NAMES
fid = fclose(fid);
index = [];
if ~isempty(GZ_FILE_IDS)
index = find(GZ_FILE_IDS == fid)... |
github | aida-alvera/DINEOF-master | gwrite.m | .m | DINEOF-master/Scripts/Matlab/IO/gwrite.m | 1,478 | utf_8 | 7b2d3d1136ff74c13e4036c55618e8bb | % flag = gwrite(name,tab)
%
% save a file in GHER format or a NetCDF variable in NetCDF file
%
% Input:
% name: name of the GHER file or NetCDF file name and
% variable name concanenated by a #
% tab: the variable to save
%
%
% Output:
% flag: 1 on success; 0 otherwise
%
% Example:
%
% For GHER format:
... |
github | aida-alvera/DINEOF-master | gread.m | .m | DINEOF-master/Scripts/Matlab/IO/gread.m | 2,244 | utf_8 | 8926ef7fee41c4a6fc5506762e65c839 | % tab = gread(name)
%
% loads a NetCDF variable from a NetCDF file
%
% Input:
% name: file name and variable name concanenated by a #
%
% Output:
% tab: the loaded variable
%
% Example:
%
% Tair = gread('atm.nc#Tair')
%
% Alexander Barth, 2007-08-03
function [tab,info] = gread(name)
[name] = gread_tilde_expand(n... |
github | aida-alvera/DINEOF-master | gread_tilde_expand.m | .m | DINEOF-master/Scripts/Matlab/IO/gread_tilde_expand.m | 242 | utf_8 | e913f0b4efa099bad7dec370f5213492 | % replace ~ by home dir
% (function build-in in octave)
%
% Alexander Barth, 2008-07-16
function [fname] = gread_tilde_expand(fname)
homedir = getenv('HOME');
if ~isempty(homedir) & fname(1) == '~'
fname = strrep(fname,'~',homedir);
end
|
github | aida-alvera/DINEOF-master | uwrite.m | .m | DINEOF-master/Scripts/Matlab/IO/uwrite.m | 2,139 | utf_8 | 35fb074ced648dbfa125972e7686cbfe | % [flag]=uwrite(file,c4,imax,jmax,kmax,valex,nbmots)
%
% low-level routine for writing data redable by a Fortran program
%
% Input:
% file: filename
% c4: data
% imax,jmax,kmax: size of the array
% valex: exclusion value
% nbmots: word length
%
% Output:
% flag: 1 is successful
%
% Example:
%
% [flag] = uread('f... |
github | aida-alvera/DINEOF-master | uread.m | .m | DINEOF-master/Scripts/Matlab/IO/uread.m | 1,960 | utf_8 | 47b2752727884afb4cf99a64487076e0 | % [flag,data,imax,jmax,kmax,valex,nbmots,format] = uread(file)
%
% low-level routine for loading Fortran files
%
% Input:
% file: filename
%
% Output:
% flag: 1 is successful
% c4: data
% imax,jmax,kmax: size of the array
% valex: exclusion value
% nbmots: word length
%
% Example:
%
% [flag,c4,imax,jmax,kmax,val... |
github | aida-alvera/DINEOF-master | filelist.m | .m | DINEOF-master/Scripts/Matlab/IO/filelist.m | 556 | utf_8 | b53ab0ff1f7ea38eb800613e23df57ed | % files = filelist(pattern);
% create a list of a file names matching the pattern (include wild-cards such as *)
% expands ~ to home directory and sorts all files alphabetically
function files = filelist(pattern);
pattern = gread_tilde_expand(pattern);
i = regexp(pattern,'[#(]');
if ~isempty(i)
subset = pattern(... |
github | aida-alvera/DINEOF-master | ureadslice.m | .m | DINEOF-master/Scripts/Matlab/rcv/ureadslice.m | 1,273 | utf_8 | 8591b1eb682e1d681ab4d607a013ba29 | % -----------------------------------------------------
% ------------ GHER file : read function --------------
% ------------ for MATLAB routines --------------------
% ------------ M. Rixen 2000 --------------------------
function tab = ureadslice(fidslice,imax,jmax,kmax,valex,nbmots,nl,ir,pastread)
%ide=1... |
github | aida-alvera/DINEOF-master | ureadsingle.m | .m | DINEOF-master/Scripts/Matlab/rcv/ureadsingle.m | 1,321 | utf_8 | d214da91558aad236a564427ada0f285 | % -----------------------------------------------------
% ------------ GHER file : read function --------------
% ------------ for MATLAB routines --------------------
% ------------ M. Rixen 2000 --------------------------
% optimisation: 03/04/2003
% Alexander
function [flag,c4,imax,jmax,kmax,valex,nbmots... |
github | aida-alvera/DINEOF-master | ureadslicedouble.m | .m | DINEOF-master/Scripts/Matlab/rcv/ureadslicedouble.m | 1,273 | utf_8 | d403e8db2356ea6516bec5b1063079b2 | % -----------------------------------------------------
% ------------ GHER file : read function --------------
% ------------ for MATLAB routines --------------------
% ------------ M. Rixen 2000 --------------------------
function tab = ureadslice(fidslice,imax,jmax,kmax,valex,nbmots,nl,ir,pastread)
%ide=1... |
github | aida-alvera/DINEOF-master | uread.m | .m | DINEOF-master/Scripts/Matlab/rcv/uread.m | 1,321 | utf_8 | d214da91558aad236a564427ada0f285 | % -----------------------------------------------------
% ------------ GHER file : read function --------------
% ------------ for MATLAB routines --------------------
% ------------ M. Rixen 2000 --------------------------
% optimisation: 03/04/2003
% Alexander
function [flag,c4,imax,jmax,kmax,valex,nbmots... |
github | aida-alvera/DINEOF-master | ureaddouble.m | .m | DINEOF-master/Scripts/Matlab/rcv/ureaddouble.m | 1,321 | utf_8 | b62044134ddb9218c9597118eeaaaa8f | % -----------------------------------------------------
% ------------ GHER file : read function --------------
% ------------ for MATLAB routines --------------------
% ------------ M. Rixen 2000 --------------------------
% optimisation: 03/04/2003
% Alexander
function [flag,c4,imax,jmax,kmax,valex,nbmots... |
github | oiwic/QOS-master | spectroscopy1_zpa_bndSwp.m | .m | QOS-master/qos/+data_taking/+public/+xmon/spectroscopy1_zpa_bndSwp.m | 2,326 | utf_8 | 2b4653159d4d8231fadea4c5358e1ffe | function varargout = spectroscopy1_zpa_bndSwp(varargin)
% spectroscopy1: qubit spectroscopy with band sweep
%
% <_o_> = spectroscopy1_zpa_bndSwp('qubit',_c&o_,'biasAmp',<[_f_]>,...
% 'swpBandCenterFcn',<_o_>,'swpBandWdth',<[_f_]>,...
% 'driveFreq',<[_f_]>,...
% 'notes',<_c_>,'gui',<_b_>,'save',<_b_>)... |
github | oiwic/QOS-master | spectroscopy111_zpa_s21.m | .m | QOS-master/qos/+data_taking/+public/+xmon/spectroscopy111_zpa_s21.m | 2,856 | utf_8 | 0edd98df80fbf837c1bd3a0eb4f24a9a | function varargout = spectroscopy111_zpa_s21(varargin)
% qubit spectroscopy of one qubit with s21 as measurement data.
% comparison: spectroscopy111_zpa and spectroscopy111_zdc measure
% probability of |1>.
% spectroscopy1_zpa_s21 is used during tune up when mesurement of
% probability of |1> has not been setup.
%
% ... |
github | oiwic/QOS-master | zDelay.m | .m | QOS-master/qos/+data_taking/+public/+xmon/zDelay.m | 1,973 | utf_8 | 71a050af492f440a8d192986744c5832 | function varargout = zDelay(varargin)
% measures the syncronization of Z pulse
%
% <_o_> = zDelay('qubit',_c&o_,'zAmp',[_f_],'zLn',<_i_>,'zDelay',[_i_],...
% 'notes',<_c_>,'gui',<_b_>,'save',<_b_>)
% _f_: float
% _i_: integer
% _c_: char or char string
% _b_: boolean
% _o_: object
% a&b: default type is a, but t... |
github | oiwic/QOS-master | T1_111.m | .m | QOS-master/qos/+data_taking/+public/+xmon/T1_111.m | 2,409 | utf_8 | 66b636c06d1d3dc5969f0d939dc0ba6a | function varargout = T1_111(varargin)
% T1_111: T1
% bias qubit q1, drive qubit q2 and readout qubit q3,
% q1, q2, q3 can be the same qubit or diferent qubits,
% q1, q2, q3 all has to be the selected qubits in the current session,
%
% <_o_> = T1_111('biasQubit',_c&o_,'biasAmp',<[_f_]>,'biasDelay',<_i_>,...
% 'ba... |
github | oiwic/QOS-master | rabi_amp111.m | .m | QOS-master/qos/+data_taking/+public/+xmon/rabi_amp111.m | 3,875 | utf_8 | 83ad002e265f66ca9a58436dbb826434 | function varargout = rabi_amp111(varargin)
% rabi_amp111: Rabi oscillation by changing the pi pulse amplitude
% bias qubit q1, drive qubit q2 and readout qubit q3,
% q1, q2, q3 can be the same qubit or different qubits,
% q1, q2, q3 all has to be the selected qubits in the current session,
% the selelcted qubits can be... |
github | oiwic/QOS-master | qqRamsey.m | .m | QOS-master/qos/+data_taking/+public/+xmon/qqRamsey.m | 2,408 | utf_8 | 3c6834b41ad5c353db6da28178578291 | function qqRamsey(varargin)
% qqRamsey: two qubits ramsey for the calibration of the phase offset between
% two qubits by simultaneously applying a 90 deg. X pulse on qubit1 and and a 90 theta
% pulse on qubit2, where theta is an adjustable microwave phase angle. A plot of the
% occupation probabilities versus free evo... |
github | oiwic/QOS-master | spectroscopy111_zpa.m | .m | QOS-master/qos/+data_taking/+public/+xmon/spectroscopy111_zpa.m | 2,877 | utf_8 | 21920f76346deeaf9ad2c9362c2c76d1 | function varargout = spectroscopy111_zpa(varargin)
% spectroscopy111: qubit spectroscopy
% bias qubit q1, drive qubit q2 and readout qubit q3,
% q1, q2, q3 can be the same qubit or different qubits,
% q1, q2, q3 all has to be the selected qubits in the current session,
% the selelcted qubits can be listed with:
% QS.lo... |
github | oiwic/QOS-master | resonatorT1.m | .m | QOS-master/qos/+data_taking/+public/+xmon/resonatorT1.m | 2,217 | utf_8 | 847a32f673eaaf013f8d7816cc05e1ff | function varargout = resonatorT1(varargin)
% resonatorT1: resonator T1
% bias qubit q1, drive qubit q2 and readout qubit q3,
% q1, q2, q3 can be the same qubit or diferent qubits,
% q1, q2, q3 all has to be the selected qubits in the current session,
%
% <_o_> = resonatorT1('qubit',_c&o_,...
% 'swpPiAmp',_f_,'bi... |
github | oiwic/QOS-master | rabi_long1.m | .m | QOS-master/qos/+data_taking/+public/+xmon/rabi_long1.m | 2,288 | utf_8 | 410a1139572d845e4bd9af561e2bdbce | function varargout = rabi_long1(varargin)
% rabi_long1: Rabi oscillation by changing the pi pulse length
% bias, drive and readout all one qubit
%
% <_o_> = rabi_long1('qubit',_c&o_,'biasAmp',[_f_],'biasLonger',<_i_>,...
% 'xyDriveAmp',[_f_],'driveTyp',<_c_>,...
% 'dataTyp','_c_',... % S21 or P
% '... |
github | oiwic/QOS-master | qqSwap.m | .m | QOS-master/qos/+data_taking/+public/+xmon/qqSwap.m | 2,547 | utf_8 | 14df6122e60b4583bac79a9d77a95329 | function qqSwap(varargin)
% twoQSwap: two qubits swap
% bias qubit q1 or q2, drive qubit q1 and q2, readout qubit q1 or q2,
% q1, q2 all has to be the selected qubits in the current session,
%
% <_o_> = qqQSwap('qubit1',_o&c_,'qubit2',_o&c_,...
% 'biasQubit',<_i_>,'biasAmp',[_f_],'biasDelay',<_i_>,...
% 'q... |
github | oiwic/QOS-master | T1_1_s21.m | .m | QOS-master/qos/+data_taking/+public/+xmon/T1_1_s21.m | 1,972 | utf_8 | 3be240682b75c624b34889b7393e9367 | function varargout = T1_1_s21(varargin)
% T1_1_s21: T1
% bias qubit q1, drive qubit q2 and readout qubit q3,
% q1, q2, q3 can be the same qubit or diferent qubits,
% q1, q2, q3 all has to be the selected qubits in the current session,
%
% <_o_> = T1_111('qubit',_c&o_,'biasAmp',<[_f_]>,...
% 'time',[_i_],'r_avg',... |
github | oiwic/QOS-master | xyGateAmpTuner.m | .m | QOS-master/qos/+data_taking/+public/+xmon/+tuneup/xyGateAmpTuner.m | 9,767 | utf_8 | 90704a2d52efa716cc821c7cba76299d | function varargout = xyGateAmpTuner(varargin)
% tune xy gate amplitude: X, X/2, -X/2, X/4, -X/4, Y, Y/2, -Y/2, Y/4, -Y/4
%
% <_f_> = xyGateAmpTuner('qubit',_c&o_,'gateTyp',_c_,...
% 'AE',<_b_>,'AENumPi',<_i_>,... % insert multiple Idle gate(implemented by two pi rotations) to Amplify Error or not
% 'gui',<_b_>... |
github | oiwic/QOS-master | FlxQbtSpcFit.m | .m | QOS-master/qos/+toolbox/+data_tool/FlxQbtSpcFit.m | 2,757 | utf_8 | d8f10cf0592d56e5652cd8cb69437a6f | function FlxQbtSpcFit()
% fit flux qubit spectrum by openning the spectrum figure file
% how to use:
% just run this funcion.
% Copyright 2015 Yulin Wu, Institute of Physics, Chinese Academy of Sciences
% mail4ywu@gmail.com/mail4ywu@icloud.com
persistent lastselecteddir
if isempty(lastselecteddir) || ~exist(l... |
github | oiwic/QOS-master | FitQ.m | .m | QOS-master/qos/+toolbox/+data_tool/ExtractQ/FitQ.m | 1,714 | utf_8 | 5fcdc9ffed99161b2ef7bf7ffe19a4af | function [Qi,Qc,varargout] = FitQ(df,invs21,plotfilt)
% fit internal quality factors(Qi) and coupling quality factors(Qc) of
% a resonator from its normalized transmission invs21 = 1/S21.
% df = (f-f0)/f0 is the normalized frequency, f0 is the resonance
% frequency.
% plotfilt: true/false, optional,... |
github | oiwic/QOS-master | SXPParse.m | .m | QOS-master/qos/+toolbox/+data_tool/ExtractQ/SXPParse.m | 13,880 | utf_8 | 4ec2f38203a1b9371c05371bc2e82f3b | function [freq, data, freq_noise, data_noise, Zo] = SXPParse(DataFileName, fid_log)
% reads .sxp file data in MDIF (a.k.a. Touchstone / HPEEsof format)
%
% EXAMPLE :
% [freq, data, freq_noise, data_noise, Zo] = SXPParse(DataFileName, fid_log);
%
% freq, freq_noise - 1xF arrays
% data - PxPxF matrix, P- n... |
github | oiwic/QOS-master | sinDecayFit_auto.m | .m | QOS-master/qos/+toolbox/+data_tool/+fitting/sinDecayFit_auto.m | 5,619 | utf_8 | 03f8f2cc253692f1ae4087520e90d98b | function [A,B,C,D,freq,td,varargout] = sinDecayFit_auto(t,P,varargin)
% SinDecayFit fits curve P = P(t) with a Sinusoidal Decay function:
% P = A +B*(exp(-t/td)*(sin(2*pi*freq*t+D)+C));
% t unit should be nano-second.
% Original data length should not less than 20 (length(t)>20)
%
% A function call returns the followin... |
github | oiwic/QOS-master | sinDecayFitTilt.m | .m | QOS-master/qos/+toolbox/+data_tool/+fitting/sinDecayFitTilt.m | 1,595 | utf_8 | 9187160bc61d77983180e6a75bde16af | function [A,B,C,D,freq,td,varargout] = sinDecayFitTilt(t,P,...
A0,ABnd,...
B0,BBnd,...
C0,CBnd,...
D0,DBnd,...
freq0,freqBnd,...
td0,tdBnd)
% SinDecayFit fits curve P = P(t) with a Sinusoidal Decay function:
% P = A +B*(exp(-t/td)*(sin(2*pi*freq*t+D)+C));
%
% varargout{1}: ci, 6 by 2 matrix, ci(... |
github | oiwic/QOS-master | gaussianFit.m | .m | QOS-master/qos/+toolbox/+data_tool/+fitting/gaussianFit.m | 827 | utf_8 | f903cbe5ed82911baa93c9e673524009 | function [a, x0, sigma, y0, varargout] = gaussianFit(x,y,a0,x00,sigma0,y00)
% fit data x to a gaussian:
% y = a*exp(-(x-x0)^2/(2*sigma^2)) + y0
%
% Yulin Wu, SC5,IoP,CAS. wuyulin@ssc.iphy.ac.cn/mail4ywu@gmail.com
Coefficients(1) = a0;
Coefficients(2) = x0;
Coefficients(3) = sigma0;
Coefficients(4) = ... |
github | oiwic/QOS-master | sinDecayFitNoTilt.m | .m | QOS-master/qos/+toolbox/+data_tool/+fitting/sinDecayFitNoTilt.m | 1,297 | utf_8 | 5fab97a26550d707281a89c911c4da81 | function [B,C,D,freq,td,varargout] = sinDecayFitNoTilt(t,P,...
B0,BBnd,...
C0,CBnd,...
D0,DBnd,...
freq0,freqBnd,...
td0,tdBnd)
% SinDecayFit fits curve P = P(t) with a Sinusoidal Decay function:
% P = B*(exp(-t/td)*(sin(2*pi*freq*t+D)+C));
%
% varargout{1}: ci, 5 by 2 matrix, ci(4,1) is the lower ... |
github | oiwic/QOS-master | expDecayFitNoBackground.m | .m | QOS-master/qos/+toolbox/+data_tool/+fitting/expDecayFitNoBackground.m | 1,520 | utf_8 | 7275eee2ec0beb6df3efcac27586f5e4 | function [B,td,varargout] = ExpDecayFit_NoBackground(t,P,varargin)
% ExpDecayFit fits curve P = P(t) with Decay function:
% P = B*exp(-t/td);
%
% optional output: 95% confidence interval of Coefficients
%
% Yulin Wu, SC5,IoP,CAS. wuyulin@ssc.iphy.ac.cn/mail4ywu@gmail.com
% $Revision: 1.0 $ $Date: 2012/04/08 $
B0 ... |
github | oiwic/QOS-master | lorentzianPkFitAdv.m | .m | QOS-master/qos/+toolbox/+data_tool/+fitting/lorentzianPkFitAdv.m | 3,578 | utf_8 | 76f3f3d38569d9609c29c8c7f49b6b26 | function [y0, k1, k2, A, w, x0, varargout] = lorentzianPkFitAdv(x,y,varargin)
% LorentzianPkFit_Adv fits Lorentzian shaped peak/dip (single peak/dip) with a
% linear or almost linear background using the following model:
% y = y0 + k1*x + k2*x^2 + (2*A/pi)*(w/(4*(x-x0)^2+w^2));
% Original data length should not less th... |
github | oiwic/QOS-master | expDecayFit.m | .m | QOS-master/qos/+toolbox/+data_tool/+fitting/expDecayFit.m | 1,673 | utf_8 | 96cfcee3a507130f1260ddb8049712b0 | function [A,B,td,varargout] = ExpDecayFit(t,P,varargin)
% ExpDecayFit fits curve P = P(t) with Decay function:
% P = A +B*exp(-t/td);
%
% optional output: 95% confidence interval of Coefficients
%
% Yulin Wu, SC5,IoP,CAS. wuyulin@ssc.iphy.ac.cn/mail4ywu@gmail.com
% $Revision: 1.0 $ $Date: 2012/04/08 $
A0 = P(end)... |
github | oiwic/QOS-master | sinDecayFit.m | .m | QOS-master/qos/+toolbox/+data_tool/+fitting/sinDecayFit.m | 1,591 | utf_8 | 9eb7058d0cb739052c56eff00a76f641 | function [A,B,C,D,freq,td,varargout] = sinDecayFit(t,P,...
A0,ABnd,...
B0,BBnd,...
C0,CBnd,...
D0,DBnd,...
freq0,freqBnd,...
td0,tdBnd)
% SinDecayFit fits curve P = P(t) with a Sinusoidal Decay function:
% P = A +B*(exp(-t/td)*(sin(2*pi*freq*t+D)+C));
%
% varargout{1}: ci, 6 by 2 matrix, ci(5,1)... |
github | oiwic/QOS-master | RBFit.m | .m | QOS-master/qos/+toolbox/+data_tool/+fitting/RBFit.m | 738 | utf_8 | 42a5935e890715a216623be994b9ea84 | function [A,B,p,varargout] = RBFit(m,P,...
A0,ABnd,...
B0,BBnd,...
p0,pBnd)
% fit randomized benchmarking data
if nargin < 3
A0 = range(P);
ABnd = [0.9*A0, 1.1];
B0 = P(end);
BBnd = [0, 1.1*B0];
p0 = 0.97;
pBnd = [0.5,1];
end
Coefficients(1) = A0;
Coefficients(2) = B0;
Coefficients... |
github | oiwic/QOS-master | lorentzianPkFit.m | .m | QOS-master/qos/+toolbox/+data_tool/+fitting/lorentzianPkFit.m | 2,882 | utf_8 | f5154da3d577520c5609e2cb81e7c265 | function [y0, A, w, x0, varargout] = lorentzianPkFit(x,y,varargin)
% LorentzianPkFit fits Lorentzian shaped peak/dip (single peak/dip)
% y = y0 + (2*A/pi)*(w/(4*(x-x0)^2+w^2));
% Original data length should not less than 20 (length(x)>20)
%
% A function call returns the following fitting Coefficients:
% y0, A, w(FWHM),... |
github | oiwic/QOS-master | lorentzianFit.m | .m | QOS-master/qos/+toolbox/+data_tool/+fitting/lorentzianFit.m | 834 | utf_8 | b040f6192990d8318742926f16f1640a | function [A, w, y0, x0, varargout] = gaussianFit(x,y,a0,x00,sigma0)
% fit data x to a lorentzian:
% y = y0 + (2*A/pi)*(w/(4*(x-x0)^2+w^2));
%
% Yulin Wu, SC5,IoP,CAS. wuyulin@ssc.iphy.ac.cn/mail4ywu@gmail.com
Coefficients(1) = y00;
Coefficients(2) = A0;
Coefficients(3) = w0;
Coefficients(4) = x00;
... |
github | oiwic/QOS-master | cosFit.m | .m | QOS-master/qos/+toolbox/+data_tool/+fitting/cosFit.m | 980 | utf_8 | ca956e3f2cd032cd5d505b7f6f3deba9 | function [A,B,C,freq,varargout] = cosFit(t,P,...
A0,ABnd,...
B0,BBnd,...
C0,CBnd,...
freq0,freqBnd)
% SinDecayFit fits curve P = P(t) with a Sinusoidal Decay function:
% P = A*(cos(2*pi*freq*t+B)+C));
%
% varargout{1}: ci, 4 by 2 matrix, ci(4,1) is the lower bound of 'freq'
%
% Yulin Wu, SC5,IoP,CAS. ma... |
github | oiwic/QOS-master | expDecayFit4fig.m | .m | QOS-master/qos/+toolbox/+data_tool/+fitting/+scripts/expDecayFit4fig.m | 2,308 | utf_8 | 2fb0b9b205253426ada8203a3cfeed73 | function expDecayFit4fig()
% Fit exponential decay data by load the figure file in which the data is
% plotted. Fit results are displayed in the cmd window and plotted on to the the figure.
% How to use: just run this funciton, no input arguments needed.
%
% Yulin Wu, SC5,IoP,CAS. wuyulin@ssc.iphy.ac.cn/mail4ywu@gmai... |
github | oiwic/QOS-master | SinDecayFit.m | .m | QOS-master/qos/+toolbox/+data_tool/+fitting/SinDecayFit/fitfunc/SinDecayFit.m | 5,490 | utf_8 | c5851b5442a388111510426ecca97e29 | function [A,B,C,D,freq,td,varargout] = SinDecayFit(t,P,varargin)
% SinDecayFit fits curve P = P(t) with a Sinusoidal Decay function:
% P = A +B*(exp(-t/td)*(sin(2*pi*freq*t+D)+C));
% t unit should be nano-second.
% Original data length should not less than 20 (length(t)>20)
%
% A function call returns the following fit... |
github | oiwic/QOS-master | DSinDecayFit.m | .m | QOS-master/qos/+toolbox/+data_tool/+fitting/SinDecayFit/fitfunc/DSinDecayFit.m | 1,574 | utf_8 | f7fa7a681ba575ca2988cea163efcb75 | function [A,B1,C1,D1,freq1,td1,B2,C2,D2,freq2,td2] = DSinDecayFit(t,P,A0,B0,C0,D0,freq0,td0)
% SinDecayFit fits curve P = P(t) with a Sinusoidal Decay function:
% P = A +B1*(exp(-t/td1)*(sin(2*pi*freq1*t+D1)+C1))+B2*(exp(-t/td2)*(sin(2*pi*freq2*t+D2)+C2));
% t unit should be nano-second.
%
% Yulin Wu, SC5,IoP,CAS. mail... |
github | oiwic/QOS-master | SinDecayFit_G.m | .m | QOS-master/qos/+toolbox/+data_tool/+fitting/SinDecayFit/fitfunc/SinDecayFit_G.m | 5,502 | utf_8 | 37605efcff04c56296a1d008f3931ba7 | function [A,B,C,D,freq,td,varargout] = SinDecayFit_G(t,P,varargin)
% SinDecayFit fits curve P = P(t) with a Sinusoidal Decay function:
% P = A +B*(exp(-(t/td).^2)*(sin(2*pi*freq*t+D)+C));
% t unit should be nano-second.
% Original data length should not less than 20 (length(t)>20)
%
% A function call returns the follow... |
github | oiwic/QOS-master | inlineCallbacks.m | .m | QOS-master/qos/+mtwisted/+defer/inlineCallbacks.m | 7,599 | utf_8 | 0e0f303ff4ee61aa35b4930e170d2555 | function new_f = inlineCallbacks(f)
% inlineCallbacks helps you write L{Deferred}-using code that looks like a
% regular sequential function. For example::
% @inlineCallbacks
% def thingummy():
% thing = yield makeSomeRequestResultingInDeferred()
% print(thing) # the res... |
github | oiwic/QOS-master | RE.m | .m | QOS-master/qos/+app/RE.m | 63 | utf_8 | bde05fcab817305e123936e51aad3b31 | % Open RegistryEditor
function RE()
qes.app.RegEditor;
end |
github | oiwic/QOS-master | DV.m | .m | QOS-master/qos/+app/DV.m | 60 | utf_8 | 396271d0e2cfed99f73f7cd432cf5480 | % Open DataViewer
function DV()
qes.app.DataViewer;
end |
github | oiwic/QOS-master | breakyaxis.m | .m | QOS-master/qos/+misc/breakyaxis.m | 11,688 | utf_8 | 8f631ebff0d84d743e8ee60e7fe1ca00 |
% breakyaxes splits data in an axes so that data is in a low and high pane.
%
% breakYAxes(splitYLim) splitYLim is a 2 element vector containing a range
% of y values from splitYLim(1) to splitYLim(2) to remove from the axes.
% They must be within the current yLimis of the axes.
%
% breakYAxes(splitYLim,splitH... |
github | oiwic/QOS-master | CodeCounter.m | .m | QOS-master/qos/+misc/CodeCounter.m | 1,952 | utf_8 | f5c3c150cc96c24c020bbda733250130 | function NumLines = CodeCounter(DirName,CodeFileSurfix)
[FilePaths, FileNames]= GetAllFiles(DirName);
NFiles = numel(FilePaths);
ln_s = length(CodeFileSurfix);
NumLines = 0;
NumClasses = 0;
NumFcns = 0;
for ii = 1:NFiles
if length(FileNames{ii}) < ln_s || ~strcmp(FileNames{ii}(end-... |
github | oiwic/QOS-master | questdlg_multi.m | .m | QOS-master/qos/+qes/+ui/questdlg_multi.m | 8,537 | utf_8 | eea135f1f91ae6fa64d606f59d7f8e2a | function choise=questdlg_multi(dlgOptions, dlgTitle, defOption, qStr, bttnsOredring)
%% bttnChoiseDialog
% Create and open a button dialog box with many buttons.
%
%% Syntax
% bttnChoiseDialog(dlgOptions);
% bttnChoiseDialog(dlgOptions, dlgTitle);
% bttnChoiseDialog(dlgOptions, dlgTitle, defOption);
% bttnChoiseD... |
github | oiwic/QOS-master | waitbar2a.m | .m | QOS-master/qos/+qes/+ui/waitbar2a.m | 16,130 | utf_8 | 7e418c0b09e9df05a79f8a957d7bd145 | function fout = waitbar2a(x, whichbar, varargin)
% WAITBAR2a - Displays wait bar with fancy color shift effect
%
% Adaptation of the MatLab standard waitbar function:
%
% H = WAITBAR2A(X,'title', property, value, property, value, ...)
% creates and displays a waitbar of fractional length X. The
% handle to the w... |
github | oiwic/QOS-master | questdlg_timer.m | .m | QOS-master/qos/+qes/+ui/questdlg_timer.m | 16,415 | utf_8 | 3fe834a1505c8cf39be0a7793f5f9c70 | function ButtonName=questdlg_timer(TimeOutValue,Question,Title,Btn1,Btn2,Btn3,Default)
%QUESTDLG_TIMER Question dialog box.
% ButtonName = QUESTDLG_TIMER(Time, Question) creates a dialog box that
% automatically wraps the cell array or string (vector or matrix)
% Question to fit an appropriately sized window. The n... |
github | oiwic/QOS-master | freezeColors.m | .m | QOS-master/qos/+qes/+ui/+colormap/freezeColors.m | 9,815 | utf_8 | 2068d7a4f7a74d251e2519c4c5c1c171 | function freezeColors(varargin)
% freezeColors Lock colors of plot, enabling multiple colormaps per figure. (v2.3)
%
% Problem: There is only one colormap per figure. This function provides
% an easy solution when plots using different colomaps are desired
% in the same figure.
%
% freezeColors freeze... |
github | oiwic/QOS-master | InitializeInstr.m | .m | QOS-master/qos/+qes/+hwdriver/+async/@MWSource/InitializeInstr.m | 1,589 | utf_8 | e2612624ba84bfc05de506e45ee7bb44 | function d = InitializeInstr(obj)
% Initialize instrument
% set reference oscillator source to auto:
% Applying a 10 MHz signal to the Reference Oscillator connector automatically sets the
% Reference Oscillator to EXTernal, when NO signal is present at the 10 MHz
% Reference Oscillator connector, ... |
github | oiwic/QOS-master | parseJson.m | .m | QOS-master/qos/+qes/+util/parseJson.m | 5,633 | utf_8 | 9c8d0e3758dd872b30beb58b1af01b63 | function [data, json] = parseJson(json)
% [DATA JSON] = PARSE_JSON(json)
% This function parses a JSON(JavaScript Object Notation) string and
% returns a cell array with the parsed data. JSON objects are converted
% to structures and JSON arrays are converted to cell arrays.
%
% Example:
% g... |
github | oiwic/QOS-master | fminsearchbnd.m | .m | QOS-master/qos/+qes/+util/fminsearchbnd.m | 8,543 | utf_8 | 28a42661a739b30bd52aca73ca033601 | function [x,fval,exitflag,output] = fminsearchbnd(fun,x0,LB,UB,options,varargin)
% FMINSEARCHBND: FMINSEARCH, but with bound constraints by transformation
% usage: x=FMINSEARCHBND(fun,x0)
% usage: x=FMINSEARCHBND(fun,x0,LB)
% usage: x=FMINSEARCHBND(fun,x0,LB,UB)
% usage: x=FMINSEARCHBND(fun,x0,LB,UB,options)
% usage: x... |
github | oiwic/QOS-master | hist2d.m | .m | QOS-master/qos/+qes/+util/hist2d.m | 1,145 | utf_8 | c8febdddbcb3728cfcb0f6a26643686c | %function mHist = hist2d ([vY, vX], vYEdge, vXEdge)
%2 Dimensional Histogram
%Counts number of points in the bins defined by vYEdge, vXEdge.
%size(vX) == size(vY) == [n,1]
%size(mHist) == [length(vYEdge) -1, length(vXEdge) -1]
%
%EXAMPLE
% mYX = rand(100,2);
% vXEdge = linspace(0,1,10);
% vYEdge = linspace(0,1,20... |
github | oiwic/QOS-master | ParseJson.m | .m | QOS-master/qos/+qes/+util/@pushover/ParseJson.m | 5,509 | utf_8 | 9afd107ad21f708a06345a7c1e8fc084 | function [data, json] = ParseJson(json)
% [DATA JSON] = PARSE_JSON(json)
% This function parses a JSON(JavaScript Object Notation) string and
% returns a cell array with the parsed data. JSON objects are converted
% to structures and JSON arrays are converted to cell arrays.
%
% Example:
% g... |
github | oiwic/QOS-master | OneMeas_Def.m | .m | QOS-master/qos/+qes/+util/+plotfcn/OneMeas_Def.m | 21,129 | utf_8 | 904024cdd5e7b8ef5ebeb2397709996a | function [varargout] = OneMeas_Def(Data, SweepVals,ParamNames,MainParam,MeasurementName,AX,IsPreview)
% default plot function for data:
% One measurement, measure data are scalar, array or
% maxtrix.
% 2D data is transposed to take the convention of a spectrum plot, the first sweep is taken as y
% T... |
github | oiwic/QOS-master | CreateGUI.m | .m | QOS-master/qos/+qes/+app/@OxfordDRMonitor/CreateGUI.m | 9,662 | utf_8 | a1d1b5c439f3d5d63e97f15cdfb97d17 | function CreateGUI(obj)
%
% Copyright 2015 Yulin Wu, Institute of Physics, Chinese Academy of Sciences
% mail4ywu@gmail.com/mail4ywu@icloud.com
AlertSchemeOptions = {'Idle','Base Temperature','Warming up','Cooling down','No Alert'};
choice = questdlg_multi(AlertSchemeOptions, 'Alert options', 'No Alert',... |
github | oiwic/QOS-master | CreateGUI_resizable.m | .m | QOS-master/qos/+qes/+app/@DataViewer/CreateGUI_resizable.m | 27,703 | utf_8 | ba2ffd146e41d53506cdfa54e4098e9a | function CreateGUI_resizable(obj)
% create gui
% Copyright 2015 Yulin Wu, Institute of Physics, Chinese Academy of Sciences
% mail4ywu@gmail.com/mail4ywu@icloud.com
OPSYSTEM = lower(system_dependent('getos'));
if any([strfind(OPSYSTEM, 'microsoft windows xp'),...
strfind(OPSYSTEM, 'microsoft windo... |
github | oiwic/QOS-master | ExtractLine.m | .m | QOS-master/qos/+qes/+app/@DataViewer/ExtractLine.m | 9,860 | utf_8 | 188aca08188af99deb2e69143ed4e96c | function ExtractLine(obj)
%
% Copyright 2015 Yulin Wu, Institute of Physics, Chinese Academy of Sciences
% mail4ywu@gmail.com/mail4ywu@icloud.com
h = figure('Visible','off');
ax = axes('Parent',h);
try
idx = find(obj.previewfiles == obj.currentfile,1);
data = obj.loadeddata{idx};
... |
github | oiwic/QOS-master | CreateGUI_fixed.m | .m | QOS-master/qos/+qes/+app/@DataViewer/CreateGUI_fixed.m | 27,648 | utf_8 | 2f2efd12d894e7e5c2ef3673a59caf77 | function CreateGUI_fixed(obj)
% create gui
% Copyright 2015 Yulin Wu, Institute of Physics, Chinese Academy of Sciences
% mail4ywu@gmail.com/mail4ywu@icloud.com
OPSYSTEM = lower(system_dependent('getos'));
if any([strfind(OPSYSTEM, 'microsoft windows xp'),...
strfind(OPSYSTEM, 'microsoft windows ... |
github | oiwic/QOS-master | Config2TableData.m | .m | QOS-master/qos/+qes/+app/@DataViewer/Config2TableData.m | 2,031 | utf_8 | 78e53a7e5b81e6784cd9b51dd5f754db | function table_data = Config2TableData(Config)
%
% Copyright 2017 Yulin Wu, USTC, China
% mail4ywu@gmail.com/mail4ywu@icloud.com
table_data = {};
if isfield(Config,'fcn')
table_data = [table_data;{'function',Config.fcn}];
end
if isfield(Config,'args')
table_data = [table_data;Struct2T... |
github | oiwic/QOS-master | Ginput.m | .m | QOS-master/qos/+qes/+app/@DataViewer/Ginput.m | 7,888 | utf_8 | 9b62ce36ea9d91f6759289880b144bdc | function [out1,out2,out3] = Ginput(arg1)
%GINPUT Graphical input from mouse.
% [X,Y] = GINPUT(N) gets N points from the current axes and returns
% the X- and Y-coordinates in length N vectors X and Y. The cursor
% can be positioned using a mouse. Data points are entered by pressing
% a mouse button or any key... |
github | oiwic/QOS-master | TableData.m | .m | QOS-master/qos/+qes/+app/@RegEditor/TableData.m | 9,719 | utf_8 | 5fd6b62a84e1f68c46044bdcc454ab77 | function table_data = TableData(obj,name,parentName)
%
% Copyright 2017 Yulin Wu, USTC
% mail4ywu@gmail.com/mail4ywu@icloud.com
switch parentName
case 'hardware settings'
s = obj.qs.loadHwSettings(name);
anno = struct();
if isfield(obj.keyAnnotation.hardware,'comm'... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.