diff options
Diffstat (limited to 'ROM.lpr')
-rw-r--r-- | ROM.lpr | 45 |
1 files changed, 35 insertions, 10 deletions
@@ -13,8 +13,8 @@ uses SysUtils,ROMunit, matheunit, Math, systemunit, lowlevelunit; var - inPulsO,inPuls,refPulsO,refPuls, - surTraj,cRefPuls,surVel: tExtPointArray; + inPulsO,inPuls,refPulsO,refPuls,surTraj,cRefPuls, + surVel,inPulsArg,refPulsArg,surTrajArg,surVelArg: tExtPointArray; smooth,betaSmooth,veloSmooth: longint; tmax,wmax,absShift,betaBound,veloBound: extended; force,fourier,mitAmplMod: boolean; @@ -273,23 +273,32 @@ begin if outVel<>'' then interpoliere(surVel); writeln(stderr,' fertig'); - fft(inPuls); - fft(refPuls); - fft(surTraj); - fft(surVel); + fft(inPuls,inPulsArg); + fft(refPuls,refPulsArg); + fft(surTraj,surTrajArg); + fft(surVel,surVelArg); inPuls[0]['y']:=0; refPuls[0]['y']:=0; surTraj[0]['y']:=0; if wmax<0 then begin cut(surTraj,min(refPuls[length(refPuls)-1]['x'],inPuls[length(inPuls)-1]['x'])/2); + cut(surTrajArg,min(refPuls[length(refPuls)-1]['x'],inPuls[length(inPuls)-1]['x'])/2); cut(inPuls,surTraj[length(surTraj)-1]['x']); + 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']); end else begin cut(surTraj,wmax); + cut(surTrajArg,wmax); cut(inPuls,wmax); + cut(inPulsArg,wmax); cut(refPuls,wmax); + cut(refPulsArg,wmax); + cut(surVel,wmax); + cut(surVelArg,wmax); end; write(stderr,'alles normieren ...'); normiere(inPuls); @@ -299,14 +308,30 @@ begin end; if outIn<>'' then begin writeOutput(outIn+'.ori',inPulsO); - writeOutput(outIn,inPuls); + if fourier then + writeOutput(outIn,inPuls,inPulsArg) + else + writeOutput(outIn,inPuls); end; if outRef<>'' then begin writeOutput(outRef+'.ori',refPulsO); - writeOutput(outRef,refPuls); + if fourier then + writeOutput(outRef,refPuls,refPulsArg) + else + writeOutput(outRef,refPuls); + end; + if outSur<>'' then begin + if fourier then + writeOutput(outSur,surTraj,surTrajArg) + else + writeOutput(outSur,surTraj); + end; + if outVel<>'' then begin + if fourier then + writeOutput(outVel,surVel,surVelArg) + else + writeOutput(outVel,surVel); end; - if outSur<>'' then writeOutput(outSur,surTraj); - if outVel<>'' then writeOutput(outVel,surVel); if outRefC<>'' then writeOutput(outRefC,cRefPuls); end. |