Skip to content
Snippets Groups Projects
Select Git revision
  • f29f45bceab323a7676807b41a3a28f2eed7c152
  • dev default
  • 61-feature-add-optional-backwards-mapping-for-consistency-with-older-version
  • 61-feature-add-optional-backwards-mapping-for-consistency-with-older-version-2
  • main protected
  • 11-test-fix-tests-to-handle-licensed-data-resources-from-trud-snd-omop
  • general
  • pypi
  • old-main
  • v0.0.3
10 results

pyproject.toml

Blame
  • calc_inner_IR.m 600 B
    % Copyright 2018 
    % Open University (Katrine Rogers - k.s.rogers@open.ac.uk)
    % University of Southampton (Edward Rogers - etr@orc.soton.ac.uk)
    
    % A function which calculates the IR inside the FoV
    
    function IR_in = calc_inner_IR(fn,ind_red)
    
    diff_fn = diff(fn);
    diff2pos_ind = find(diff_fn > 0,1,'first'); % position where function starts increasing
    if isempty(diff2pos_ind)    % i.e. function is decreasing evenrywhere
        IR_in = 0;
    elseif diff2pos_ind >= ind_red    % i.e. function is decreasing inside whole considered FoV
        IR_in = 0;
    else
        IR_in = max(fn(diff2pos_ind:ind_red))/fn(1);
    end