-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Poly Fitting (using of high orders) - Drawing of NP profiles - Minor errors - Interface fixes Added: - Profile Table viewer - Storing auto generated tables in the project file - Copy structure as image (png) - GIU improvements
- Loading branch information
Oleksiy Penkov
committed
Aug 8, 2023
1 parent
0aec17c
commit 2822788
Showing
43 changed files
with
2,839 additions
and
317 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,12 @@ | ||
(* ***************************************************************************** | ||
* | ||
* X-Ray Calc 3 | ||
* | ||
* Copyright (C) 2001-2023 Oleksiy Penkov | ||
* e-mail: [email protected] | ||
* | ||
****************************************************************************** *) | ||
|
||
unit unit_LFPSO_Base; | ||
|
||
interface | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,12 @@ | ||
(* ***************************************************************************** | ||
* | ||
* X-Ray Calc 3 | ||
* | ||
* Copyright (C) 2001-2023 Oleksiy Penkov | ||
* e-mail: [email protected] | ||
* | ||
****************************************************************************** *) | ||
|
||
unit unit_LFPSO_Periodic; | ||
|
||
interface | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,12 @@ | ||
(* ***************************************************************************** | ||
* | ||
* X-Ray Calc 3 | ||
* | ||
* Copyright (C) 2001-2023 Oleksiy Penkov | ||
* e-mail: [email protected] | ||
* | ||
****************************************************************************** *) | ||
|
||
unit unit_LFPSO_Poly; | ||
|
||
interface | ||
|
@@ -102,7 +111,7 @@ procedure TLFPSO_Poly.UpdatePSO(const t: integer); | |
procedure TLFPSO_Poly.CheckLimitsP(const i, j, k, Ord: integer); | ||
var | ||
Val, Max, Min: Single; | ||
p, r: Integer; | ||
p, r, Nmin, Nmax: Integer; | ||
begin | ||
for p := 0 to Ord do | ||
begin | ||
|
@@ -121,32 +130,52 @@ procedure TLFPSO_Poly.CheckLimitsP(const i, j, k, Ord: integer); | |
begin | ||
for r := 1 to Counts[j] do | ||
begin | ||
Val := Poly(r, X[i][j][k]); | ||
Val := Poly(r, Xmin[0][Indexes[j]][k][0], Xmax[0][Indexes[j]][k][0], X[i][j][k]); | ||
if Val > Max then | ||
Max := Val; | ||
begin | ||
Max := Val; | ||
NMax := r; | ||
end; | ||
if Val < Min then | ||
begin | ||
Min := Val; | ||
Nmin := r; | ||
end; | ||
end | ||
end | ||
else begin | ||
Max := X[i][j][k][0]; | ||
Min := X[i][j][k][0]; | ||
end; | ||
|
||
if Max > Xmax[0][Indexes[j]][k][0] then | ||
if Max >= Xmax[0][Indexes[j]][k][0] then | ||
begin | ||
X[i][j][k][0] := Xmax[0][Indexes[j]][k][0]; | ||
for p := 1 to Ord do | ||
if X[i][j][k][p] > 0 then | ||
X[i][j][k][p] := 0; | ||
if X[i][j][k][0] > Xmax[0][Indexes[j]][k][0] then | ||
begin | ||
X[i][j][k][0] := Xmax[0][Indexes[j]][k][0]; | ||
for p := 1 to Ord do | ||
X[i][j][k][p] := 0; | ||
end | ||
else begin | ||
X[i][j][k][1] := (Xmax[0][Indexes[j]][k][0] - X[i][j][k][0]) / Nmax; | ||
for p := 2 to Ord do | ||
X[i][j][k][p] := 0; | ||
end; | ||
end; | ||
|
||
if Min < Xmin[0][Indexes[j]][k][0] then | ||
if Min <= Xmin[0][Indexes[j]][k][0] then | ||
begin | ||
X[i][j][k][0] := Xmin[0][Indexes[j]][k][0]; | ||
for p := 1 to Ord do | ||
if X[i][j][k][p] < 0 then | ||
X[i][j][k][p] := 0; | ||
if X[i][j][k][0] < Xmin[0][Indexes[j]][k][0] then | ||
begin | ||
X[i][j][k][0] := Xmin[0][Indexes[j]][k][0]; | ||
for p := 1 to Ord do | ||
X[i][j][k][p] := 0; | ||
end | ||
else begin | ||
X[i][j][k][1] := (Xmin[0][Indexes[j]][k][0] - X[i][j][k][0]) / Nmin; | ||
for p := 2 to Ord do | ||
X[i][j][k][p] := 0; | ||
end; | ||
end; | ||
end; | ||
|
||
|
@@ -196,15 +225,16 @@ procedure TLFPSO_Poly.XSeed; | |
|
||
procedure TLFPSO_Poly.RangeSeed; | ||
var | ||
i, j, k, p: integer; | ||
i, j, k, p, Ord: integer; | ||
Val: Single; | ||
begin | ||
for i := 0 to High(X) do // for every member of the population | ||
begin | ||
for j := 0 to High(X[i]) do //for every layer | ||
for k := 1 to 3 do // for H, s, rho | ||
begin | ||
for p := 0 to Order(j, k) do // for every oefficient of polynome | ||
Ord := Order(j, k); | ||
for p := 0 to Ord do // for every oefficient of polynome | ||
begin | ||
if p = 0 then | ||
begin | ||
|
@@ -214,7 +244,7 @@ procedure TLFPSO_Poly.RangeSeed; | |
else | ||
X[i][j][k][p] := Rand(1)/TP(p); | ||
end; | ||
CheckLimits(i, j, k); | ||
CheckLimitsP(i, j, k, Ord); | ||
end; | ||
end; | ||
end; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,12 @@ | ||
(* ***************************************************************************** | ||
* | ||
* X-Ray Calc 3 | ||
* | ||
* Copyright (C) 2001-2023 Oleksiy Penkov | ||
* e-mail: [email protected] | ||
* | ||
****************************************************************************** *) | ||
|
||
unit unit_LFPSO_Regular; | ||
|
||
interface | ||
|
@@ -171,8 +180,7 @@ procedure TLFPSO_Regular.SetStructure(const Inp: TFitStructure); | |
for k := 1 to Inp.Stacks[i].N do | ||
begin | ||
if (k = 1) and not FReInit then | ||
|
||
InitArray(NLayers, Links); | ||
InitArray(NLayers, Links); | ||
|
||
for j := 0 to NLayers - 1 do | ||
begin | ||
|
@@ -193,7 +201,7 @@ procedure TLFPSO_Regular.SetStructure(const Inp: TFitStructure); | |
|
||
for p := 1 to 3 do | ||
if Inp.Stacks[i].Layers[j].P[p].Paired then | ||
Links[j][1] := Index; | ||
Links[j][p] := Index; | ||
end | ||
else | ||
for l := 1 to 3 do | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.