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

https://github.com/kraketm/ConstrainedDMD
06 August 2026, 14:24:23 UTC
  • Code
  • Branches (1)
  • Releases (0)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/main
    No releases to show
  • e660bed
  • /
  • toolbox
  • /
  • VIS_OverviewRepresentation.m
Raw File Download Save again
Take a new snapshot of a software origin

If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.

Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.
swh spinner

Processing "take a new snapshot" request ...

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
  • directory
  • revision
  • snapshot
origin badgecontent badge
swh:1:cnt:1f7ebac2608a24956c8d6a16fd100bf0cfeadc91
origin badgedirectory badge
swh:1:dir:79df38535a911a6272e6973c74eed986195b222f
origin badgerevision badge
swh:1:rev:543b1af120732aa94738315eb75b8a4394caa951
origin badgesnapshot badge
swh:1:snp:3a2a144e060e76b48791aeb591bfbb26116f6bdd

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
  • directory
  • revision
  • snapshot
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
Tip revision: 543b1af120732aa94738315eb75b8a4394caa951 authored by timkrake on 24 November 2022, 08:36:43 UTC
Update README
Tip revision: 543b1af
VIS_OverviewRepresentation.m
function [] = VIS_OverviewRepresentation(DATA, DMD, numberComps)
% This function VIS_OverviewRepresentation visualizes the filtered DMD 
% components in an overview representation. The number of shown DMD 
% components is given by the third input parameter 'numberComps'.
%
%
% [] = VIS_OverviewRepresentation(DATA, DMDOrig, numberComps)
%
% Input: A struct DATA, a struct DMD, and a parameter with the following
% properties
%   * DATA.type
%   * DATA.timeSeries
%   * DATA.m
%   * DATA.delayParameter
%   * DMD.lambdaSort
%   * DMD.ThetaScaledSort
%   * DMD.filtering
%   * numberComps
%
% Output: A visualization (figure with name 'Overview')


col = [228,026,028;055,126,184;077,175,074;152,078,163;255,127,000;255,255,051;166,086,040;251,180,174;179,205,227;204,235,197;222,203,228;254,217,166;255,255,204;229,216,189]./255;

I = DMD.filtering;

if DATA.type == "univariate"
    tmp = 0;
    tmp_sum = 0;
    tmp_subplot = 1;
    
    figure('Name','Overview')

    for l = 1:length(DMD.lambdaSort)
        k = I(l);
        
        if(imag(DMD.lambdaSort(k)) < 1e-9)
            tmp_plot = real(TOOL_DiagonalAveraging(DMD.ThetaScaledSort(:,k) * ...
                DMD.lambdaSort(k).^(0:DATA.m)));
        else
            tmp_plot = 2*real(TOOL_DiagonalAveraging(DMD.ThetaScaledSort(:,k) * ...
                DMD.lambdaSort(k).^(0:DATA.m)));
        end
            
        subplot(numberComps,3,tmp_subplot)
        tmp_subplot=tmp_subplot+1;
        p1=plot(1:length(tmp_plot),tmp_plot);
        set(p1(1),'LineWidth',1,'Color',col(2,:));      
        title( sprintf('EV: %.2f%+.2fi \n period: %.3f \n magnitude: %.3f',...
            real(DMD.lambdaSort(k)), imag(DMD.lambdaSort(k)) , ...
            2*pi*1j/log(DMD.lambdaSort(k)./abs(DMD.lambdaSort(k))) , abs(DMD.lambdaSort(k)) )  )
        box off

        subplot(numberComps,3,tmp_subplot)
        tmp_subplot=tmp_subplot+1;
        tmp_sum = tmp_sum + tmp_plot;
        p2=plot(1:length(DATA.timeSeries),DATA.timeSeries,1:length(tmp_sum),tmp_sum);
        set(p2(1),'LineStyle','-','LineWidth',1,'Color',col(9,:));
        set(p2(2),'LineWidth',1,'Color',col(2,:));
        title( sprintf('absolute error -- mean: %.2f%', string(norm(abs(DATA.timeSeries-tmp_sum),1)/length(DATA.timeSeries))  ) )
        box off

        subplot(numberComps,3,tmp_subplot)
        tmp_subplot=tmp_subplot+1;
        DataOrigSubsampled = interp1(1:length(DATA.timeSeries),DATA.timeSeries,1:0.1:length(DATA.timeSeries));
        tmp_sum_Subsampled = interp1(1:length(tmp_sum),tmp_sum,1:0.1:length(tmp_sum));
        p3=plot( 1:0.1:length(DATA.timeSeries),abs(DataOrigSubsampled-tmp_sum_Subsampled) ); %./abs(DataOrig) )
        set(p3(1),'LineWidth',1,'Color',col(2,:));
        title( sprintf('absolute error -- mean: %.2f%', string(norm(abs(DATA.timeSeries-tmp_sum),1)/length(DATA.timeSeries))  ) )
        axis([-inf inf -inf inf])
        
        tmp = tmp + 1;
        
        if(tmp == numberComps)
            break 
        end
            
    end
elseif DATA.type == "multivariate"
    tmp = 0;
    tmp_sum = 0;
    tmp_subplot = 1;
    
    figure('Name','Overview')

    for l = 1:length(DMD.lambdaSort)
        k = I(l);
        
        if(imag(DMD.lambdaSort(k)) < 1e-9)
            tmp_plot = real(TOOL_DiagonalAveragingMulti(DMD.ThetaScaledSort(:,k) * DMD.lambdaSort(k).^(0:DATA.m),DATA.delayParameter));
        else
            tmp_plot = 2*real(TOOL_DiagonalAveragingMulti(DMD.ThetaScaledSort(:,k) * DMD.lambdaSort(k).^(0:DATA.m),DATA.delayParameter));
        end
       
        subplot(numberComps,4,tmp_subplot)
        tmp_subplot=tmp_subplot+1;
        p1=plot(1:length(tmp_plot),tmp_plot(1,:));
        set(p1(1),'LineWidth',1,'Color',col(5,:)); 
        title( sprintf('EV: %f%+fi \t FREQ: %.3f \t ABS:%.4f' , real(DMD.lambdaSort(k)), imag(DMD.lambdaSort(k)) , 2*pi*1j/log(DMD.lambdaSort(k)./abs(DMD.lambdaSort(k))) , abs(DMD.lambdaSort(k)) )  )
        axis([-inf, inf, -inf inf])
        box off

        subplot(numberComps,4,tmp_subplot)
        tmp_subplot=tmp_subplot+1;
        p1=plot(1:length(tmp_plot),tmp_plot(2,:));
        set(p1(1),'LineWidth',1,'Color',col(4,:)); 
        title( sprintf('EV: %f%+fi \t FREQ: %.3f \t ABS:%.4f' , real(DMD.lambdaSort(k)), imag(DMD.lambdaSort(k)) , 2*pi*1j/log(DMD.lambdaSort(k)./abs(DMD.lambdaSort(k))) , abs(DMD.lambdaSort(k)) )  )
        axis([-inf, inf, -inf inf])
        box off

        subplot(numberComps,4,tmp_subplot)
        tmp_subplot=tmp_subplot+1;
        p1=plot(1:length(tmp_plot),tmp_plot(3,:));
        set(p1(1),'LineWidth',1,'Color',col(2,:)); 
        title( sprintf('EV: %f%+fi \t FREQ: %.3f \t ABS:%.4f' , real(DMD.lambdaSort(k)), imag(DMD.lambdaSort(k)) , 2*pi*1j/log(DMD.lambdaSort(k)./abs(DMD.lambdaSort(k))) , abs(DMD.lambdaSort(k)) )  )
        axis([-inf, inf, -inf inf])
        box off

        subplot(numberComps,4,tmp_subplot)
        tmp_subplot=tmp_subplot+1;
        tmp_sum = tmp_sum + tmp_plot;
        hold on
        p2=plot(1:length(DATA.timeSeries),DATA.timeSeries(2:3,:),1:length(tmp_sum),tmp_sum(2:3,:));
             
        set(p2(1),'LineWidth',1,'Color',col(11,:)); 
        set(p2(2),'LineWidth',1,'Color',col(9,:)); 
        set(p2(3),'LineWidth',1,'Color',col(4,:)); 
        set(p2(4),'LineWidth',1,'Color',col(2,:)); 

        yyaxis right
        p3=plot(1:length(DATA.timeSeries),DATA.timeSeries(1,:),1:length(tmp_sum),tmp_sum(1,:));
        set(p3(1),'LineWidth',1,'LineStyle', '-','Color',col(12,:)); 
        set(p3(2),'LineWidth',1, 'LineStyle', '-','Color',col(5,:));
        hold off
        axis([-inf, inf, -inf inf])

        title( strcat(num2str(norm(abs(DATA.timeSeries(1,:)-tmp_sum(1,:)),1)/length(DATA.timeSeries)), ",", ...
        num2str(norm(abs(DATA.timeSeries(2,:)-tmp_sum(2,:)),1)/length(DATA.timeSeries)), ",", ...
        num2str(norm(abs(DATA.timeSeries(3,:)-tmp_sum(3,:)),1)/length(DATA.timeSeries)) ))
        
        tmp = tmp + 1;
        
        if(tmp == numberComps)
            break
        end

    end
    

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