Changeset 737 in ETALON for CLIO/CTR+gfw/GFWnew/GFWnew.m


Ignore:
Timestamp:
Sep 1, 2017, 6:03:25 PM (7 years ago)
Author:
delerue
Message:

Added double gaussian to GFWnew

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CLIO/CTR+gfw/GFWnew/GFWnew.m

    r541 r737  
    11  function  [nu_Hz,SP_spec_1,SP_spec_N,lam,E_total,sum_tr,thet]=GFWnew(var)
     2global Profile
     3global time
    24
    35%  single_elec
     
    4648ThetaDiv=10;%steps in theta
    4749phiDiv=3;%steps in phi
     50double_gaussian_offset=0; % Offset of the second gaussian with respect to the first one
     51double_gaussian_amplitude=1; % Amplitude of the second gaussian with respect to the first one
     52double_gaussian_sigma_factor=1; % Sigma ration of the second gaussian with respect to the first one
    4853
    4954if (~isempty(var))
     
    7479sigma_L= sigma_t*epsl;
    7580sigma_H= sigma_t;
     81double_gaussian_sigma=sigma_t*double_gaussian_sigma_factor;
    7682time=(1:(length(nu)*2))*(1/(length(nu)*2*(nu(2)-nu(1))));
    7783xc=mean(time);
    7884G1=exp(-(time-xc).^2./(2*sigma_L^2));
    7985G2=exp(-(time-xc).^2./(2*sigma_H^2));
     86G3=double_gaussian_amplitude*exp(-(time-xc+double_gaussian_offset).^2./(2*double_gaussian_sigma^2));
    8087G1(time>xc)=0;
    8188G2(time<xc)=0;
    82 Profile=(G1+G2)./sum(G1+G2);
     89Profile=(G1+G2+G3)./sum(G1+G2+G3);
    8390end
    8491
Note: See TracChangeset for help on using the changeset viewer.