summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-07-12 13:38:43 +0200
committerErich Eckner <git@eckner.net>2017-07-12 13:38:43 +0200
commit34d7ed9e7f90282bb4be0195e6ad623bd12a4f11 (patch)
treec2ac8454bd5afd51175c1c7c8fd154c3c893f80d
parent100d84b20b68917734378de65808a3551e707d28 (diff)
downloadepost-34d7ed9e7f90282bb4be0195e6ad623bd12a4f11.tar.xz
lambda-zu-omega Verzerrung neu
-rw-r--r--epost.lpr21
-rw-r--r--epost.lps154
-rw-r--r--epostunit.pas140
-rw-r--r--typenunit.pas97
-rw-r--r--werteunit.pas183
5 files changed, 519 insertions, 76 deletions
diff --git a/epost.lpr b/epost.lpr
index 93fed13..1ca8c3c 100644
--- a/epost.lpr
+++ b/epost.lpr
@@ -337,6 +337,27 @@ begin
aufraeumen;
halt(1);
end;
+ if startetMit('lambda ',s) then begin
+ j:=findeWerte(erstesArgument(s),nil,@wertes,@Konturen,false);
+ if j<0 then begin
+ aufraeumen;
+ halt(1);
+ end;
+ if not startetMit('zu omega ',s) then begin
+ gibAus('Fehlende Parameter, erwartet: ''lambda $original zu omega $Daten''',3);
+ aufraeumen;
+ halt(1);
+ end;
+ i:=findeWerte(s,inf,@wertes,@Konturen,true);
+ if i<0 then begin
+ aufraeumen;
+ halt(1);
+ end;
+ if wertes[i].berechneLambdaZuOmegaVerzerrung(syntaxtest,inf,maxthreads,wertes[j]) then
+ continue;
+ aufraeumen;
+ halt(1);
+ end;
if startetMit('integriere ',s) then begin
j:=findeWerte(erstesArgument(s),nil,@wertes,@Konturen,false);
if j<0 then begin
diff --git a/epost.lps b/epost.lps
index d2cb216..940bcff 100644
--- a/epost.lps
+++ b/epost.lps
@@ -7,9 +7,9 @@
<Unit0>
<Filename Value="epost.lpr"/>
<IsPartOfProject Value="True"/>
- <TopLine Value="86"/>
- <CursorPos X="40" Y="114"/>
- <FoldState Value=" T0iUg4A123111221]6515]6[A4313[4421[S4121[85]cx"/>
+ <TopLine Value="29"/>
+ <CursorPos Y="46"/>
+ <FoldState Value=" T0iUg4A123111221]6515]6[A431313[4421[U4121[85]eh"/>
<UsageCount Value="202"/>
<Loaded Value="True"/>
</Unit0>
@@ -23,11 +23,10 @@
<Unit2>
<Filename Value="epostunit.pas"/>
<IsPartOfProject Value="True"/>
- <IsVisibleTab Value="True"/>
<EditorIndex Value="1"/>
- <TopLine Value="3495"/>
- <CursorPos X="24" Y="3508"/>
- <FoldState Value=" T0@gk{V0G1C191g"/>
+ <TopLine Value="3959"/>
+ <CursorPos X="24" Y="3980"/>
+ <FoldState Value=" T0=8k{V0G1C191N"/>
<UsageCount Value="201"/>
<Loaded Value="True"/>
</Unit2>
@@ -41,10 +40,11 @@
<Unit4>
<Filename Value="werteunit.pas"/>
<IsPartOfProject Value="True"/>
+ <IsVisibleTab Value="True"/>
<EditorIndex Value="3"/>
- <TopLine Value="678"/>
- <CursorPos X="27" Y="706"/>
- <FoldState Value=" T0pgkl051X111)"/>
+ <TopLine Value="382"/>
+ <CursorPos Y="417"/>
+ <FoldState Value=" T0uAkl051X111V"/>
<UsageCount Value="200"/>
<Loaded Value="True"/>
</Unit4>
@@ -52,8 +52,8 @@
<Filename Value="typenunit.pas"/>
<IsPartOfProject Value="True"/>
<EditorIndex Value="5"/>
- <TopLine Value="41"/>
- <CursorPos X="43" Y="72"/>
+ <TopLine Value="1864"/>
+ <CursorPos X="59" Y="1883"/>
<UsageCount Value="200"/>
<Loaded Value="True"/>
</Unit5>
@@ -62,7 +62,7 @@
<IsPartOfProject Value="True"/>
<EditorIndex Value="-1"/>
<CursorPos X="3" Y="15"/>
- <UsageCount Value="134"/>
+ <UsageCount Value="142"/>
</Unit6>
<Unit7>
<Filename Value="../units/fftunit.inc"/>
@@ -70,14 +70,14 @@
<EditorIndex Value="-1"/>
<TopLine Value="10"/>
<CursorPos X="22" Y="10"/>
- <UsageCount Value="131"/>
+ <UsageCount Value="139"/>
</Unit7>
<Unit8>
<Filename Value="gauszFit.inc"/>
<IsPartOfProject Value="True"/>
<EditorIndex Value="4"/>
<CursorPos X="35" Y="10"/>
- <UsageCount Value="37"/>
+ <UsageCount Value="45"/>
<Loaded Value="True"/>
</Unit8>
<Unit9>
@@ -97,9 +97,9 @@
<Unit11>
<Filename Value="../units/lowlevelunit.pas"/>
<EditorIndex Value="2"/>
- <TopLine Value="37"/>
- <CursorPos X="55" Y="8"/>
- <UsageCount Value="48"/>
+ <TopLine Value="383"/>
+ <CursorPos X="17" Y="412"/>
+ <UsageCount Value="51"/>
<Loaded Value="True"/>
</Unit11>
<Unit12>
@@ -187,122 +187,124 @@
</Units>
<JumpHistory Count="30" HistoryIndex="29">
<Position1>
- <Filename Value="werteunit.pas"/>
- <Caret Line="682" Column="27" TopLine="618"/>
+ <Filename Value="typenunit.pas"/>
+ <Caret Line="1630" Column="47" TopLine="1613"/>
</Position1>
<Position2>
- <Filename Value="werteunit.pas"/>
- <Caret Line="667" Column="69" TopLine="618"/>
+ <Filename Value="typenunit.pas"/>
+ <Caret Line="1755" Column="19" TopLine="1729"/>
</Position2>
<Position3>
- <Filename Value="werteunit.pas"/>
- <Caret Line="685" TopLine="668"/>
+ <Filename Value="typenunit.pas"/>
+ <Caret Line="2196" TopLine="2178"/>
</Position3>
<Position4>
- <Filename Value="werteunit.pas"/>
- <Caret Line="1025" TopLine="1008"/>
+ <Filename Value="typenunit.pas"/>
+ <Caret Line="1445" TopLine="1427"/>
</Position4>
<Position5>
- <Filename Value="werteunit.pas"/>
- <Caret Line="706" TopLine="689"/>
+ <Filename Value="typenunit.pas"/>
+ <Caret Line="2196" TopLine="2178"/>
</Position5>
<Position6>
- <Filename Value="werteunit.pas"/>
- <Caret Line="45" Column="25" TopLine="29"/>
+ <Filename Value="typenunit.pas"/>
+ <Caret Line="1445" TopLine="1427"/>
</Position6>
<Position7>
- <Filename Value="werteunit.pas"/>
- <Caret Line="691" Column="32" TopLine="667"/>
+ <Filename Value="typenunit.pas"/>
+ <Caret Line="1912" Column="75" TopLine="1890"/>
</Position7>
<Position8>
- <Filename Value="epost.lpr"/>
- <Caret Line="406" TopLine="86"/>
+ <Filename Value="typenunit.pas"/>
+ <Caret Line="321" Column="36" TopLine="293"/>
</Position8>
<Position9>
- <Filename Value="epostunit.pas"/>
- <Caret Line="152" Column="27" TopLine="136"/>
+ <Filename Value="typenunit.pas"/>
+ <Caret Line="413" Column="86" TopLine="387"/>
</Position9>
<Position10>
- <Filename Value="epostunit.pas"/>
- <Caret Line="3484" Column="30" TopLine="3503"/>
+ <Filename Value="typenunit.pas"/>
+ <Caret Line="439" Column="36" TopLine="410"/>
</Position10>
<Position11>
- <Filename Value="epostunit.pas"/>
- <Caret Line="363" Column="20" TopLine="345"/>
+ <Filename Value="typenunit.pas"/>
+ <Caret Line="456" Column="36" TopLine="427"/>
</Position11>
<Position12>
- <Filename Value="epostunit.pas"/>
- <Caret Line="3439" Column="24" TopLine="3410"/>
+ <Filename Value="typenunit.pas"/>
+ <Caret Line="468" Column="36" TopLine="439"/>
</Position12>
<Position13>
- <Filename Value="epostunit.pas"/>
- <Caret Line="3508" Column="24" TopLine="3479"/>
+ <Filename Value="typenunit.pas"/>
+ <Caret Line="1738" Column="48" TopLine="1709"/>
</Position13>
<Position14>
- <Filename Value="epostunit.pas"/>
- <Caret Line="6490" Column="20" TopLine="6482"/>
+ <Filename Value="typenunit.pas"/>
+ <Caret Line="1748" Column="45" TopLine="1719"/>
</Position14>
<Position15>
- <Filename Value="epostunit.pas"/>
+ <Filename Value="typenunit.pas"/>
+ <Caret Line="1802" Column="53" TopLine="1788"/>
</Position15>
<Position16>
- <Filename Value="epostunit.pas"/>
- <Caret Line="363" Column="20" TopLine="334"/>
+ <Filename Value="typenunit.pas"/>
+ <Caret Line="1872" Column="51" TopLine="1861"/>
</Position16>
<Position17>
- <Filename Value="epostunit.pas"/>
- <Caret Line="3439" Column="24" TopLine="3410"/>
+ <Filename Value="typenunit.pas"/>
+ <Caret Line="1889" TopLine="1861"/>
</Position17>
<Position18>
- <Filename Value="epostunit.pas"/>
- <Caret Line="3565" Column="47" TopLine="3525"/>
+ <Filename Value="typenunit.pas"/>
+ <Caret Line="2321" Column="51" TopLine="2292"/>
</Position18>
<Position19>
- <Filename Value="../units/lowlevelunit.pas"/>
- <Caret Line="56" Column="10" TopLine="39"/>
+ <Filename Value="typenunit.pas"/>
+ <Caret Line="2173" Column="60" TopLine="2166"/>
</Position19>
<Position20>
- <Filename Value="../units/lowlevelunit.pas"/>
- <Caret Line="8" Column="53"/>
+ <Filename Value="typenunit.pas"/>
+ <Caret Line="321" Column="36" TopLine="305"/>
</Position20>
<Position21>
- <Filename Value="../units/lowlevelunit.pas"/>
- <Caret Line="70" Column="25" TopLine="52"/>
+ <Filename Value="typenunit.pas"/>
+ <Caret Line="355" Column="36" TopLine="326"/>
</Position21>
<Position22>
- <Filename Value="../units/lowlevelunit.pas"/>
- <Caret Line="8" Column="63"/>
+ <Filename Value="typenunit.pas"/>
+ <Caret Line="377" Column="36" TopLine="348"/>
</Position22>
<Position23>
- <Filename Value="epostunit.pas"/>
- <Caret Line="1877" Column="36" TopLine="1829"/>
+ <Filename Value="typenunit.pas"/>
+ <Caret Line="413" Column="36" TopLine="384"/>
</Position23>
<Position24>
- <Filename Value="epostunit.pas"/>
- <Caret Line="363" Column="20" TopLine="352"/>
+ <Filename Value="typenunit.pas"/>
+ <Caret Line="439" Column="36" TopLine="410"/>
</Position24>
<Position25>
- <Filename Value="epostunit.pas"/>
- <Caret Line="3439" Column="24" TopLine="3410"/>
+ <Filename Value="typenunit.pas"/>
+ <Caret Line="456" Column="36" TopLine="427"/>
</Position25>
<Position26>
- <Filename Value="epostunit.pas"/>
- <Caret Line="3508" Column="24" TopLine="3479"/>
+ <Filename Value="typenunit.pas"/>
+ <Caret Line="468" Column="36" TopLine="439"/>
</Position26>
<Position27>
- <Filename Value="epostunit.pas"/>
- <Caret Line="6496" Column="65" TopLine="6481"/>
+ <Filename Value="typenunit.pas"/>
+ <Caret Line="1738" Column="48" TopLine="1709"/>
</Position27>
<Position28>
- <Filename Value="epostunit.pas"/>
+ <Filename Value="typenunit.pas"/>
+ <Caret Line="1748" Column="45" TopLine="1719"/>
</Position28>
<Position29>
- <Filename Value="epostunit.pas"/>
- <Caret Line="363" Column="20" TopLine="334"/>
+ <Filename Value="typenunit.pas"/>
+ <Caret Line="1802" Column="53" TopLine="1773"/>
</Position29>
<Position30>
- <Filename Value="epostunit.pas"/>
- <Caret Line="3439" Column="24" TopLine="3410"/>
+ <Filename Value="werteunit.pas"/>
+ <Caret Line="458" Column="52" TopLine="448"/>
</Position30>
</JumpHistory>
</ProjectSession>
diff --git a/epostunit.pas b/epostunit.pas
index 3833348..e083d6d 100644
--- a/epostunit.pas
+++ b/epostunit.pas
@@ -147,6 +147,7 @@ type
function fitteGausze(st: boolean; f: tMyStringlist; threads: longint): boolean;
function berechneZeitfrequenzanalyse(st: boolean; f: tMyStringlist; threads: longint; quelle: tWerte; Warn: tWarnstufe): boolean;
function berechneVerzerrung(st: boolean; f: tMyStringlist; threads: longint; quelle: tWerte; Warn: tWarnstufe): boolean;
+ function berechneLambdaZuOmegaVerzerrung(st: boolean; f: tMyStringList; threads: longint; quelle: tWerte): boolean;
function berechneIntegral(st: boolean; f: tMyStringlist; threads: longint; quelle: tWerte): boolean;
function berechneFFT(st: boolean; f: tMyStringlist; threads: longint; Warn: tWarnstufe): boolean;
function berechneFFT2d(st: boolean; f: tMyStringlist; threads: longint; Warn: tWarnstufe): boolean;
@@ -354,6 +355,14 @@ type
constructor create(quelle,ziel: tWerte; xMin,xMax,tMin,tMax: longint; zielpositionen: tIntPointArray; zielgewichte: tExtPointArray; zielanzahlen: tExtendedArray; Vorbearbeitungen,Nachbearbeitungen: tTransformation; vorAnz,nachAnz: longint);
procedure stExecute; override;
end;
+ tVerzerrLOThread = class(tLogThread)
+ qu,zi: tWerte;
+ ho,ve: boolean;
+ verhHo,verhVe: extended; // lambda_min / (lambda_max - lambda_min)
+ xMi,xMa,tMi,tMa: longint; // bzgl. Ziel
+ constructor create(quelle,ziel: tWerte; xMin,xMax,tMin,tMax: longint; verhaeltnisHorizontal, verhaeltnisVertikal: extended);
+ procedure stExecute; override;
+ end;
function neuePalette(f: tMyStringlist): boolean;
function initBmpHeader(w,h: longint): tBmpHeader;
@@ -3312,6 +3321,85 @@ begin
result:=true;
end;
+function tWerte.berechneLambdaZuOmegaVerzerrung(st: boolean; f: tMyStringList; threads: longint; quelle: tWerte): boolean;
+var
+ i: longint;
+ Zeit: extended;
+ verzerrLOThreads: array of tVerzerrLOThread;
+ fertig: boolean;
+ s: string;
+procedure aufraeumen;
+var
+ ii: longint;
+begin
+ for ii:=0 to length(verzerrLOThreads)-1 do
+ if assigned(verzerrLOThreads[ii]) then
+ verzerrLOThreads[ii].free;
+ setlength(verzerrLOThreads,0);
+end;
+begin
+ result:=false;
+ warteaufBeendigungDesLeseThreads;
+ gibAus('lambda-zu-omega-Verzerrung berechnen ... ',3);
+ Zeit:=now;
+ Genauigkeit:=gExtended;
+ Transformationen:=tLambdaZuOmegaTransformation.create;
+ Transformationen.fuegeVorgaengerHinzu(quelle.Transformationen);
+
+ repeat
+ if not f.metaReadln(s,true) then begin
+ gibAus('Unerwartetes Dateiende!',3);
+ aufraeumen;
+ exit;
+ end;
+ if s='Ende' then break;
+ if quelle.dichtenParameterErkannt(st,s,threads,0,_xsteps-1,0,_tsiz-1) then continue;
+ if startetMit('Threadanzahl:',s) then begin
+ threads:=strtoint(s);
+ continue;
+ end;
+ if s='horizontal' then begin
+ (Transformationen as tLambdaZuOmegaTransformation).horizontal:=true;
+ continue;
+ end;
+ if s='vertikal' then begin
+ (Transformationen as tLambdaZuOmegaTransformation).vertikal:=true;
+ continue;
+ end;
+ gibAus('Verstehe Option '''+s+''' nicht bei Erstellung einer Verzerrung!',3);
+ aufraeumen;
+ exit;
+ until false;
+
+ _xsteps:=quelle._xsteps;
+ _tsiz:=quelle._tsiz;
+ if not st then begin
+ eWerte.holeRam(3);
+ gibAus('Threads starten',3);
+ setlength(verzerrLOThreads,threads);
+ for i:=0 to length(verzerrLOThreads)-1 do
+ verzerrLOThreads[i]:=
+ tVerzerrLOThread.create(
+ quelle,
+ self,
+ round(i/length(verzerrLOThreads)*_xsteps),
+ round((i+1)/length(verzerrLOThreads)*_xsteps-1),
+ 0,
+ _tsiz-1,
+ (Transformationen as tLambdaZuOmegaTransformation).verhaeltnisHorizontal,
+ (Transformationen as tLambdaZuOmegaTransformation).verhaeltnisVertikal);
+ repeat
+ fertig:=true;
+ for i:=0 to length(verzerrLOThreads)-1 do
+ fertig:=fertig and verzerrLOThreads[i].fertig;
+ if not fertig then sleep(10);
+ until fertig;
+ end;
+ aufraeumen;
+ gibAus('... fertig '+timetostr(now-Zeit),3);
+ result:=true;
+end;
+
function tWerte.berechneIntegral(st: boolean; f: tMyStringlist; threads: longint; quelle: tWerte): boolean;
var
i,tmin,tmax,xmin,xmax: longint;
@@ -6223,6 +6311,58 @@ begin
gibAus('Verzerrthread beendet',1);
end;
+// tVerzerrLOThread ************************************************************
+
+constructor tVerzerrLOThread.create(quelle,ziel: tWerte; xMin,xMax,tMin,tMax: longint; verhaeltnisHorizontal, verhaeltnisVertikal: extended);
+begin
+ inherited create;
+ qu:=quelle;
+ zi:=ziel;
+ xMi:=xMin;
+ xMa:=xMax;
+ tMi:=tMin;
+ tMa:=tMax;
+ verhHo:=verhaeltnisHorizontal;
+ verhVe:=verhaeltnisVertikal;
+ gibAus('VerzerrLOthread erzeugt: '+inttostr(xmin)+'-'+inttostr(xmax)+' '+inttostr(tmin)+'-'+inttostr(tmax),1);
+ suspended:=false;
+end;
+
+procedure tVerzerrLOThread.stExecute;
+begin
+ gibAus('VerzerrLOthread gestartet '+floattostr(qu._minW)+' '+floattostr(qu._maxW),1);
+ case zi.genauigkeit of
+ gSingle:
+ case qu.genauigkeit of
+ gSingle:
+ zi.sWerte.kopiereLOVerzerrt(pTLLWerteSingle(@qu.sWerte),xMi,xMa,tMi,tMa,verhHo,verhVe);
+ gDouble:
+ zi.sWerte.kopiereLOVerzerrt(pTLLWerteDouble(@qu.dWerte),xMi,xMa,tMi,tMa,verhHo,verhVe);
+ gExtended:
+ zi.sWerte.kopiereLOVerzerrt(pTLLWerteExtended(@qu.eWerte),xMi,xMa,tMi,tMa,verhHo,verhVe);
+ end{of case};
+ gDouble:
+ case qu.genauigkeit of
+ gSingle:
+ zi.dWerte.kopiereLOVerzerrt(pTLLWerteSingle(@qu.sWerte),xMi,xMa,tMi,tMa,verhHo,verhVe);
+ gDouble:
+ zi.dWerte.kopiereLOVerzerrt(pTLLWerteDouble(@qu.dWerte),xMi,xMa,tMi,tMa,verhHo,verhVe);
+ gExtended:
+ zi.dWerte.kopiereLOVerzerrt(pTLLWerteExtended(@qu.eWerte),xMi,xMa,tMi,tMa,verhHo,verhVe);
+ end{of case};
+ gExtended:
+ case qu.genauigkeit of
+ gSingle:
+ zi.eWerte.kopiereLOVerzerrt(pTLLWerteSingle(@qu.sWerte),xMi,xMa,tMi,tMa,verhHo,verhVe);
+ gDouble:
+ zi.eWerte.kopiereLOVerzerrt(pTLLWerteDouble(@qu.dWerte),xMi,xMa,tMi,tMa,verhHo,verhVe);
+ gExtended:
+ zi.eWerte.kopiereLOVerzerrt(pTLLWerteExtended(@qu.eWerte),xMi,xMa,tMi,tMa,verhHo,verhVe);
+ end{of case};
+ end{of case};
+ gibAus('VerzerrLOthread beendet',1);
+end;
+
// sonstiges *******************************************************************
function findePalette(out Palette: pTPalette; name: string): boolean;
diff --git a/typenunit.pas b/typenunit.pas
index b9c6931..38fa5e9 100644
--- a/typenunit.pas
+++ b/typenunit.pas
@@ -405,6 +405,17 @@ type
// keine Ă„nderung der Achsenbegrenzungen, der Werte(skalierung)
function dumpParams: string; override;
end;
+ tLambdaZuOmegaTransformation = class (tKoordinatenTransformation)
+ horizontal, vertikal: boolean;
+ constructor create; overload;
+ function verhaeltnisHorizontal: extended;
+ function verhaeltnisVertikal: extended;
+ function wertZuPositionAufAchse(const l: tLage; x: extended): extended; override;
+ procedure aktualisiereAchsen; override;
+ function transformiereKoordinatenEinzeln(const p: tExtPoint): tExtPoint; override; overload;
+ // keine Ă„nderung der Werte(skalierung), der Ausdehnung
+ function dumpParams: string; override;
+ end;
tKoordinatenAusschnitt = class (tKoordinatenTransformation)
gr: t2x2Longint;
constructor create; overload;
@@ -2134,6 +2145,92 @@ begin
out_xs_ts[c]:=gr[c,'y']-gr[c,'x']+1;
end;
+// tLambdaZuOmegaTransformation ************************************************
+
+constructor tLambdaZuOmegaTransformation.create;
+begin
+ inherited create;
+ horizontal:=false;
+ vertikal:=false;
+end;
+
+function tLambdaZuOmegaTransformation.verhaeltnisHorizontal: extended;
+begin
+ if horizontal then
+ result:=in_achsen['x','x']/(in_achsen['x','y']-in_achsen['x','x'])
+ else
+ result:=0;
+end;
+
+function tLambdaZuOmegaTransformation.verhaeltnisVertikal: extended;
+begin
+ if vertikal then
+ result:=in_achsen['y','x']/(in_achsen['y','y']-in_achsen['y','x'])
+ else
+ result:=0;
+end;
+
+function tLambdaZuOmegaTransformation.wertZuPositionAufAchse(const l: tLage; x: extended): extended;
+begin
+ if ((l in [lOben,lUnten]) and horizontal) or // transformierte Achse?
+ ((l in [lLinks,lRechts]) and vertikal) then
+ x:=2*pi*299792458/x;
+ result:=inherited wertZuPositionAufAchse(l,x); // Vorfahren befragen
+end;
+
+procedure tLambdaZuOmegaTransformation.aktualisiereAchsen;
+var
+ c: char;
+begin
+ if horizontal then begin
+ out_achsen['x','x']:=2*pi*299792458/in_achsen['x','y'];
+ out_achsen['x','y']:=2*pi*299792458/in_achsen['x','x'];
+ end
+ else
+ for c:='x' to 'y' do
+ out_achsen['x',c]:=in_achsen['x',c];
+ if vertikal then begin
+ out_achsen['y','x']:=2*pi*299792458/in_achsen['y','y'];
+ out_achsen['y','y']:=2*pi*299792458/in_achsen['y','x'];
+ end
+ else
+ for c:='x' to 'y' do
+ out_achsen['y',c]:=in_achsen['y',c];
+end;
+
+function tLambdaZuOmegaTransformation.transformiereKoordinatenEinzeln(const p: tExtPoint): tExtPoint;
+var
+ verh: extended;
+begin
+ testeAuszerhalb(p);
+ if horizontal then begin
+ verh:=verhaeltnisHorizontal;
+ result['x']:=
+ (1/(verh + p['x']/(in_xs_ts['x']-1)) - 1/verh) /
+ (1/(verh + 1) - 1/verh);
+ end
+ else
+ result['x']:=p['x'];
+ if vertikal then begin
+ verh:=verhaeltnisVertikal;
+ result['y']:=
+ (1/(verh + p['y']/(in_xs_ts['y']-1)) - 1/verh) /
+ (1/(verh + 1) - 1/verh);
+ end
+ else
+ result['y']:=p['y'];
+end;
+
+function tLambdaZuOmegaTransformation.dumpParams: string;
+begin
+ result:='';
+ if horizontal then
+ result:='horizontal';
+ if vertikal then
+ result:=result+' und vertikal';
+ startetMit(' und ',result);
+end;
+
// tKoordinatenAusschnitt ******************************************************
constructor tKoordinatenAusschnitt.create;
diff --git a/werteunit.pas b/werteunit.pas
index fdae91a..4d67c4c 100644
--- a/werteunit.pas
+++ b/werteunit.pas
@@ -41,6 +41,9 @@ type
procedure kopiereVerzerrt(original: pTLLWerteSingle; ZPs: tIntPointArray; ZGs: tExtPointArray; ZAs: tExtendedArray; xmin,xmax,tmin,tmax: longint; vb,nb: tTransformation; va,na: longint); overload;
procedure kopiereVerzerrt(original: pTLLWerteDouble; ZPs: tIntPointArray; ZGs: tExtPointArray; ZAs: tExtendedArray; xmin,xmax,tmin,tmax: longint; vb,nb: tTransformation; va,na: longint); overload;
procedure kopiereVerzerrt(original: pTLLWerteExtended; ZPs: tIntPointArray; ZGs: tExtPointArray; ZAs: tExtendedArray; xmin,xmax,tmin,tmax: longint; vb,nb: tTransformation; va,na: longint); overload;
+ procedure kopiereLOVerzerrt(original: pTLLWerteSingle; xmin,xmax,tmin,tmax: longint; verhHo,verhVe: extended); overload;
+ procedure kopiereLOVerzerrt(original: pTLLWerteDouble; xmin,xmax,tmin,tmax: longint; verhHo,verhVe: extended); overload;
+ procedure kopiereLOVerzerrt(original: pTLLWerteExtended; xmin,xmax,tmin,tmax: longint; verhHo,verhVe: extended); overload;
destructor destroy; override;
function liesDateien(dateien: tGenerischeInputDateiInfoArray): boolean;
function fft(senkrecht,invers: boolean; algo: tFFTAlgorithmus; fen: tFenster; out pvFehler: extended): boolean; overload; inline;
@@ -352,6 +355,186 @@ begin
end;
end;
+procedure tLLWerte.kopiereLOVerzerrt(original: pTLLWerteSingle; xmin,xmax,tmin,tmax: longint; verhHo,verhVe: extended); overload;
+var
+ i,j,hV,hB,vV,vB,h,v: int64;
+begin
+ writeln(xmin,' .. ',xmax,' x ',tmin,' .. ',tmax);
+ for i:=tmin to tmax do begin
+ if verhVe>0 then begin
+ vV:=max(
+ 0,
+ round(
+ (params.tsiz-1-i+0.5)/
+ (1 + (i+0.5)/verhVe/(params.tsiz-1))
+ )
+ );
+ vB:=min(
+ params.tsiz-1,
+ round(
+ (params.tsiz-1-i+0.5)/
+ (1 + (i-0.5)/verhVe/(params.tsiz-1))
+ )
+ );
+ end
+ else begin
+ vV:=i;
+ vB:=i;
+ end;
+ for j:=xmin to xmax do begin
+ if verhHo>0 then begin
+ hV:=max(
+ 0,
+ round(
+ (params.xsteps-1-(j+0.5))/
+ (1 + (j+0.5)/verhHo/(params.xsteps-1))
+ )
+ );
+ hB:=min(
+ params.xsteps-1,
+ round(
+ (params.xsteps-1-(j-0.5))/
+ (1 + (j-0.5)/verhHo/(params.xsteps-1))
+ )
+ );
+ end
+ else begin
+ hV:=j;
+ hB:=j;
+ end;
+ werte[j+i*params.xsteps]:=0;
+ for h:=hV to hB do
+ for v:=vV to vB do
+ werte[j+i*params.xsteps]:=
+ werte[j+i*params.xsteps]+
+ original^.werte[h+v*params.xsteps];
+ if (hB>=hV) and (vB>=vV) then
+ werte[j+i*params.xsteps]:=
+ werte[j+i*params.xsteps] / (hB+1-hV) / (vB+1-vV);
+ end;
+ end;
+end;
+
+procedure tLLWerte.kopiereLOVerzerrt(original: pTLLWerteDouble; xmin,xmax,tmin,tmax: longint; verhHo,verhVe: extended); overload;
+var
+ i,j,hV,hB,vV,vB,h,v: int64;
+begin
+ writeln(xmin,' .. ',xmax,' x ',tmin,' .. ',tmax);
+ for i:=tmin to tmax do begin
+ if verhVe>0 then begin
+ vV:=max(
+ 0,
+ round(
+ (params.tsiz-1-i+0.5)/
+ (1 + (i+0.5)/verhVe/(params.tsiz-1))
+ )
+ );
+ vB:=min(
+ params.tsiz-1,
+ round(
+ (params.tsiz-1-i+0.5)/
+ (1 + (i-0.5)/verhVe/(params.tsiz-1))
+ )
+ );
+ end
+ else begin
+ vV:=i;
+ vB:=i;
+ end;
+ for j:=xmin to xmax do begin
+ if verhHo>0 then begin
+ hV:=max(
+ 0,
+ round(
+ (params.xsteps-1-(j+0.5))/
+ (1 + (j+0.5)/verhHo/(params.xsteps-1))
+ )
+ );
+ hB:=min(
+ params.xsteps-1,
+ round(
+ (params.xsteps-1-(j-0.5))/
+ (1 + (j-0.5)/verhHo/(params.xsteps-1))
+ )
+ );
+ end
+ else begin
+ hV:=j;
+ hB:=j;
+ end;
+ werte[j+i*params.xsteps]:=0;
+ for h:=hV to hB do
+ for v:=vV to vB do
+ werte[j+i*params.xsteps]:=
+ werte[j+i*params.xsteps]+
+ original^.werte[h+v*params.xsteps];
+ if (hB>=hV) and (vB>=vV) then
+ werte[j+i*params.xsteps]:=
+ werte[j+i*params.xsteps] / (hB+1-hV) / (vB+1-vV);
+ end;
+ end;
+end;
+
+procedure tLLWerte.kopiereLOVerzerrt(original: pTLLWerteExtended; xmin,xmax,tmin,tmax: longint; verhHo,verhVe: extended); overload;
+var
+ i,j,hV,hB,vV,vB,h,v: int64;
+begin
+ writeln(xmin,' .. ',xmax,' x ',tmin,' .. ',tmax);
+ for i:=tmin to tmax do begin
+ if verhVe>0 then begin
+ vV:=max(
+ 0,
+ round(
+ (params.tsiz-1-i+0.5)/
+ (1 + (i+0.5)/verhVe/(params.tsiz-1))
+ )
+ );
+ vB:=min(
+ params.tsiz-1,
+ round(
+ (params.tsiz-1-i+0.5)/
+ (1 + (i-0.5)/verhVe/(params.tsiz-1))
+ )
+ );
+ end
+ else begin
+ vV:=i;
+ vB:=i;
+ end;
+ for j:=xmin to xmax do begin
+ if verhHo>0 then begin
+ hV:=max(
+ 0,
+ round(
+ (params.xsteps-1-(j+0.5))/
+ (1 + (j+0.5)/verhHo/(params.xsteps-1))
+ )
+ );
+ hB:=min(
+ params.xsteps-1,
+ round(
+ (params.xsteps-1-(j-0.5))/
+ (1 + (j-0.5)/verhHo/(params.xsteps-1))
+ )
+ );
+ end
+ else begin
+ hV:=j;
+ hB:=j;
+ end;
+ werte[j+i*params.xsteps]:=0;
+ for h:=hV to hB do
+ for v:=vV to vB do
+ werte[j+i*params.xsteps]:=
+ werte[j+i*params.xsteps]+
+ original^.werte[h+v*params.xsteps];
+ if (hB>=hV) and (vB>=vV) then
+ werte[j+i*params.xsteps]:=
+ werte[j+i*params.xsteps] / (hB+1-hV) / (vB+1-vV);
+ end;
+ end;
+end;
+
destructor tLLWerte.destroy;
begin
setlength(werte,0);