GeneralBrokenLines V03-01-02
gblpy3
|
General Broken Lines Trajectory. More...
Public Member Functions | |
def | __init__ (self, hasCurv=True, aDim=[0, 1]) |
Create new trajectory. More... | |
def | addPoint (self, point) |
Add point to trajectory. More... | |
def | getNumPoints (self) |
Get number of points on trajectory. More... | |
def | addExternalSeed (self, aLabel, aSeed) |
Add external seed to trajectory. More... | |
def | printPoints (self) |
Print points of trajectory. More... | |
def | printData (self) |
Print data of trajectory. More... | |
def | getData (self) |
Get data of trajectory. More... | |
def | milleOut (self, aFile, doublePrec=False) |
Write (data blocks of) trajectory to MP (binary) file (as float or double values). More... | |
def | milleIn (self, aFile) |
Read (data blocks of) trajectory from MP (binary) file. More... | |
def | getResults (self, aLabel) |
Get results (corrections, covarinace matrix) at point in forward or backward direction. More... | |
def | getMeasResults (self, aLabel) |
Get residuals at point from measurement. More... | |
def | getScatResults (self, aLabel) |
Get residuals at point from scatterer. More... | |
def | getResidual (self, iData) |
Get residuals from data of trajectory. More... | |
def | fit (self, optionList="", aLabel=0) |
Perform fit of trajectory. More... | |
Private Member Functions | |
def | __getJacobian (self, aLabel) |
Get jacobian for transformation from fit to track parameters at point. More... | |
def | __getFitToLocalJacobian (self, aPoint, measDim, nJacobian=1) |
def | __getFitToKinkJacobian (self, aPoint) |
Get jacobian for transformation from (trajectory) fit to kink parameters at point. More... | |
def | __getFitToStepJacobian (self, aPoint) |
Get jacobian for transformation from (trajectory) fit to step parameters at point. More... | |
def | __getFitToKinkAndStepJacobian (self, aPoint) |
Get jacobian for transformation from (trajectory) fit to kink and step parameters at point. More... | |
def | __getResAndErr (self, aData, used=True) |
Private Attributes | |
__numPoints | |
number of points on trajectory; int More... | |
__numOffsets | |
number of (points with) offsets on trajectory; int More... | |
__numCurvature | |
'curvature' is fit parameter (=1); int More... | |
__numParameters | |
number fit parameters; int More... | |
__numLocals | |
number of local parameters; int More... | |
__externalPoint | |
label of point with external seed; int More... | |
__dimensions | |
active components of offsets (both ([0,1]) or single ([0] or [1]); list(int) More... | |
__points | |
points on trajectory; list(GblPoint) More... | |
__data | |
data (blocks) of trajectory; list(GblData) More... | |
__externalSeed | |
external seed (for local, fit parameters); matrix(float) More... | |
__measDataIndex | |
mapping points to data blocks from measurements; list(int) More... | |
__scatDataIndex | |
mapping points to data blocks from scatterers; list(int) More... | |
__skippedMeasLabel | |
label of point with measurements skipped in fit (for unbiased residuals) More... | |
__matrix | |
Calculate Jacobians to previous/next scatterer from point to point ones. More... | |
__vector | |
def gblpy3.gblfit.GblTrajectory.__init__ | ( | self, | |
hasCurv = True , |
|||
aDim = [0, 1] |
|||
) |
|
private |
Get jacobian for transformation from (trajectory) fit to kink and step parameters at point.
Jacobian broken lines (q/p,..,u_i-1,u_i,u_i+1..) to kink (du') and step (du) parameters.
Thick sactterers only.
aPoint | point to use; GblPoint |
Definition at line 1099 of file gblfit.py.
References gblpy3.gblfit.GblTrajectory.__dimensions, gblpy3.gblfit.GblTrajectory.__numCurvature, and gblpy3.gblfit.GblTrajectory.__numLocals.
Referenced by gblpy3.gblfit.GblTrajectory.fit().
|
private |
Get jacobian for transformation from (trajectory) fit to kink parameters at point.
Jacobian broken lines (q/p,..,u_i-1,u_i,u_i+1..) to kink (du') parameters.
aPoint | point to use; GblPoint |
Definition at line 1029 of file gblfit.py.
References gblpy3.gblfit.GblTrajectory.__dimensions, gblpy3.gblfit.GblTrajectory.__numCurvature, and gblpy3.gblfit.GblTrajectory.__numLocals.
Referenced by gblpy3.gblfit.GblTrajectory.fit().
|
private |
Definition at line 939 of file gblfit.py.
References gblpy3.gblfit.GblTrajectory.__dimensions, gblpy3.gblfit.GblTrajectory.__numCurvature, and gblpy3.gblfit.GblTrajectory.__numLocals.
Referenced by gblpy3.gblfit.GblTrajectory.__getJacobian(), and gblpy3.gblfit.GblTrajectory.fit().
|
private |
Get jacobian for transformation from (trajectory) fit to step parameters at point.
Jacobian broken lines (q/p,..,u_i-1,u_i,u_i+1..) to kink (du') and step (du) parameters.
Thick sactterers only.
aPoint | point to use; GblPoint |
Definition at line 1068 of file gblfit.py.
References gblpy3.gblfit.GblTrajectory.__dimensions, gblpy3.gblfit.GblTrajectory.__numCurvature, and gblpy3.gblfit.GblTrajectory.__numLocals.
Referenced by gblpy3.gblfit.GblTrajectory.fit().
|
private |
Get jacobian for transformation from fit to track parameters at point.
aLabel | (signed) label of point; int |
Definition at line 888 of file gblfit.py.
References gblpy3.gblfit.GblTrajectory.__dimensions, gblpy3.gblfit.GblTrajectory.__getFitToLocalJacobian(), gblpy3.gblfit.GblTrajectory.__numCurvature, gblpy3.gblfit.GblTrajectory.__numLocals, gblpy3.gblfit.GblTrajectory.__numPoints, and gblpy3.gblfit.GblTrajectory.__points.
Referenced by gblpy3.gblfit.GblTrajectory.fit(), and gblpy3.gblfit.GblTrajectory.getResults().
|
private |
Definition at line 1132 of file gblfit.py.
References gblpy3.gblfit.GblTrajectory.__data, gblpy3.gblfit.GblTrajectory.__matrix, and gblpy3.gblfit.GblTrajectory.getResidual().
Referenced by gblpy3.gblfit.GblTrajectory.getMeasResults(), gblpy3.gblfit.GblTrajectory.getResidual(), and gblpy3.gblfit.GblTrajectory.getScatResults().
def gblpy3.gblfit.GblTrajectory.addExternalSeed | ( | self, | |
aLabel, | |||
aSeed | |||
) |
Add external seed to trajectory.
aLabel | label of point with external seed; int |
aSeed | seed (precision matrix of track parameters at point); matrix(float) |
Definition at line 823 of file gblfit.py.
References gblpy3.gblfit.GblTrajectory.__externalPoint, and gblpy3.gblfit.GblTrajectory.__externalSeed.
def gblpy3.gblfit.GblTrajectory.addPoint | ( | self, | |
point | |||
) |
Add point to trajectory.
Points have to be ordered in arc length.
point | point to be added; GblPoint |
Definition at line 802 of file gblfit.py.
References gblpy3.gblfit.GblTrajectory.__numLocals, gblpy3.gblfit.GblTrajectory.__numPoints, and gblpy3.gblfit.GblTrajectory.__points.
def gblpy3.gblfit.GblTrajectory.fit | ( | self, | |
optionList = "" , |
|||
aLabel = 0 |
|||
) |
Perform fit of trajectory.
optionList | M-estimators to be used (one iteration per character); string |
aLabel | label of point where to skip measurements (for unbiased residuals) |
Definition at line 1220 of file gblfit.py.
References gblpy3.gblfit.GblTrajectory.__data, gblpy3.gblfit.GblTrajectory.__dimensions, gblpy3.gblfit.GblTrajectory.__externalPoint, gblpy3.gblfit.GblTrajectory.__externalSeed, gblpy3.gblfit.GblTrajectory.__getFitToKinkAndStepJacobian(), gblpy3.gblfit.GblTrajectory.__getFitToKinkJacobian(), gblpy3.gblfit.GblTrajectory.__getFitToLocalJacobian(), gblpy3.gblfit.GblTrajectory.__getFitToStepJacobian(), gblpy3.gblfit.GblTrajectory.__getJacobian(), gblpy3.gblfit.GblTrajectory.__measDataIndex, gblpy3.gblfit.GblTrajectory.__numCurvature, gblpy3.gblfit.GblTrajectory.__numLocals, gblpy3.gblfit.GblTrajectory.__numOffsets, gblpy3.gblfit.GblTrajectory.__numParameters, gblpy3.gblfit.GblTrajectory.__numPoints, gblpy3.gblfit.GblTrajectory.__points, and gblpy3.gblfit.GblTrajectory.__scatDataIndex.
def gblpy3.gblfit.GblTrajectory.getData | ( | self | ) |
Get data of trajectory.
Definition at line 843 of file gblfit.py.
References gblpy3.gblfit.GblTrajectory.__data.
def gblpy3.gblfit.GblTrajectory.getMeasResults | ( | self, | |
aLabel | |||
) |
Get residuals at point from measurement.
Get (diagonalized) residual, error of measurement and residual and down-weighting factor for measurement at point
aLabel | label of point; int |
Definition at line 1172 of file gblfit.py.
References gblpy3.gblfit.GblTrajectory.__getResAndErr(), gblpy3.gblfit.GblTrajectory.__measDataIndex, and gblpy3.gblfit.GblTrajectory.__skippedMeasLabel.
def gblpy3.gblfit.GblTrajectory.getNumPoints | ( | self | ) |
Get number of points on trajectory.
Definition at line 815 of file gblfit.py.
References gblpy3.gblfit.GblTrajectory.__numPoints.
def gblpy3.gblfit.GblTrajectory.getResidual | ( | self, | |
iData | |||
) |
Get residuals from data of trajectory.
iData | index of data block; int |
Definition at line 1211 of file gblfit.py.
References gblpy3.gblfit.GblTrajectory.__getResAndErr().
Referenced by gblpy3.gblfit.GblTrajectory.__getResAndErr().
def gblpy3.gblfit.GblTrajectory.getResults | ( | self, | |
aLabel | |||
) |
Get results (corrections, covarinace matrix) at point in forward or backward direction.
The point is identified by its label (1..number(points)), the sign distinguishes the backward (facing previous point) and forward 'side' (facing next point). For scatterers the track direction may change in between.
aLabel | signed label of point (<0 backward, >0 forward); int |
Definition at line 1154 of file gblfit.py.
References gblpy3.gblfit.GblTrajectory.__getJacobian(), gblpy3.gblfit.GblTrajectory.__matrix, and gblpy3.gblfit.GblTrajectory.__vector.
def gblpy3.gblfit.GblTrajectory.getScatResults | ( | self, | |
aLabel | |||
) |
Get residuals at point from scatterer.
Get (diagonalized) residual, error of measurement and residual and down-weighting factor for scatterering kinks at point
aLabel | label of point; int |
Definition at line 1193 of file gblfit.py.
References gblpy3.gblfit.GblTrajectory.__getResAndErr(), and gblpy3.gblfit.GblTrajectory.__scatDataIndex.
def gblpy3.gblfit.GblTrajectory.milleIn | ( | self, | |
aFile | |||
) |
Read (data blocks of) trajectory from MP (binary) file.
aFile | MP file |
Definition at line 863 of file gblfit.py.
References gblpy3.gblfit.GblTrajectory.__data, gblpy3.gblfit.GblTrajectory.__dimensions, gblpy3.gblfit.GblTrajectory.__numCurvature, gblpy3.gblfit.GblTrajectory.__numLocals, and gblpy3.gblfit.GblTrajectory.__numParameters.
def gblpy3.gblfit.GblTrajectory.milleOut | ( | self, | |
aFile, | |||
doublePrec = False |
|||
) |
Write (data blocks of) trajectory to MP (binary) file (as float or double values).
aFile | MP file |
doublePrec | flag for storage in as double values |
Definition at line 851 of file gblfit.py.
References gblpy3.gblfit.GblTrajectory.__data.
def gblpy3.gblfit.GblTrajectory.printData | ( | self | ) |
Print data of trajectory.
Definition at line 834 of file gblfit.py.
References gblpy3.gblfit.GblTrajectory.__data.
def gblpy3.gblfit.GblTrajectory.printPoints | ( | self | ) |
Print points of trajectory.
Definition at line 828 of file gblfit.py.
References gblpy3.gblfit.GblTrajectory.__points.
|
private |
data (blocks) of trajectory; list(GblData)
Down weight (data) outliers.
aMethod | M-estimator; int |
Calculate predictions.
Definition at line 787 of file gblfit.py.
Referenced by gblpy3.gblfit.GblTrajectory.__getResAndErr(), gblpy3.gblfit.GblTrajectory.fit(), gblpy3.gblfit.GblTrajectory.getData(), gblpy3.gblfit.GblTrajectory.milleIn(), gblpy3.gblfit.GblTrajectory.milleOut(), and gblpy3.gblfit.GblTrajectory.printData().
|
private |
active components of offsets (both ([0,1]) or single ([0] or [1]); list(int)
Definition at line 783 of file gblfit.py.
Referenced by gblpy3.gblfit.GblTrajectory.__getFitToKinkAndStepJacobian(), gblpy3.gblfit.GblTrajectory.__getFitToKinkJacobian(), gblpy3.gblfit.GblTrajectory.__getFitToLocalJacobian(), gblpy3.gblfit.GblTrajectory.__getFitToStepJacobian(), gblpy3.gblfit.GblTrajectory.__getJacobian(), gblpy3.gblfit.GblTrajectory.fit(), and gblpy3.gblfit.GblTrajectory.milleIn().
|
private |
label of point with external seed; int
Definition at line 781 of file gblfit.py.
Referenced by gblpy3.gblfit.GblTrajectory.addExternalSeed(), and gblpy3.gblfit.GblTrajectory.fit().
|
private |
external seed (for local, fit parameters); matrix(float)
Definition at line 789 of file gblfit.py.
Referenced by gblpy3.gblfit.GblTrajectory.addExternalSeed(), and gblpy3.gblfit.GblTrajectory.fit().
|
private |
Calculate Jacobians to previous/next scatterer from point to point ones.
Prepare fit; generate data from points.
Build linear equation system from data.
Definition at line 1362 of file gblfit.py.
Referenced by gblpy3.gblfit.GblTrajectory.__getResAndErr(), and gblpy3.gblfit.GblTrajectory.getResults().
|
private |
mapping points to data blocks from measurements; list(int)
Definition at line 791 of file gblfit.py.
Referenced by gblpy3.gblfit.GblTrajectory.fit(), and gblpy3.gblfit.GblTrajectory.getMeasResults().
|
private |
'curvature' is fit parameter (=1); int
Definition at line 775 of file gblfit.py.
Referenced by gblpy3.gblfit.GblTrajectory.__getFitToKinkAndStepJacobian(), gblpy3.gblfit.GblTrajectory.__getFitToKinkJacobian(), gblpy3.gblfit.GblTrajectory.__getFitToLocalJacobian(), gblpy3.gblfit.GblTrajectory.__getFitToStepJacobian(), gblpy3.gblfit.GblTrajectory.__getJacobian(), gblpy3.gblfit.GblTrajectory.fit(), and gblpy3.gblfit.GblTrajectory.milleIn().
|
private |
number of local parameters; int
Definition at line 779 of file gblfit.py.
Referenced by gblpy3.gblfit.GblTrajectory.__getFitToKinkAndStepJacobian(), gblpy3.gblfit.GblTrajectory.__getFitToKinkJacobian(), gblpy3.gblfit.GblTrajectory.__getFitToLocalJacobian(), gblpy3.gblfit.GblTrajectory.__getFitToStepJacobian(), gblpy3.gblfit.GblTrajectory.__getJacobian(), gblpy3.gblfit.GblTrajectory.addPoint(), gblpy3.gblfit.GblTrajectory.fit(), and gblpy3.gblfit.GblTrajectory.milleIn().
|
private |
number of (points with) offsets on trajectory; int
Define offsets from list of points.
Definition at line 773 of file gblfit.py.
Referenced by gblpy3.gblfit.GblTrajectory.fit().
|
private |
number fit parameters; int
Definition at line 777 of file gblfit.py.
Referenced by gblpy3.gblfit.GblTrajectory.fit(), and gblpy3.gblfit.GblTrajectory.milleIn().
|
private |
number of points on trajectory; int
Definition at line 771 of file gblfit.py.
Referenced by gblpy3.gblfit.GblTrajectory.__getJacobian(), gblpy3.gblfit.GblTrajectory.addPoint(), gblpy3.gblfit.GblTrajectory.fit(), and gblpy3.gblfit.GblTrajectory.getNumPoints().
|
private |
points on trajectory; list(GblPoint)
Definition at line 785 of file gblfit.py.
Referenced by gblpy3.gblfit.GblTrajectory.__getJacobian(), gblpy3.gblfit.GblTrajectory.addPoint(), gblpy3.gblfit.GblTrajectory.fit(), and gblpy3.gblfit.GblTrajectory.printPoints().
|
private |
mapping points to data blocks from scatterers; list(int)
Definition at line 793 of file gblfit.py.
Referenced by gblpy3.gblfit.GblTrajectory.fit(), and gblpy3.gblfit.GblTrajectory.getScatResults().
|
private |
label of point with measurements skipped in fit (for unbiased residuals)
Definition at line 795 of file gblfit.py.
Referenced by gblpy3.gblfit.GblTrajectory.getMeasResults().
|
private |
Definition at line 1363 of file gblfit.py.
Referenced by gblpy3.gblfit.GblTrajectory.getResults().