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 | xuyongzhi/INS-VNS-Navigation_Master-master | loadppm.m | .m | INS-VNS-Navigation_Master-master/code_subfunction/commonFcn/toolbox_calib/loadppm.m | 2,355 | utf_8 | c8d750733c522f56f3aa17a4ca9f9df1 | %LOADPPM Load a PPM image
%
% I = loadppm(filename)
%
% Returns a matrix containing the image loaded from the PPM format
% file filename. Handles ASCII (P3) and binary (P6) PPM file formats.
%
% If the filename has no extension, and open fails, a '.ppm' and
% '.pnm' extension will be tried.
%
% SEE ALSO: saveppm loadp... |
github | xuyongzhi/INS-VNS-Navigation_Master-master | saveinr.m | .m | INS-VNS-Navigation_Master-master/code_subfunction/commonFcn/toolbox_calib/saveinr.m | 949 | utf_8 | a18df4fba021be006842fbc35166bc23 | %SAVEINR Write an INRIMAGE format file
%
% SAVEINR(filename, im)
%
% Saves the specified image array in a INRIA image format file.
%
% SEE ALSO: loadinr
%
% Copyright (c) Peter Corke, 1999 Machine Vision Toolbox for Matlab
% Peter Corke 1996
function saveinr(fname, im)
fid = fopen(fname, 'w');
[r,c] = size(im');
... |
github | xuyongzhi/INS-VNS-Navigation_Master-master | stereo_gui.m | .m | INS-VNS-Navigation_Master-master/code_subfunction/commonFcn/toolbox_calib/stereo_gui.m | 6,208 | utf_8 | 6cc48675fdf9c8c36bc147da7d046d06 | % stereo_gui
% Stereo Camera Calibration Toolbox (two cameras, internal and external calibration):
%
% It is assumed that the two cameras (left and right) have been calibrated with the pattern at the same 3D locations, and the same points
% on the pattern (select the same grid points). Therefore, in particular, the sam... |
github | xuyongzhi/INS-VNS-Navigation_Master-master | loadpgm.m | .m | INS-VNS-Navigation_Master-master/code_subfunction/commonFcn/toolbox_calib/loadpgm.m | 1,838 | utf_8 | 6ec18330c2633d5519c72eb2e6fe963b | %LOADPGM Load a PGM image
%
% I = loadpgm(filename)
%
% Returns a matrix containing the image loaded from the PGM format
% file filename. Handles ASCII (P2) and binary (P5) PGM file formats.
%
% If the filename has no extension, and open fails, a '.pgm' will
% be appended.
%
%
% Copyright (c) Peter Corke, 1999 Machin... |
github | xuyongzhi/INS-VNS-Navigation_Master-master | appendimages.m | .m | INS-VNS-Navigation_Master-master/code_subfunction/GetVisualInputData/appendimages.m | 461 | utf_8 | a7ad42558236d4f7bd90dc6e72631d54 | % im = appendimages(image1, image2)
%
% Return a new image that appends the two images side-by-side.
function im = appendimages(image1, image2)
% Select the image with the fewest rows and fill in enough empty rows
% to make it the same height as the other image.
rows1 = size(image1,1);
rows2 = size(image2,1);
if (... |
github | xuyongzhi/INS-VNS-Navigation_Master-master | showkeys.m | .m | INS-VNS-Navigation_Master-master/code_subfunction/GetVisualInputData/showkeys.m | 1,699 | utf_8 | 4e67466c0fd7739350cb2af5767e10a4 | % showkeys(image, locs)
%
% This function displays an image with SIFT keypoints overlayed.
% Input parameters:
% image: the file name for the image (grayscale)
% locs: matrix in which each row gives a keypoint location (row,
% column, scale, orientation)
function showkeys(image, locs)
disp('Drawin... |
github | xuyongzhi/INS-VNS-Navigation_Master-master | match.m | .m | INS-VNS-Navigation_Master-master/code_subfunction/GetVisualInputData/match.m | 1,940 | utf_8 | e876f215400508c0507fd248db781333 | % num = match(image1, image2)
%
% This function reads two images, finds their SIFT features, and
% displays lines connecting the matched keypoints. A match is accepted
% only if its distance is less than distRatio times the distance to the
% second closest match.
% It returns the number of matches displayed.
%
%... |
github | mathouse/AMPD-algorithm-master | ecgsyn.m | .m | AMPD-algorithm-master/MATLAB/ecgsyn.m | 6,819 | utf_8 | 15342694fbaa48cd7d7f37bb73a7d985 | function [s, ipeaks] = ecgsyn(sfecg,N,Anoise,hrmean,hrstd,lfhfratio,sfint,ti,ai,bi)
% [s, ipeaks] = ecgsyn(sfecg,N,Anoise,hrmean,hrstd,lfhfratio,sfint,ti,ai,bi)
% Produces synthetic ECG with the following outputs:
% s: ECG (mV)
% ipeaks: labels for PQRST peaks: P(1), Q(2), R(3), S(4), T(5)
% A zero lablel is output oth... |
github | ExtremeLearningMachines/SS-US-ELM-master | litekmeans.m | .m | SS-US-ELM-master/functions/litekmeans.m | 16,581 | utf_8 | ea475d64e495f67d7f14bbafa671e128 | function [label, center, bCon, sumD, D] = litekmeans(X, k, varargin)
%LITEKMEANS K-means clustering, accelerated by matlab matrix operations.
%
% label = LITEKMEANS(X, K) partitions the points in the N-by-P data matrix
% X into K clusters. This partition minimizes the sum, over all
% clusters, of the within... |
github | ExtremeLearningMachines/SS-US-ELM-master | hungarian.m | .m | SS-US-ELM-master/functions/hungarian.m | 9,229 | utf_8 | 4a7717a0f54da7b38e52b56cc9ab4d69 | function [Matching,Cost] = Hungarian(Perf)
%
% [MATCHING,COST] = Hungarian_New(WEIGHTS)
%
% A function for finding a minimum edge weight matching given a MxN Edge
% weight matrix WEIGHTS using the Hungarian Algorithm.
%
% An edge weight of Inf indicates that the pair of vertices given by its
% position have no ... |
github | jennirinker/dissertation-master | PlotCertTestResults.m | .m | dissertation-master/FAST_compiling/kom.aau/build_structure/fast/CertTest/PlotCertTestResults.m | 24,162 | utf_8 | dcface48f2154147761bf090e60ccbae | % FAST-ADAMS-Simulink CertTest comparisons:
function PlotCertTestResults( newPath, oldPath, PlotFAST, PlotAdams, PlotSimulink )
%function PlotCertTestResults( newPath, oldPath, PlotFAST, PlotAdams, PlotSimulink )
% This function plots the FAST, ADAMS, and/or FAST_SFunc CertTest results,
% comparing .out/.plt, .elm, .... |
github | McStasMcXtrace/iFit-master | findfield.m | .m | iFit-master/Objects/@iData/findfield.m | 9,367 | utf_8 | b56625890675e6ef93fb2f77b5e5582a | function [match, types, dims, sz] = findfield(s, field, option)
% FINDFIELD Find fields, type and number of elements in object.
% match = FINDFIELD(s) returns the name of all fields
%
% match = FINDFIELD(s, field) returns the name of all fields that match 'field'
%
% [match,type,n] = FINDFIELD(s, field, option)
... |
github | McStasMcXtrace/iFit-master | version.m | .m | iFit-master/Objects/@iData/version.m | 7,481 | utf_8 | 11cb690c89108288ecac87c99ce3483a | function [b, vers, info] = version(a,long_request)
% VERSION Return class version
% VERSION(s) return the version of the iData class
%
% VERSION(s, 'long') returns the full version with all contributors.
%
% [str, ver, info] = VERSION(s) returns as well the short version name
% 'ver', and additional information... |
github | McStasMcXtrace/iFit-master | hist.m | .m | iFit-master/Objects/@iData/hist.m | 9,963 | utf_8 | 0f566e95ac0f640657aa94b9b25e06e6 | function c=hist(a, varargin)
% HIST Computes the accumulated histogram from event data sets.
% HIST(a, axis1, axis2, ...) specify the axes as bin edges. The axes
% should be vectors or a single value that indicates the number of bins in the
% range [min, max] of the corresponding axis rank in the initial obj... |
github | McStasMcXtrace/iFit-master | findstr.m | .m | iFit-master/Objects/@iData/findstr.m | 2,664 | utf_8 | 91ab250f5dcf287243fc433e1a7c2886 | function [match, field] = findstr(s, str, option)
% FINDSTR Look for strings within object.
% match = FINDSTR(s) returns all strings in object
%
% match = FINDSTR(s, str) returns the strings in object containg 'str'
%
% match = FINDSTR(s, str, option) the 'option' may contain 'exact' to search
% for the ex... |
github | McStasMcXtrace/iFit-master | jacobian.m | .m | iFit-master/Objects/@iData/jacobian.m | 6,724 | utf_8 | 01c3a9ddc3933d42fecfe73db740d583 | function [b, j] = jacobian(a, varargin)
% JACOBIAN Compute the Jacobian.
% [B,J]=JACOBIAN(S, D) transforms 'S' on the 'D' axes and computes the Jacobian
% from the object current axes to new axes. This is to be used for object
% coordinate/variable changes from the given object axes to new axes. The
% 'from'... |
github | McStasMcXtrace/iFit-master | fileattrib.m | .m | iFit-master/Objects/@iData/fileattrib.m | 3,844 | utf_8 | afee8a6bfa5d15725cae5367336260cb | function [b, location] = fileattrib(a, field, varargin)
% FILEATTRIB Get or set field Attributes
% attribute = FILEATTRIB(s, field) looks for an associated Attribute to a field.
% Attributes are set from e.g. NetCDF/CDF/NeXus/HDF files. They correspond with
% additional information attached to object properties.
... |
github | McStasMcXtrace/iFit-master | findpeaks.m | .m | iFit-master/Objects/@iData/findpeaks.m | 5,824 | utf_8 | 15d20451bf6dc1cd7a67f81c29074c76 | function [pks,locs,extra] = findpeaks(a, dim, varargin)
% FINDPEAKS Find local maxima.
% PKS = FINDPEAKS(A) returns a vector with the local maxima (peaks) of the
% input object.
%
% FINDPEAKS(A, DIM) does the same along dimension DIM with the object
% projection. Specifying DIM=0 works on all dimensions (def... |
github | McStasMcXtrace/iFit-master | axescheck.m | .m | iFit-master/Objects/@iData/axescheck.m | 11,533 | utf_8 | abb9c53a4f4afe9f64dc17a30b104a73 | function s = axescheck(s, option)
% AXESCHECK Check the Signal and Axes of an object.
% AXESCHECK(s) Check Signal and Axes. When not set, the largest numeric
% field is assigned as the Signal, and missing Axes are searched accordingly.
% Monitor and Error are also checked to match Signal dimension.
%
% Usually,... |
github | McStasMcXtrace/iFit-master | smooth.m | .m | iFit-master/Objects/@iData/smooth.m | 5,518 | utf_8 | 14cf492c035df8a436e0031a5a444695 | function b = smooth(a, varargin)
% SMOOTH Smooth objects.
% Z = SMOOTH(Y) automatically smoothes the uniformly-sampled array Y. Y
% can be any N-D noisy array (time series, images, 3D data,...). Non
% finite data (NaN or Inf) are treated as missing values.
%
% The smooth method uses a Robust spline smoothing or... |
github | McStasMcXtrace/iFit-master | edit.m | .m | iFit-master/Objects/@iData/edit.m | 12,451 | utf_8 | e1fa6d1bfaab189e04962082612ef445 | function [h, f] = edit(a, option)
% EDIT Edit object values.
% EDIT(S) show the Signal in object S as a Table. The values are read-only.
% The data appears as a spreadsheet (requires Java to be enabled).
%
% EDIT(S,'editable') edit the Signal values in object S. Values can be changed.
%
% EDIT(iDa... |
github | McStasMcXtrace/iFit-master | fft.m | .m | iFit-master/Objects/@iData/fft.m | 4,544 | utf_8 | 5b43c84fb81d32bf7fb858bd6d805d67 | function b = fft(a, op, dim)
% FFT Discrete Fourier transform.
% C = FFT(A) computes the Discrete Fourier transform of data sets
% using the FFT algorithm. The power spectrum density (PSD) is ABS(FFT)^2.
% The FFT is applied along the first dimension.
%
% FFT(A, 'IFFT') computes the inverse FFT transform (equiv... |
github | McStasMcXtrace/iFit-master | setor.m | .m | iFit-master/Objects/@iData/setor.m | 4,048 | utf_8 | 97ca65b5c6bf7d6823d8abec4834c951 | function Res = setor(A,varargin)
% SETOR Concatenate (merge) structures fields.
% Res=SETOR(A,B) Recursively merges fields/properties and subfields of
% structures A and B to result structure Res. Object base properties are not
% affected.
%
% Res=SETOR(A,B,'or') The result has fields/properties which are eithe... |
github | McStasMcXtrace/iFit-master | runtest.m | .m | iFit-master/Objects/@iData/runtest.m | 10,712 | utf_8 | e8684a1558899b5b0644293d02c3d16b | function r = runtests(s, m, option)
% RUNTESTS run a set of tests on object methods
% RUNTESTS(s) checks all object methods.
% A test can be written as:
% An 'Example:' line for which following expressions is executed.
% The test can span on more lines with the '...' continuation symbol.
% A script ... |
github | McStasMcXtrace/iFit-master | pca.m | .m | iFit-master/Objects/@iData/pca.m | 9,890 | utf_8 | 318ec2cdee6c1f5a990dec1811e4529b | function b = pca(a, varargin)
% PCA Principal component analysis.
% B = PCA(A,K) computes the principal component analysis of an object in a k-D
% space representation. This corresponds to a classification of the objects
% rows, searching for similarities/correlations. The resulting principal
% component coef... |
github | McStasMcXtrace/iFit-master | label.m | .m | iFit-master/Objects/@iData/label.m | 4,106 | utf_8 | 2b13867eed14cac62d08cbd1430fb9b8 | function labl = label(this, varargin)
% LABEL Label for a given alias/axis.
% L = LABEL(s, rank) Get axis label. Rank 0 is for the Signal,
% rank values 1:ndims(s) indicate an axis.
%
% LABEL(s, rank, 'text') Set axis label. Rank 0 is for the Signal,
% rank values 1:ndims(s) indicate an axis.
%
% L = LABEL(s,... |
github | McStasMcXtrace/iFit-master | imroi.m | .m | iFit-master/Objects/@iData/imroi.m | 18,189 | utf_8 | 970da1abb063c8e81582f4c16aedcceb | function [b, mask, f] = imroi(a, options)
% IMROI Region of interest on a data set.
% B = IMROI(A) select interactively regions-of-interest (ROI) over an existing
% data set, which defines areas where data points are selected. The selected
% data set is returned, with NaN's elsewhere.
%
% mouse left-click/SPA... |
github | McStasMcXtrace/iFit-master | commandhistory.m | .m | iFit-master/Objects/@iData/commandhistory.m | 3,501 | utf_8 | 48c8d67b940bbc32338b4100c097292e | function [s,fig] = commandhistory(a, fig, varargin)
% COMMANDHISTORY Show the command history of object.
% COMMANDHISTORY(S) opens a dialogue showing all commands used so far
% to procuce the current object. The dialogue allows to export the
% commands as a script.
%
% C = COMMANDHISTORY(S) returns the current ... |
github | McStasMcXtrace/iFit-master | kmeans.m | .m | iFit-master/Objects/@iData/kmeans.m | 10,593 | utf_8 | 46887c8649fe2334af007a66d3f61ba5 | function [s,c] = kmeans(a, k, method)
% KMEANS k-means clustering.
% B = KMEANS(X,K) partitions the Signal in the object X into K clusters.
% The resulting object Signal contains numbers from 1 to 'K' which are indices
% of classes/partitions/groups/clusters. When no cluster can be found, the
% result is empty... |
github | McStasMcXtrace/iFit-master | wavelet.m | .m | iFit-master/Objects/@iData/private/wavelet.m | 6,953 | utf_8 | d438a54f0dd4bd29e0bcdd23034f9f34 | %WAVELET 1D Wavelet transform with optional singificance testing
%
% [WAVE,PERIOD,SCALE,COI] = wavelet(Y,DT,PAD,DJ,S0,J1,MOTHER,PARAM)
%
% Computes the wavelet transform of the vector Y (length N),
% with sampling rate DT.
%
% By default, the Morlet wavelet (k0=6) is used.
% The wavelet basis is norm... |
github | McStasMcXtrace/iFit-master | private_saveas_analyze.m | .m | iFit-master/Objects/@iData/private/private_saveas_analyze.m | 12,065 | utf_8 | 6fa151a00ffc066cf54f7d93de379cd1 | function filename=private_saveas_analyze(a, filename)
% Private function to write Analyze volumes (img+hdr)
%
% Routines adapted from WriteAnalyzeHdr and WriteAnalyzeImg by
% Claus Svarer <csvarer@nru.dk>.
%
if ndims(a) ~= 3 & ndims(a) ~= 4
filename=[];
warning([ mfilename ': Can only export 3D and 4D objects to A... |
github | McStasMcXtrace/iFit-master | private_handle2iData.m | .m | iFit-master/Objects/@iData/private/private_handle2iData.m | 3,564 | utf_8 | 223d32cb1858addaf97436deec8556df | % private_handle2iData: converts a numeric into an iData
function out=private_handle2iData(in)
try
t = get(in,'DisplayName');
if isempty(t), t=get(get(in,'Parent'),'DisplayName'); end
catch
t=[]; end
if isempty(t), t=get(in,'Tag'); end
if isempty(t),
t=num2str(double(in));
end
if strcmp... |
github | McStasMcXtrace/iFit-master | struct2xml.m | .m | iFit-master/Objects/@iData/private/struct2xml.m | 10,625 | utf_8 | e962b362ca26f9fd24a9127f63eaddaf | function varargout = struct2xml( s, varargin )
%Convert a MATLAB structure into a xml file
% [ ] = struct2xml( s, file )
% xml = struct2xml( s )
%
% A structure containing:
% s.XMLname.Attributes.attrib1 = "Some value";
% s.XMLname.Element.Text = "Some text";
% s.XMLname.DifferentElement{1}.Attributes.attrib2 ... |
github | McStasMcXtrace/iFit-master | mesh2kml.m | .m | iFit-master/Objects/@iData/private/mesh2kml.m | 24,225 | utf_8 | 1f43f7fbe61cb181388dd9f0bec9efe4 | function M = mesh2kml(varargin)
%Export textured geometry (surface or patch) to GoogleEarth as a KML and a
%Collada DAE files
% mesh2kml(...) -surface or patch inputs, see bellow
% mesh2kml(...out) -one common output filename or paths to {dae img kml}
% mesh2kml(...out,prp) -Collada & GoogleEarth property ... |
github | McStasMcXtrace/iFit-master | constructNPYheader.m | .m | iFit-master/Objects/@iData/private/constructNPYheader.m | 2,844 | utf_8 | dc8486379b4b067036d2e8906ca6723b |
function header = constructNPYheader(dataType, shape, varargin)
if ~isempty(varargin)
fortranOrder = varargin{1}; % must be true/false
littleEndian = varargin{2}; % must be true/false
else
fortranOrder = true;
littleEndian = true;
end
dtypesMatlab = {'uint8','uint16','uint32','uint64','int8','int16'... |
github | McStasMcXtrace/iFit-master | smoothn.m | .m | iFit-master/Objects/@iData/private/smoothn.m | 18,022 | utf_8 | 2d6d9246bf6ef7b98dcb3218a897a536 | function [z,s,exitflag,Wtot] = smoothn(varargin)
%SMOOTHN Robust spline smoothing for 1-D to N-D data.
% SMOOTHN provides a fast, automatized and robust discretized smoothing
% spline for data of any dimension.
%
% Z = SMOOTHN(Y) automatically smoothes the uniformly-sampled array Y. Y
% can be any N-D n... |
github | McStasMcXtrace/iFit-master | mat2json.m | .m | iFit-master/Objects/@iData/private/mat2json.m | 4,848 | utf_8 | d42722d776325d9385d1a0db90f08de7 | function J=mat2json(M,F)
%JSON2MAT converts a Matlab structure into a javascript data object (JSON).
% M can also be a file name. In the spirit of fast prototyping
% this function takes a very loose approach to data types and
% dimensionality - neither is explicitly retained.
%
% ... |
github | McStasMcXtrace/iFit-master | private_resize.m | .m | iFit-master/Objects/@iData/private/private_resize.m | 6,809 | utf_8 | c8e88933e0a2d00e33f6cd5dc6745620 | function x = iprivate_resize(x,newsiz)
%RESIZE Resize any arrays and images.
% Y = RESIZE(X,NEWSIZE) resizes input array X using a DCT (discrete
% cosine transform) method. X can be any array of any size. Output Y is
% of size NEWSIZE.
%
% Input and output formats: Y has the same class as X.
%
% ... |
github | McStasMcXtrace/iFit-master | x3mesh.m | .m | iFit-master/Objects/@iData/private/x3mesh.m | 11,696 | utf_8 | be4deb38193bbb91cf341d1194ba74ae | % Copyright (c) 2013, Benjamin Irving
% All rights reserved.
%
% Redistribution and use in source and binary forms, with or without
% modification, are permitted provided that the following conditions are
% met:
%
% * Redistributions of source code must retain the above copyright
% notice, this list of... |
github | McStasMcXtrace/iFit-master | findpeaks_octave.m | .m | iFit-master/Objects/@iData/private/findpeaks_octave.m | 11,991 | utf_8 | 2745a20183758db30e6b64882a822c4a | % Copyright (c) 2012 Juan Pablo Carbajal <carbajal@ifi.uzh.ch>
%
% This program is free software; you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation; either version 3 of the License, or
% (at your option) any later version.
%
% Thi... |
github | McStasMcXtrace/iFit-master | stlwrite.m | .m | iFit-master/Objects/@iData/private/stlwrite.m | 12,929 | utf_8 | f2046e914e8af877946b426a0c4eab03 | function stlwrite(filename, varargin)
%STLWRITE Write STL file from patch or surface data.
%
% STLWRITE(FILE,fv) writes a stereolithography (STL) file to FILE for a triangulated
% patch defined by FV (a structure with fields 'vertices' and 'faces').
%
% STLWRITE(FILE,FACES,VERTICES) takes faces and vertic... |
github | McStasMcXtrace/iFit-master | vol3d.m | .m | iFit-master/Objects/@iData/private/vol3d.m | 8,262 | utf_8 | ac88d8d19c5da33edd45e61de170a574 | function [model] = vol3d(varargin)
%H = VOL3D Volume render 3-D data.
% VOL3D uses the orthogonal plane 2-D texture mapping technique for
% volume rending 3-D data in OpenGL. Use the 'texture' option to fine
% tune the texture mapping technique. This function is best used with
% fast OpenGL hardware.
%
% H = ... |
github | McStasMcXtrace/iFit-master | struct2iData.m | .m | iFit-master/Objects/@iData/private/struct2iData.m | 3,477 | utf_8 | c25de61928d230298cea1a0355e943df | function b=struct2iData(a, varargin)
% struct2iData converts a structure into an iData
% STRUCT2IDATA(struct) a new iData object is created, which contains
% the initial struct
%
% STRUCT2IDATA(struct, org) when a 2nd argument is given as an iData, it
% is used as original object, and updated with the structur... |
github | McStasMcXtrace/iFit-master | FastCMeans.m | .m | iFit-master/Objects/@iData/private/FastCMeans.m | 5,117 | utf_8 | cb50997e21a5961dcc73947f6c65315a | function [L,C,LUT]=FastCMeans(im,c)
% Segment N-dimensional grayscale image into c classes using a memory
% efficient implementation of the c-means (aka k-means) clustering
% algorithm. The computational efficiency is achieved by using the
% histogram of the image intensities during the clustering process instea... |
github | McStasMcXtrace/iFit-master | subsref_single.m | .m | iFit-master/Objects/@iData/private/subsref_single.m | 6,279 | utf_8 | 19b53aaf413a99b82e6728172a47f273 | function v = subsref_single(v, S, a)
% subsref_single single level subsref
% SUBSREF_SINGLE(v, S, a) gets v.(S) from root object a. Default with v=a.
if nargin<3, a=v; end
if ischar(S), S=struct('type','.','subs', S); end
if ~isstruct(S), error([ mfilename ': invalid reference (2nd arg) expect struct, is ' cla... |
github | McStasMcXtrace/iFit-master | wave_bases.m | .m | iFit-master/Objects/@iData/private/wave_bases.m | 4,010 | utf_8 | 86fed8f56771c0ea1f2d36d776b6fdcd | %WAVE_BASES 1D Wavelet functions Morlet, Paul, or DOG
%
% [DAUGHTER,FOURIER_FACTOR,COI,DOFMIN] = ...
% wave_bases(MOTHER,K,SCALE,PARAM);
%
% Computes the wavelet function as a function of Fourier frequency,
% used for the wavelet transform in Fourier space.
% (This program is called automatically by... |
github | McStasMcXtrace/iFit-master | genop.m | .m | iFit-master/Objects/@iData/private/genop.m | 5,626 | utf_8 | 74dac8964e3b7b19760a50975dc3aec8 | function z = genop(op,x,y)
%GENOP Generalized array operations.
% GENOP(OP, X, Y) applies the function OP to the arguments X and Y where
% singleton dimensions of X and Y have been expanded so that X and Y are
% the same size, but this is done without actually copying any data.
%
% OP must be a function h... |
github | McStasMcXtrace/iFit-master | writeNPY.m | .m | iFit-master/Objects/@iData/private/writeNPY.m | 470 | utf_8 | 561adf7ce2f8b0bdf0e611a5b1aeabe1 |
function writeNPY(var, filename)
% function writeNPY(var, filename)
%
% Only writes little endian, fortran (column-major) ordering; only writes
% with NPY version number 1.0.
%
% Always outputs a shape according to matlab's convention, e.g. (10, 1)
% rather than (10,).
shape = size(var);
dataType = class(var);
hea... |
github | McStasMcXtrace/iFit-master | private_interp.m | .m | iFit-master/Objects/@iData/private/private_interp.m | 10,699 | utf_8 | 6633d10cdd914e231b1a8084cad2cf37 | function [f_signal, method] = private_interp(i_axes, i_signal, f_axes, method)
% PRIVATE_INTERP private function for interpolation
% interpolates i_signal(i_axes{}) onto f_axes{} and returns the f_signal
%
% arguments:
% i_axes: cell array of initial axes
% i_signal: initial signal (double array or vector)
% f_a... |
github | McStasMcXtrace/iFit-master | private_saveas_nii.m | .m | iFit-master/Objects/@iData/private/private_saveas_nii.m | 27,436 | utf_8 | f697fe756492eda75b06f81a565de996 | function filename=private_saveas_nii(a, filename)
% private function to write NifTi files
%
% http://www.mathworks.com/matlabcentral/fileexchange/8797-tools-for-nifti-and-analyze-image
% Jimmy Shen 23 Oct 2005 (Updated 22 Jan 2014)
% make_nii, save_nii
a = private_cleannaninf(a);
nii = make_nii(getaxis(a, 0),[], [... |
github | McStasMcXtrace/iFit-master | medfwrite.m | .m | iFit-master/Objects/@iData/private/medfwrite.m | 13,235 | utf_8 | 3814b211eccfbd11bb22a081ba562fdf | function filename=medfwrite(a, filename)
% private function to write EDF files
% tests on dimensionality
if ndims(a) > 2,
warning([ mfilename ': Can only export 2D objects to EDF format. Object ' a.Tag ' has ndims=' num2str(ndims(a)) ]);
filename=[];
return;
end
s = getaxis(a,0);
if ~numel(s), filename=[]; r... |
github | McStasMcXtrace/iFit-master | subsasgn_single.m | .m | iFit-master/Objects/@iData/private/subsasgn_single.m | 3,484 | utf_8 | 11956af238faa441141a0f9f217aecac | function a = subsasgn_single(a, S, val, a0)
% subsasgn_single single level assignment
% SUBSASGN_SINGLE(a,S,val,a0) assigns a.(S) = val in root object a0
if nargin<4, a0=a; end
if ischar(S), S=struct('type','.','subs', S); end
if ~isstruct(S), error([ mfilename ': invalid reference (2nd arg) expect struct, is ... |
github | McStasMcXtrace/iFit-master | vrml.m | .m | iFit-master/Objects/@iData/private/vrml.m | 21,427 | utf_8 | 9782666ef18ac6c12266e2fa48b97567 | function vrml(h, filename, opts)
% VRML Save graphics to VRML 97 file.
%
% VRML(H, FILENAME) saves a VRML 97 file containing the object
% with handle H and its descendants.
% If the FILENAME does not include an extension, ".wrl" is
% appended. If a file with the name FILENAME exists, it is
% overwritt... |
github | McStasMcXtrace/iFit-master | listdlg.m | .m | iFit-master/Objects/@iData/private/listdlg.m | 11,501 | utf_8 | 781b08e3c5122ce1b82ac2394a001943 | function [selection,value] = listdlg(varargin)
%LISTDLG List selection dialog box (with non-modal support).
% [SELECTION,OK] = LISTDLG('ListString',S) creates a modal dialog box
% which allows you to select a string or multiple strings from a list.
% SELECTION is a vector of indices of the selected strings (leng... |
github | McStasMcXtrace/iFit-master | fitswrite.m | .m | iFit-master/Objects/@iData/private/fitswrite.m | 3,500 | utf_8 | fe32efa2e31ca3eed7cd9ac5a458a887 | function fitswrite(data,filename)
%FITSWRITE saves a Matlab matrix as a FITS image
%
%Usage: fitswrite(data, filename)
%
%Known deficiencies
%
%1. Doesn't support arrays of imaginary numbers.
%2. Only handles simple 2 dimensional arrays of data.
%
%Author: R. G. Abraham, Institute of Astronomy, Cambridge Univ... |
github | McStasMcXtrace/iFit-master | inpaintn.m | .m | iFit-master/Objects/@iData/private/inpaintn.m | 7,355 | utf_8 | d4adb634105d0d8ff089d2568eacba46 | function y = inpaintn(x,n,y0,m)
% INPAINTN Inpaint over missing data in N-D array
% Y = INPAINTN(X) replaces the missing data in X by extra/interpolating
% the non-missing elements. The non finite values (NaN or Inf) in X are
% considered as missing data. X can be any N-D array.
%
% INPAINTN (no input/output a... |
github | McStasMcXtrace/iFit-master | private_saveas_hdfnc.m | .m | iFit-master/Objects/@iData/private/private_saveas_hdfnc.m | 9,438 | utf_8 | 8ab3dbc104352d0ad4fba5cc81b5b6b9 | function filename = private_saveas_hdfnc(a, filename, format, root)
% private function to write HDF, CDF and NetCDF files
% format='HDF','CDF','NC' (netCDF)
% root ='path where to start to save hierarchy' e.g. 'Data' or '' for all
if nargin < 3, format='hdf5'; end
if nargin < 4, root =''; end
% export all... |
github | McStasMcXtrace/iFit-master | private_saveas_vtk.m | .m | iFit-master/Objects/@iData/private/private_saveas_vtk.m | 20,761 | utf_8 | fd25ec61131418f52dd32cb47adadea9 | function filename=private_saveas_vtk(a, filename)
% private function to write VTK files
% inline: WriteToVTK (3D matrix, no axes, not used but keep it here),
% export3Dline2VTK (xyz line), writeVTK (3D object, binary), exportTriangulation2VTK (2D surface), WriteToVTK(3D with axes, ascii)
if ndims(a) ~= 2 & ndims(a) ... |
github | McStasMcXtrace/iFit-master | write_endf.m | .m | iFit-master/Objects/@iData/private/write_endf.m | 7,969 | utf_8 | 400956a94c76c11d2a3ace6b320af187 | function filename = write_endf(Sab, filename)
% filename = write_endf(Sab, filename)
%
% exports thermal scattering law sections (MF7/MT2 and 4) ENDF files.
% When succesful, the filename is returned, else returns empty ''.
%
% Currently properly exports:
% == === ===============================================... |
github | McStasMcXtrace/iFit-master | findfield.m | .m | iFit-master/Objects/@iFunc/findfield.m | 8,412 | utf_8 | 4b39fc08bcb2c3db660fe8027ed25886 | function [match, types, dims] = findfield(s, field, option)
% [match, types, nelements]=findfield(iFunc, field, option) : look for iFunc fields
%
% @iFunc/findfield function to look for iFunc fields, type and number of elements
%
% [match,type,n] = findfield(iFunc) returns the names of all iFunc fields
% [match,t... |
github | McStasMcXtrace/iFit-master | fits.m | .m | iFit-master/Objects/@iFunc/fits.m | 32,809 | utf_8 | 4d88982f5a11f9959f60d17c00fc5020 | function [pars_out,criteria,message,output] = fits(model, a, pars, options, constraints, varargin)
% [pars,criteria,message,output] = fits(model, data, pars, options, constraints, ...) : fit a model on a data set
%
% @iFunc/fits find best parameter estimates in order to minimize the
% fitting criteria using mode... |
github | McStasMcXtrace/iFit-master | plot.m | .m | iFit-master/Objects/@iFunc/plot.m | 10,479 | utf_8 | 744fa3f11a476bfec2195feb05638fa0 | function h = plot(a, p, varargin)
% h = plot(model, parameters, axes, ...) plot a model
%
% @iFunc/plot applies the function 'model' using the specified parameters and axes
% and function parameters 'pars' with optional additional parameters. A plot of
% the model is then produced.
% The axis rank '1' cor... |
github | McStasMcXtrace/iFit-master | findstr.m | .m | iFit-master/Objects/@iFunc/findstr.m | 2,908 | utf_8 | 8983452df72d98d321af5c7bbdf3d7b2 | function [match, field] = findstr(s, str, option)
% [match, field]=findstr(s, str, option) : look for strings stored in iFunc
%
% @iFunc/findstr function to look for strings stored in iFunc
%
% [match,field] = findstr(iFunc, str) returns the string containg 'str'
% and the field name it appears in. If 'str' is... |
github | McStasMcXtrace/iFit-master | publish.m | .m | iFit-master/Objects/@iFunc/publish.m | 17,481 | utf_8 | b15b53a9bfee457a91081002ac5e3fe0 | function filename = publish(a, filename, section, message)
% b = publish(s) : export the Model object as an HTML document.
%
% @iFunc/publish function to export an object into a readable document.
%
% publish(a) export to a temporary directory and open the web browser
% publish(a, file) export to given fi... |
github | McStasMcXtrace/iFit-master | feval.m | .m | iFit-master/Objects/@iFunc/feval.m | 17,930 | utf_8 | d72db9dd03df2a6461e9fac0d7b24b38 | function [signal, model, ax, name] = feval(model, p, varargin)
% [signal, model, axes, name] = feval(model, parameters, x,y, ...) evaluate a function
%
% @iFunc/feval applies the function 'model' using the specified parameters and axes
% and function parameters 'pars' with optional additional parameters.
% a ... |
github | McStasMcXtrace/iFit-master | iFunc_private_findpeaks.m | .m | iFit-master/Objects/@iFunc/private/iFunc_private_findpeaks.m | 3,648 | utf_8 | 1726987f2ba8aea0068515463b8caa35 | function [sigma, position, amplitude, baseline] = iFunc_private_findpeaks(signal, dim, m)
% [half_width, center, amplitude, baseline] = iFunc_private_findpeaks(s, dim, m) : find peak position and width of signal
%
% findpeaks private function to compute an estimate of peak position and width along
% dimension 'di... |
github | McStasMcXtrace/iFit-master | YAML.m | .m | iFit-master/Objects/yaml/YAML.m | 7,358 | utf_8 | 89ebb280af376caf1612bb794fbdc2e6 | classdef YAML
%YAML Serialize a matlab variable to yaml format
%
% [ X ] = YAML.load( S )
% [ S ] = YAML.dump( X )
%
% [ X ] = YAML.read( filepath )
% YAML.write( filepath, X )
%
% YAML.LOAD takes YAML string S and returns matlab variable X.
% YAML.DUMP takes matlab variable... |
github | McStasMcXtrace/iFit-master | scattering_cross_section.m | .m | iFit-master/Objects/iData_subclasses/@iData_Sqw2D/scattering_cross_section.m | 7,607 | utf_8 | c425d2bcc5975914212f4ea773a34482 | function sigma = scattering_cross_section(s, varargin)
% iData_Sqw2D: scattering_cross_section: compute the total neutron scattering cross section for
% incoming neutron energy. The S(|q|,w) should be the non-classical
% dynamic structure factor.
%
% sigma = scattering_cross_section(s, Ei, M)
%
% Such data set... |
github | McStasMcXtrace/iFit-master | muphocor.m | .m | iFit-master/Objects/iData_subclasses/@iData_Sqw2D/muphocor.m | 13,391 | utf_8 | e87dcd8d5dc3b3022d9f8ac83be1381a | function g = muphocor(s, varargin)
% run MUPHOCOR on the given S(q,w) data set, incident wavelength and Temperature
%
% g = muphocor(s, lambda, T, amasi, sigi, conci)
%
% When not given, the physical parameters are searched in the object.
% The material physical properties include the masses, the incohere... |
github | McStasMcXtrace/iFit-master | dos.m | .m | iFit-master/Objects/iData_subclasses/@iData_Sqw2D/dos.m | 12,750 | utf_8 | 49b240823ebb8a9b26c99488075237d0 | function [g, fig] = dos(s, method, varargin)
% iData_Sqw2D: dos: compute the generalised density of states (gDOS) from a S(q,w)
%
% g = dos(s, method, n, T, DW)
%
% compute: iData_Sqw2D -> generalised Density of States gDOS [p=1]
%
% The returned generalised density of states corresponds with the 1-phonon term in th... |
github | McStasMcXtrace/iFit-master | Sqw_check.m | .m | iFit-master/Objects/iData_subclasses/@iData_Sqw2D/private/Sqw_check.m | 8,443 | utf_8 | 489e93fcf238ae17b4ee2f1500e56382 | function s = Sqw_check(s, mode)
% Sqw_check: check if a 2D iData is a S(q,w).
%
% This routine can also convert automatically an input
% S(phi,t) into S(phi,w)
% and S(phi,w) into S(q, w).
%
% conventions:
% omega = Ei-Ef = energy lost by the neutron
% omega > 0, neutron looses energy, can not be hig... |
github | McStasMcXtrace/iFit-master | parse_formula.m | .m | iFit-master/Objects/iData_subclasses/@iData_Sqw2D/private/parse_formula.m | 8,421 | utf_8 | b3324511666eed68d7f1d2cefcaa75dc | function r = parse_formula(varargin)
% PARSE_FORMULA Parses a chemical formula to form an atomic representation.
%
% SYNTAX
%
% r = parse_formula(str)
% r = parse_formula({str1,str2,str3, ...})
%
% Parses chemical formulas and returns a structure array holding the an
% atomic representation of the chemical forulas... |
github | McStasMcXtrace/iFit-master | hillformula.m | .m | iFit-master/Objects/iData_subclasses/@iData_Sqw2D/private/hillformula.m | 3,620 | utf_8 | 64d6b09d559e44e93dc724267914b346 | function species = hillformula(varargin)
%
% HILLFORMULA Produce a cell array of chemical formulas in Hill Notation.
%
% species = hillformula(r)
% species = hillformula(species)
%
% Construct a cell array of chemical formula strings in Hill notation.
% The input is either a cell array of chemical formulas or ... |
github | McStasMcXtrace/iFit-master | Sqw_parameters.m | .m | iFit-master/Objects/iData_subclasses/@iData_Sqw2D/private/Sqw_parameters.m | 14,277 | utf_8 | dfc06c4012830660a113972974a32071 | function [s,parameters,fields] = Sqw_parameters(s, fields)
% [s,p,fields] = Sqw_parameters(s,type): search for parameter values in a S(q,w) data set
%
% iData_Sqw2D: Sqw_parameters: search for physical quantities in object.
% This search is also done when creating iData_Sqw2D objects.
%
% input:
% s: any iData obj... |
github | McStasMcXtrace/iFit-master | Sqw_getT.m | .m | iFit-master/Objects/iData_subclasses/@iData_Sqw2D/private/Sqw_getT.m | 3,426 | utf_8 | 299db9cb2a5eba22b08bf23e5e4ae02f | function T = Sqw_getT(s, prop, raw)
% Sqw_getT: search for a property value in a data set
%
% T = Sqw_getT(s, prop, raw)
%
% T = Sqw_getT(s, prop, 'Bose')
% compute the temperature from the Bose factor (detailed balance).
%
% input:
% s: any iData object, including S(q,w) and DOS ones.
% prop: a list of eq... |
github | McStasMcXtrace/iFit-master | Sqw_parameters.m | .m | iFit-master/Objects/iData_subclasses/@iData_Sqw4D/private/Sqw_parameters.m | 14,657 | utf_8 | dff9b40acf2f9e090e5ead2867f1a52c | function [s,parameters,fields] = Sqw_parameters(s, fields)
% [s,p,fields] = Sqw_parameters(s,type): search for parameter values in a S(q,w) data set
%
% iData_Sqw2D: Sqw_parameters: search for physical quantities in object.
% This search is also done when creating iData_Sqw2D objects.
%
% input:
% s: any iData obj... |
github | McStasMcXtrace/iFit-master | thermochemistry.m | .m | iFit-master/Objects/iData_subclasses/@iData_vDOS/thermochemistry.m | 6,114 | utf_8 | 9afcf549625f108c3c0df37e29c44859 | function [t, fig]=thermochemistry(s, T, options)
% iData_vDOS/thermochemistry: compute thermodynamic quantities for 1D vDOS data sets.
%
% compute thermodynamics quantities from the vibrational density of states.
% vDOS -> S, U, F, Cv
%
% The input 1D data set should be e.g. a vDOS, with axis energy in [meV].
%
% Th... |
github | McStasMcXtrace/iFit-master | multi_phonons.m | .m | iFit-master/Objects/iData_subclasses/@iData_vDOS/multi_phonons.m | 12,020 | utf_8 | fc62d9ce549a6a985432aaf1b3e3f111 | function [Gw, Tsym] = multi_phonons(gw, varargin)
% iData_vDOS: multi_phonons: compute the integrated multi-phonon generalised density of states (gDOS) from an initial vibrational density of states (vDOS)
%
% Gw = multi_phonons(gw, Ki, T, m, n)
%
% compute: Density of States -> multi-phonon gDOS terms
%
% The input a... |
github | McStasMcXtrace/iFit-master | findfield.m | .m | iFit-master/Objects/@struct/findfield.m | 6,846 | utf_8 | 86fb480a3296659e64906e5ce94063fa | function [match, types, dims] = findfield(s, field, option)
% [match, types, nelements]=findfield(struct, field, option) : look for structure fields
%
% @struct/findfield function to look for struct fields, type and number of elements
%
% [match,type,n] = findfield(struct) returns the names of all struct fields
% ... |
github | McStasMcXtrace/iFit-master | findstr.m | .m | iFit-master/Objects/@struct/findstr.m | 2,924 | utf_8 | fe9fac63861b3c5f8d1f410c2829571f | function [match, field] = findstr(s, str, option)
% [match, field]=findstr(s, str, option) : look for strings stored in struct
%
% @struct/findstr function to look for strings stored in struct
%
% [match,field] = findstr(struct, str) returns the string containg 'str'
% and the field name it appears in. If 'str... |
github | McStasMcXtrace/iFit-master | findjobj.m | .m | iFit-master/Objects/dndcontrol/findjobj.m | 171,210 | utf_8 | 11df695e0f94e3766f0ca3727da85d62 | function [handles,levels,parentIdx,listing] = findjobj(container,varargin) %#ok<*CTCH,*ASGLU,*MSNU,*NASGU>
%findjobj Find java objects contained within a specified java container or Matlab GUI handle
%
% Syntax:
% [handles, levels, parentIds, listing] = findjobj(container, 'PropName',PropValue(s), ...)
%
% Inp... |
github | McStasMcXtrace/iFit-master | plot.m | .m | iFit-master/Objects/iFunc_subclasses/@iFunc_McCode/plot.m | 21,232 | utf_8 | 1a7011334a74e935412b9408d9d9303d | function [comps, fig, model]=plot(model, p, options, match)
% iFunc_McCode/plot: runs the model in --trace mode and capture the output
% grab all MCDISPLAY lines, and render the TRACE information into a figure.
%
% plot(model)
% displays the given McCode model with its defaults/current parameters.
% plot(model, p... |
github | McStasMcXtrace/iFit-master | publish.m | .m | iFit-master/Objects/iFunc_subclasses/@iFunc_McCode/publish.m | 10,303 | utf_8 | ba07527b4c53c80e420d230224c9de29 | function filename = publish(self, filename)
% iFunc_McCode: publish: generate a readable HTML document and export results to
% many file formats
%
% publish(s)
% generates a readable report for a 4D S(q,w) object
% publish(s,'force')
% same as above, but make sure any existing report is overwritten
% publish(s... |
github | McStasMcXtrace/iFit-master | publish.m | .m | iFit-master/Objects/iFunc_subclasses/@iFunc_Sqw4D/publish.m | 22,092 | utf_8 | 90d78e7af1fc054f278e503fa32fe69d | function filename = publish(self, filename, section, message)
% iFunc_Sqw4D: publish: generate a readable HTML document and export results to
% many file formats
%
% publish(s)
% generates a readable report for a 4D S(q,w) object
% publish(s,'force')
% same as above, but make sure any existing report is overwri... |
github | McStasMcXtrace/iFit-master | dos.m | .m | iFit-master/Objects/iFunc_subclasses/@iFunc_Sqw4D/dos.m | 7,453 | utf_8 | 9265ae127116cfeba526c87e622275af | function [DOS, DOS_partials] = dos(s, n, nQ, method)
% iFunc_Sqw4D: dos: compute the density of states (vDOS)
%
% The routine can be used with 4D models to compute the vibrational density of
% states (vDOS), aka phonon spectrum.
%
% DOS = dos(s) returns the vibrational density of states (vDOS)
% the vDOS... |
github | McStasMcXtrace/iFit-master | band_structure.m | .m | iFit-master/Objects/iFunc_subclasses/@iFunc_Sqw4D/band_structure.m | 16,359 | utf_8 | 5d42d5d6df5855ef165b482e9206cbcc | function [S, qLim, fig] = band_structure(f, qLim, E, options)
% band_structure: evaluates a 4D S(q,w) model along specified k-path / bands
%
% band_structure(f, kpath, w, options)
% The k-path can be given as a cell containing 3-values (HKL) vectors, or
% a n x 3 matrix, each row being a HKL location.
% ... |
github | McStasMcXtrace/iFit-master | linecut.m | .m | iFit-master/Applications/linecut.m | 8,099 | utf_8 | 5309d5cbc1582d6d440faecf99b76563 | function [cuthandles] = linecut(plothandle)
%LINECUT View linecuts along the X and Y dimension of a 3D plot
% LINECUT(H) places a crosshair on the 3D plot with handle H. H can be a
% handle to a pcolor, surf, etc. plot or a non-RGB image. The crosshair
% can be moved with either the mouse or the arrow keys. Press... |
github | McStasMcXtrace/iFit-master | plot2svg.m | .m | iFit-master/Applications/plot2svg.m | 160,713 | utf_8 | c566184da60b58bdc6bd701d3ee7bc6b | function varargout = plot2svg(param1,id,pixelfiletype)
% Matlab to SVG converter
% Prelinary version supporting 3D plots as well
%
% Usage: plot2svg(filename,graphic handle,pixelfiletype)
% optional optional optional
% or
%
% plot2svg(figuresize,graphic handle,pixelfi... |
github | McStasMcXtrace/iFit-master | ResLibCal.m | .m | iFit-master/Applications/ResLibCal/ResLibCal.m | 29,490 | utf_8 | ae2f31b17556eddb960a9bcb814abf89 | function out = ResLibCal(varargin)
% ResLibCal: compute and display the neutron TAS resolution function
%
% To start the application and open the main GUI window, use
% ResLibCal
% To compute directly the resolution function, sending an EXP ResLib-like
% configuration structure, use:
% out = ResLibCal(EXP);
% To ... |
github | McStasMcXtrace/iFit-master | ResLibCal_tas_conv4d.m | .m | iFit-master/Applications/ResLibCal/private/ResLibCal_tas_conv4d.m | 14,650 | utf_8 | 2df5472243a062d72c483a26d61c7fbe | function signal = ResLibCal_tas_conv4d(data, config, frame)
% model=ResLibCal_tas_conv4d(data or model, tas_config, frame) 4D convolution
% function for neutron Triple-Axis Spectrometers.
%
% This function builds a fit model from:
% * a dispersion model (iFunc)
% the dispersion should follow the syntax: dispe... |
github | McStasMcXtrace/iFit-master | ResLibCal_EXP2fig.m | .m | iFit-master/Applications/ResLibCal/private/ResLibCal_EXP2fig.m | 7,948 | utf_8 | 2250ae14032153c2d03a50fdddcc3807 | function [fig, out] = ResLibCal_EXP2fig(EXP, fig)
% fig=ResLibCal_EXP2fig(EXP): send EXP to main ResLibCal window
%
% sends the content of a ResLib EXP structure into the ResLibCal figure.
% when the figure does not exist, it is opened.
% Also makes a check of some EXP values.
%
% Return:
% fig: handle of the ResLibC... |
github | McStasMcXtrace/iFit-master | ResLibCal_Plot2D.m | .m | iFit-master/Applications/ResLibCal/private/ResLibCal_Plot2D.m | 8,247 | utf_8 | 8b7f44b14a3ac85ca92dbd1abfa7ddfa | function out=ResLibCal_Plot2D(out, modev)
%
% MATLAB function to plot the projections of the resolution ellipse
% of a triple axis
%
% Input:
% out: EXP ResLib structure
% modev: can be set to 'rlu' so that the plot is in lattice RLU frame [abc] instead of [xyz]
% can also specify 'qz' to indicate x,y,z in p... |
github | McStasMcXtrace/iFit-master | ResLibCal_ComputeResMat.m | .m | iFit-master/Applications/ResLibCal/private/ResLibCal_ComputeResMat.m | 10,633 | utf_8 | c5b63f49a67dab13bdb04991b4ab310b | function resolution = ResLibCal_ComputeResMat(EXP)
% resolution = ResLibCal_ComputeResMat(EXP): compute the resolution function
%
% Compute the resolution matrices by calling the EXP.method
%
% Return:
% resolution.R0: Resolution prefactor
% resolution.RM: Resolution matrix with x-axis along Q
% resolution.RMS: Re... |
github | McStasMcXtrace/iFit-master | ResLibCal_RM2clouds_mcstas.m | .m | iFit-master/Applications/ResLibCal/private/ResLibCal_RM2clouds_mcstas.m | 8,702 | utf_8 | 80870dfe8e2b3b108c0926c6bcf76020 | function [resolution,R0,RM] = ResLibCal_RM2clouds_mcstas(EXP, resolution, angles)
% ResLibCal_RM2clouds_mcstas: creates an axis system of Monte-Carlo points
% which represent the resolution function in [abc] and [xyz] frames, using
% McStas templateTAS
%
% EXP: structure containing application configuration. Whe... |
github | McStasMcXtrace/iFit-master | ResLibCal_RM2RMS.m | .m | iFit-master/Applications/ResLibCal/private/ResLibCal_RM2RMS.m | 13,092 | utf_8 | f002e4f9a1037b5d7208f735fd3bb663 | function res = ResLibCal_RM2RMS(EXP, res)
% RMS=ResLibCal_RM2RMS(H,K,L,W,EXP,RM) rotate Resolution matrix in [Q1 Q2] frame
% [RMS,S]=ResLibCal_RM2RMS(H,K,L,W,EXP,RM)
%
% Compute for each coordinate frame:
% cart2frame: conversion matrix from cartesian lattice [Angs-1] to current frame in [uni...
% rlu2frame: ... |
github | McStasMcXtrace/iFit-master | ResLibCal_Plot3D.m | .m | iFit-master/Applications/ResLibCal/private/ResLibCal_Plot3D.m | 6,906 | utf_8 | 6f9d559fd24a534905e006ca774a938e | function out = ResLibCal_Plot3D(out, modev)
% adapted from ResLib
%===================================================================================
% function ResPlot3D(
% H,K,L,W,EXP,RANGE,EllipsoidStyle,XYStyle,XEStyle,YEStyle,SMA,SMAp,SXg,SYg)
% ResLib v.3.4
%======================================... |
github | McStasMcXtrace/iFit-master | GetLattice.m | .m | iFit-master/Applications/ResLibCal/private/GetLattice.m | 2,195 | utf_8 | 6962c3d203c0a73fa3ba442cfd51d470 | function [lattice,rlattice]=GetLattice(EXP)
%===================================================================================
% function [lattice,rlattice]=GetLattice(EXP)
% Extracts lattice parameters from EXP and returns the direct and reciprocal lattice
% parameters in the form used by scalar.m, star.m,etc... |
github | McStasMcXtrace/iFit-master | modvec.m | .m | iFit-master/Applications/ResLibCal/private/modvec.m | 1,384 | utf_8 | 4b57c4a450a9c8f22504dfe78160c50a | function m=modvec(x,y,z,lattice)
%===================================================================================
% function m=modvec(x,y,z,lattice)
% ResLib v.3.4
%===================================================================================
%
% Calculates the modulus of a vector, defined by its frac... |
github | McStasMcXtrace/iFit-master | ResLibCal_FormatString.m | .m | iFit-master/Applications/ResLibCal/private/ResLibCal_FormatString.m | 4,430 | utf_8 | 8ffba486146d8077c323b78401b2184e | function [res, inst] = ResLibCal_FormatString(out, modev)
% ResLibCal_FormatString: build a text with results
%
% Input:
% out: EXP ResLib structure
% modev: can be set to 'rlu','spec','ABC' so that the plot is in lattice RLU... frame
%
% Return:
% res: resolution text
% inst: instrument parameters
% Calls: non... |
github | McStasMcXtrace/iFit-master | ResLibCal_fig.m | .m | iFit-master/Applications/ResLibCal/private/ResLibCal_fig.m | 788 | utf_8 | d203abcf270beea6667222dcc6e09d55 | % ResLibCal_fig: finds current ResLibCal main GUI, as well as other
% controls.
% A cache is built when accessing the controls for the first time, and
% is re-used afterwards for faster access (e.g. Matlab >= R2014b)
%
% ResLibCal_fig: returns the main GUI handle
% ResLibCal_fig(tag): returns the 'Tag' s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.