You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: DeDecompose.m
    path of file: ./repos/TIGRE/MATLAB/Utilities/DE
    
    the code of the file until where you have to start completion: function [material1_proj,material2_proj, angles_out] = DeDecompose(proj_l, angles_l , proj_h, angles_h, varargin)
%DEDECOMPSE Maps CBCT projections taken at two kVp settings to equivalent
%thicknesses of material1 and material2 using precalibrated transfer functions.
%   Coefficients C and D are the coefficients for the third-degree transfer
%   functions (may need to be modified for different systems)
%
%   Other basis materials and kV settings can be employed by adding
%   additional calibration data to "de_cal.mat"
%
%   Proj_l and angles_l are the projection and angle data for the low-kV
%   scan
%
%   Proj_h and angles_h are the projection and angle data for the high-kV
%   scan
%
%   Optional Arguments
%       scanner - default VarianTrueVeam
%
%       kVl, kVh - the kV settings for the low- and high-kV scans,
%       respectively.  defaults: 80, 140
%
%       interp_model - model for sinogram interpolation
%
%           'nearest' - nearest neighbor (default).
%

    
function [material1_proj,material2_proj, angles_out] = DeDecompose(proj_l, angles_l , proj_h, angles_h, varargin)
%DEDECOMPSE Maps CBCT projections taken at two kVp settings to equivalent
%thicknesses of material1 and material2 using precalibrated transfer functions.
%   Coefficients C and D are the coefficients for the third-degree transfer
%   functions (may need to be modified for different systems)
%
%   Other basis materials and kV settings can be employed by adding
%   additional calibration data to "de_cal.mat"
%
%   Proj_l and angles_l are the projection and angle data for the low-kV
%   scan
%
%   Proj_h and angles_h are the projection and angle data for the high-kV
%   scan
%
%   Optional Arguments
%       scanner - default VarianTrueVeam
%
%       kVl, kVh - the kV settings for the low- and high-kV scans,
%       respectively.  defaults: 80, 140
%
%       interp_model - model for sinogram interpolation
%
%           'nearest' - nearest neighbor (default).
%
%           'skip' - same as 'nearest, but skips projections without close
%           matches.  Requires setting 'tolerance' value.
%
%           'linear' - linear interpolation (unreliable for large
%           projection separations)
%
%   Coded by: Andrew Keeler
%   Contact: akeeler@luc.edu
%   Date: February 28, 2024

% Load calibrated coefficients for transfer functions


[scanner, calibration_pair, model, tolerance, material1, material2] = parse_inputs(varargin);

% read NIST database (values in TIGRE)
fid = fopen('./../../../Common/data/dual_energy_calibrations.json');
raw = fread(fid,inf);
str = char(raw');
fclose(fid);
calibration_data = jsondecode(str);

if ~isfield(calibration_data, scanner)
    error(['Scanner: ', scanner, ' has no calibration data'])
end