Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
content badge
swh:1:cnt:a93bbd40f61802b72118142acf109e7f7df91793

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
(requires biblatex-software package)
Generating citation ...
function [phi]=CreateKMBasis(modes,ind,kappa,ipix,ic,dec,z)

if nargin<4, ipix=[];end
if nargin<5, ic=1;end
if nargin<6, dec=0;end
if nargin<7, z=[];end
load(fullfile('TMP','sample0_0'),'sizeim');
sizeim=prod(sizeim);
if ~isempty(z)
    dist=abs(z);
    angl=angle(z);
    clear z
    load(sprintf('TMP/%d_levelsets_cylco',ic),'theta');
    thetap=theta;
else
if dec==0
    load(fullfile('TMP',sprintf('%d_levelsets_cylco',ic)),'dist','angl','theta','thetap');
    if ~isempty(ipix)
        dist=dist(ipix);
        angl=angl(ipix);
            thetap=thetap(ipix);
    end
else
    load(fullfile('TMP',sprintf('%d_levelsets',ic)),'crack','front');
 load(fullfile('TMP',sprintf('%d_levelsets_cylco',ic)),'thetap');
    if ~isempty(ipix)
        front=front(ipix);
        crack=crack(ipix);
            thetap=thetap(ipix);
    end
    z=front-dec+i*crack;
    clear front crack
    dist=abs(z);
    angl=angle(z);
    clear z
    load(fullfile('TMP',sprintf('%d_levelsets_cylco',ic)),'theta');

end
end
% display('WARNING : normalized distance');
% dist=dist/max(dist(:));

if isempty(ipix)

    phi=zeros(length(dist(:)),length(modes)*length(ind));

else
    val=zeros(length(ipix)*length(modes)*length(ind),1);
    indp=zeros(length(ipix)*length(modes)*length(ind),1);
    indm=zeros(length(ipix)*length(modes)*length(ind),1);
end
inds=0;
icon=0;
for m=1:length(modes)
    for ii=1:length(ind)
        icon=icon+1;
        meq=modes(m);
        heq=ind(ii);
        [harm1,amp1]=KMPotFourrier(meq,heq,kappa);
        feq=0*dist(:);
        for kk=1:3
            feq=feq+amp1(kk)*exp(harm1(kk)*angl(:)*i/2);
        end
        feq=feq.*(dist(:).^(heq/2));
%        feq=feq*exp(i*theta);
        feq=feq.*exp(i*thetap(:));
        if isempty(ipix)
            phi(:,icon)=feq;
        else
            val(inds+(1:length(ipix)))=feq;
            indp(inds+(1:length(ipix)))=ipix(:);
            indm(inds+(1:length(ipix)))=icon;
            inds=inds+length(ipix);

        end

    end
end

if ~isempty(ipix)

    phi=sparse(indp,indm,val,sizeim,length(modes)*length(ind));

end


end

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API