diff options
Diffstat (limited to 'ROM.lpr')
-rw-r--r-- | ROM.lpr | 30 |
1 files changed, 24 insertions, 6 deletions
@@ -16,7 +16,7 @@ var inPulsO,inPuls,refPulsO,refPuls,surTraj,cRefPuls, surVel,inPulsArg,refPulsArg,surTrajArg,surVelArg: tExtPointArray; smooth,betaSmooth,veloSmooth: longint; - tmax,wmax,absShift,betaBound,veloBound: extended; + tmax,wmax,absShift,betaBound,veloBound,fftBreite: extended; force,fourier,mitAmplMod: boolean; f: textfile; s,t,u,lpicIn,rohIn,rohRef,outIn, @@ -37,6 +37,7 @@ begin absShift:=-1e9; betaBound:=0.95; fourier:=false; + fftBreite:=-1; mitAmplMod:=true; veloSmooth:=1; veloBound:=1; @@ -147,6 +148,11 @@ begin fourier:=true; continue; end; + if pos('FFT-Breite:',s)=1 then begin + delete(s,1,pos(':',s)); + fftBreite:=strToFloat(trim(s)); + continue; + end; if s='ohne FFT' then begin fourier:=false; continue; @@ -273,10 +279,18 @@ begin if outVel<>'' then interpoliere(surVel); writeln(stderr,' fertig'); + if fftBreite>0 then begin + fenstern(inPuls,fftBreite); + fenstern(refPuls,fftBreite); + fenstern(surTraj,fftBreite); + if outVel<>'' then + fenstern(surVel,fftBreite,true); + end; fft(inPuls,inPulsArg); fft(refPuls,refPulsArg); fft(surTraj,surTrajArg); - fft(surVel,surVelArg); + if outVel<>'' then + fft(surVel,surVelArg); inPuls[0]['y']:=0; refPuls[0]['y']:=0; surTraj[0]['y']:=0; @@ -287,8 +301,10 @@ begin cut(inPulsArg,surTraj[length(surTraj)-1]['x']); cut(refPuls,surTraj[length(surTraj)-1]['x']); cut(refPulsArg,surTraj[length(surTraj)-1]['x']); - cut(surVel,surTraj[length(surTraj)-1]['x']); - cut(surVelArg,surTraj[length(surTraj)-1]['x']); + if outVel<>'' then begin + cut(surVel,surTraj[length(surTraj)-1]['x']); + cut(surVelArg,surTraj[length(surTraj)-1]['x']); + end; end else begin cut(surTraj,wmax); @@ -297,8 +313,10 @@ begin cut(inPulsArg,wmax); cut(refPuls,wmax); cut(refPulsArg,wmax); - cut(surVel,wmax); - cut(surVelArg,wmax); + if outVel<>'' then begin + cut(surVel,wmax); + cut(surVelArg,wmax); + end; end; write(stderr,'alles normieren ...'); normiere(inPuls); |