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/nwbarendregt/AdaptNormThresh
19 January 2026, 07:08:41 UTC
  • Code
  • Branches (1)
  • Releases (0)
  • Visits
Revision 9124ee20fcbc67db053ebb59cdebae3aad266593 authored by nwbarendregt on 02 May 2022, 17:06:36 UTC, committed by GitHub on 02 May 2022, 17:06:36 UTC
Add files via upload
1 parent f843c31
  • Files
  • Changes
    • Branches
    • Releases
    • HEAD
    • refs/heads/main
    • 9124ee20fcbc67db053ebb59cdebae3aad266593
    No releases to show
  • ac994f9
  • /
  • Figure 3 -- Known Quality Thresholds
  • /
  • SC_Threshold_Schematic.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.

  • revision
  • directory
  • content
  • snapshot
origin badgerevision badge
swh:1:rev:9124ee20fcbc67db053ebb59cdebae3aad266593
origin badgedirectory badge
swh:1:dir:a7cd731792714ab6a6f3580e1de919149c703f89
origin badgecontent badge
swh:1:cnt:fca67e3fa88d2ca03c2c04163de51650be3a84af
origin badgesnapshot badge
swh:1:snp:a568cc5cff39965992895669038ed8c43a59eedd

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.

  • revision
  • directory
  • content
  • snapshot
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Tip revision: 9124ee20fcbc67db053ebb59cdebae3aad266593 authored by nwbarendregt on 02 May 2022, 17:06:36 UTC
Add files via upload
Tip revision: 9124ee2
SC_Threshold_Schematic.m
% SC_Threshold_Schematic.m
% Function used to simulate normative model for SNR change task from
% Barendregt et al., 2022.

function SC_Threshold_Schematic(T,dt,t_i,dg,m,c,R,N)

% Find normative thresholds using dynamic programming:
[theta,~] = SC_Bellmans(T,dt,t_i,dg,m,c,R); 
theta = theta(1:(T/5/dt+1)); % Truncate thresholds to avoid numerical artifacts.

% Pre-allocate ideal observer belief trajectories:
y = NaN(N,T/dt+1);
% Simulate ideal observer belief trajectories given by Eq. (8):
for i = 1:N
    y(i,1) = 0; k = 1;
    while abs(y(i,k)) < theta(k)
        k = k+1;
        y(i,k) = y(i,k-1)+m(k-1)*dt+sqrt(2*m(k-1)*dt)*randn;
    end
    % Terminate evidence accumulation when belief crosses threshold:
    y(i,k) = sign(y(i,k))*theta(k);
end

% Plot SNR time series:
figure
plot(0:dt:(T/5),m(1:201),'linewidth',15,'color','k')
% Plot belief trajectories and normative thresholds:
figure
plot(0:dt:(T/5),y(:,1:201),'linewidth',5)
hold on
plot(0:dt:(T/5),theta,'linewidth',15,'color','k')
plot(0:dt:(T/5),-theta,'linewidth',15,'color','k')
line([0 T/5],[0 0],'linestyle','--','color','k','linewidth',5)
xlim([0 T/5])
The diff you're trying to view is too large. Only the first 1000 changed files have been loaded.
Showing with 0 additions and 0 deletions (0 / 0 diffs computed)
swh spinner

Computing file changes ...

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