summaryrefslogtreecommitdiff
path: root/ROM.lpr
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2014-09-23 16:48:45 +0200
committerErich Eckner <git@eckner.net>2014-09-23 16:48:45 +0200
commit66f368947bcbc2ff8104d382dab78229ca35de13 (patch)
tree32f63faa91f1692141aaeb79a5f719f19b07423b /ROM.lpr
parent17ec74a07cacd08b0904b29a390d3b7f26ba7b1b (diff)
downloadROM-66f368947bcbc2ff8104d382dab78229ca35de13.tar.xz
auch reflektierten Puls anhand von Trajektorie rekonstruieren
... bisher unvollständig
Diffstat (limited to 'ROM.lpr')
-rw-r--r--ROM.lpr33
1 files changed, 20 insertions, 13 deletions
diff --git a/ROM.lpr b/ROM.lpr
index 5863de0..26aebb3 100644
--- a/ROM.lpr
+++ b/ROM.lpr
@@ -12,17 +12,17 @@ uses
{ you can add units after this },
SysUtils,ROMunit, mathunit, Math;
-var inPuls,refPuls,surTraj: tExtPointArray;
- i,smooth: longint;
- tmax,wmax,absShift: extended;
- force,fourier: boolean;
+var inPulsO,inPuls,refPuls,surTraj,cRefPuls: tExtPointArray;
+ i,smooth: longint;
+ tmax,wmax,absShift: extended;
+ force,fourier: boolean;
-const Verwendung='Verwendung: ROM ($Einfallspuls_Datei $Ausfallspuls_Datei)/(- $trace-Datei-Prefix) $output_inPuls $output_refPuls $output_Trajektorie '+
+const Verwendung='Verwendung: ROM ($Einfallspuls_Datei $Ausfallspuls_Datei)/(- $trace-Datei-Prefix) $output_inPuls $output_refPuls $output_Trajektorie $output_cRefPuls '+
'[-s/--smooth $n] [-f/--force] [-t/--tmax $t] [-w/--wmax $w] [-F/--FFT] [-d/--dt $dt]';
begin
- if paramcount<5 then Fehler(Verwendung);
- i:=6;
+ if paramcount<6 then Fehler(Verwendung);
+ i:=7;
force:=false;
smooth:=1;
tmax:=-1;
@@ -79,23 +79,23 @@ begin
Fehler(Verwendung);
end;
if paramstr(1)='-' then
- readRawInputs(paramstr(2),inPuls,refPuls,absShift)
+ readRawInputs(paramstr(2),inPulsO,refPuls,absShift)
else begin
- readTextInput(paramstr(1),inPuls);
+ readTextInput(paramstr(1),inPulsO);
readTextInput(paramstr(2),refPuls);
end;
write(stderr,'Input sortieren ...');
- sort(inPuls);
+ sort(inPulsO);
sort(refPuls);
writeln(stderr,' fertig');
- uniq(inPuls,false);
+ uniq(inPulsO,false);
uniq(refPuls,false);
write(stderr,'Input interpolieren ...');
- interpoliere(inPuls);
+ interpoliere(inPulsO);
interpoliere(refPuls);
writeln(stderr,' fertig');
flip(refPuls);
- integrate(inPuls);
+ integrate(inPulsO,inPuls);
integrate(refPuls);
removeLinearOffset(inPuls);
removeLinearOffset(refPuls);
@@ -142,9 +142,16 @@ begin
normiere(refPuls);
normiere(surTraj);
writeln(stderr,' fertig');
+ end
+ else begin
+ write(stderr,'Reflektierten Puls berechnen ...');
+ berechneRefPuls(inPulsO,surTraj,cRefPuls);
+ integrate(cRefPuls);
+ writeln(stderr,' fertig');
end;
if paramstr(3)<>'-' then writeOutput(paramstr(3),inPuls);
if paramstr(4)<>'-' then writeOutput(paramstr(4),refPuls);
if paramstr(5)<>'-' then writeOutput(paramstr(5),surTraj);
+ if (paramstr(6)<>'-') and not fourier then writeOutput(paramstr(6),cRefPuls);
end.