Interpolation¶
The Interpolation class implements the \(\eta\)-interpolation method. This interpolation technique is based on charge sharing: for detected photon hits (e.g. clusters), it refines the estimated photon hit using information from neighboring pixels.
See Interpolation for a more elaborate documentation and explanation of the method.
\(\eta\)-Functions:¶
Below is an example of the Eta class of type double. Supported are Etaf of type float and Etai of type int.
- class aare._aare.Etad¶
- property c¶
eta corner value cTopLeft, cTopRight, cBottomLeft, cBottomRight
- property sum¶
photon energy of cluster
- property x¶
eta x value
- property y¶
eta y value
Note
The corner value c is only relevant when one uses calculate_eta_2 or calculate_full_eta2. Otherwise its default value is cTopLeft.
Supported are the following \(\eta\)-functions:
\(\eta\)-Function on 2x2 Clusters:¶
The \(\eta\) values can range between 0,1. Note they only range between 0,1 because the position of the center pixel (red) can change. If the center pixel is in the bottom left pixel \(\eta_x\) will be close to zero. If the center pixel is in the bottom right pixel \(\eta_y\) will be close to 1.
- aare.calculate_eta2(*args, **kwargs)¶
Overloaded function.
calculate_eta2(clusters: aare._aare.ClusterVector_Cluster3x3i) -> numpy.ndarray
calculates eta2x2
calculate_eta2(cluster: aare._aare.Cluster3x3i) -> aare::Eta2<int>
calculates eta2x2
calculate_eta2(clusters: aare._aare.ClusterVector_Cluster3x3d) -> numpy.ndarray
calculates eta2x2
calculate_eta2(cluster: aare._aare.Cluster3x3d) -> aare::Eta2<double>
calculates eta2x2
calculate_eta2(clusters: aare._aare.ClusterVector_Cluster3x3f) -> numpy.ndarray
calculates eta2x2
calculate_eta2(cluster: aare._aare.Cluster3x3f) -> aare::Eta2<float>
calculates eta2x2
calculate_eta2(clusters: aare._aare.ClusterVector_Cluster2x2i) -> numpy.ndarray
calculates eta2x2
calculate_eta2(cluster: aare._aare.Cluster2x2i) -> aare::Eta2<int>
calculates eta2x2
calculate_eta2(clusters: aare._aare.ClusterVector_Cluster2x2d) -> numpy.ndarray
calculates eta2x2
calculate_eta2(cluster: aare._aare.Cluster2x2d) -> aare::Eta2<double>
calculates eta2x2
calculate_eta2(clusters: aare._aare.ClusterVector_Cluster2x2f) -> numpy.ndarray
calculates eta2x2
calculate_eta2(cluster: aare._aare.Cluster2x2f) -> aare::Eta2<float>
calculates eta2x2
calculate_eta2(clusters: aare._aare.ClusterVector_Cluster5x5i) -> numpy.ndarray
calculates eta2x2
calculate_eta2(cluster: aare._aare.Cluster5x5i) -> aare::Eta2<int>
calculates eta2x2
calculate_eta2(clusters: aare._aare.ClusterVector_Cluster5x5d) -> numpy.ndarray
calculates eta2x2
calculate_eta2(cluster: aare._aare.Cluster5x5d) -> aare::Eta2<double>
calculates eta2x2
calculate_eta2(clusters: aare._aare.ClusterVector_Cluster5x5f) -> numpy.ndarray
calculates eta2x2
calculate_eta2(cluster: aare._aare.Cluster5x5f) -> aare::Eta2<float>
calculates eta2x2
calculate_eta2(clusters: aare._aare.ClusterVector_Cluster7x7i) -> numpy.ndarray
calculates eta2x2
calculate_eta2(cluster: aare._aare.Cluster7x7i) -> aare::Eta2<int>
calculates eta2x2
calculate_eta2(clusters: aare._aare.ClusterVector_Cluster7x7d) -> numpy.ndarray
calculates eta2x2
calculate_eta2(cluster: aare._aare.Cluster7x7d) -> aare::Eta2<double>
calculates eta2x2
calculate_eta2(clusters: aare._aare.ClusterVector_Cluster7x7f) -> numpy.ndarray
calculates eta2x2
calculate_eta2(cluster: aare._aare.Cluster7x7f) -> aare::Eta2<float>
calculates eta2x2
calculate_eta2(clusters: aare._aare.ClusterVector_Cluster9x9i) -> numpy.ndarray
calculates eta2x2
calculate_eta2(cluster: aare._aare.Cluster9x9i) -> aare::Eta2<int>
calculates eta2x2
calculate_eta2(clusters: aare._aare.ClusterVector_Cluster9x9d) -> numpy.ndarray
calculates eta2x2
calculate_eta2(cluster: aare._aare.Cluster9x9d) -> aare::Eta2<double>
calculates eta2x2
calculate_eta2(clusters: aare._aare.ClusterVector_Cluster9x9f) -> numpy.ndarray
calculates eta2x2
calculate_eta2(cluster: aare._aare.Cluster9x9f) -> aare::Eta2<float>
calculates eta2x2
calculate_eta2(clusters: aare._aare.ClusterVector_Cluster3x3i16) -> numpy.ndarray
calculates eta2x2
calculate_eta2(cluster: aare._aare.Cluster3x3i16) -> aare::Eta2<short>
calculates eta2x2
Full \(\eta\)-Function on 2x2 Clusters:¶
The \(\eta\) values can range between 0,1. Note they only range between 0,1 because the position of the center pixel (red) can change. If the center pixel is in the bottom left pixel \(\eta_x\) will be close to zero. If the center pixel is in the bottom right pixel \(\eta_y\) will be close to 1.
- aare.calculate_full_eta2(*args, **kwargs)¶
Overloaded function.
calculate_full_eta2(cluster: aare._aare.Cluster3x3i) -> aare::Eta2<int>
calculates full eta2x2
calculate_full_eta2(clusters: aare._aare.ClusterVector_Cluster3x3i) -> numpy.ndarray
calculates full eta2x2
calculate_full_eta2(cluster: aare._aare.Cluster3x3d) -> aare::Eta2<double>
calculates full eta2x2
calculate_full_eta2(clusters: aare._aare.ClusterVector_Cluster3x3d) -> numpy.ndarray
calculates full eta2x2
calculate_full_eta2(cluster: aare._aare.Cluster3x3f) -> aare::Eta2<float>
calculates full eta2x2
calculate_full_eta2(clusters: aare._aare.ClusterVector_Cluster3x3f) -> numpy.ndarray
calculates full eta2x2
calculate_full_eta2(cluster: aare._aare.Cluster2x2i) -> aare::Eta2<int>
calculates full eta2x2
calculate_full_eta2(clusters: aare._aare.ClusterVector_Cluster2x2i) -> numpy.ndarray
calculates full eta2x2
calculate_full_eta2(cluster: aare._aare.Cluster2x2d) -> aare::Eta2<double>
calculates full eta2x2
calculate_full_eta2(clusters: aare._aare.ClusterVector_Cluster2x2d) -> numpy.ndarray
calculates full eta2x2
calculate_full_eta2(cluster: aare._aare.Cluster2x2f) -> aare::Eta2<float>
calculates full eta2x2
calculate_full_eta2(clusters: aare._aare.ClusterVector_Cluster2x2f) -> numpy.ndarray
calculates full eta2x2
calculate_full_eta2(cluster: aare._aare.Cluster5x5i) -> aare::Eta2<int>
calculates full eta2x2
calculate_full_eta2(clusters: aare._aare.ClusterVector_Cluster5x5i) -> numpy.ndarray
calculates full eta2x2
calculate_full_eta2(cluster: aare._aare.Cluster5x5d) -> aare::Eta2<double>
calculates full eta2x2
calculate_full_eta2(clusters: aare._aare.ClusterVector_Cluster5x5d) -> numpy.ndarray
calculates full eta2x2
calculate_full_eta2(cluster: aare._aare.Cluster5x5f) -> aare::Eta2<float>
calculates full eta2x2
calculate_full_eta2(clusters: aare._aare.ClusterVector_Cluster5x5f) -> numpy.ndarray
calculates full eta2x2
calculate_full_eta2(cluster: aare._aare.Cluster7x7i) -> aare::Eta2<int>
calculates full eta2x2
calculate_full_eta2(clusters: aare._aare.ClusterVector_Cluster7x7i) -> numpy.ndarray
calculates full eta2x2
calculate_full_eta2(cluster: aare._aare.Cluster7x7d) -> aare::Eta2<double>
calculates full eta2x2
calculate_full_eta2(clusters: aare._aare.ClusterVector_Cluster7x7d) -> numpy.ndarray
calculates full eta2x2
calculate_full_eta2(cluster: aare._aare.Cluster7x7f) -> aare::Eta2<float>
calculates full eta2x2
calculate_full_eta2(clusters: aare._aare.ClusterVector_Cluster7x7f) -> numpy.ndarray
calculates full eta2x2
calculate_full_eta2(cluster: aare._aare.Cluster9x9i) -> aare::Eta2<int>
calculates full eta2x2
calculate_full_eta2(clusters: aare._aare.ClusterVector_Cluster9x9i) -> numpy.ndarray
calculates full eta2x2
calculate_full_eta2(cluster: aare._aare.Cluster9x9d) -> aare::Eta2<double>
calculates full eta2x2
calculate_full_eta2(clusters: aare._aare.ClusterVector_Cluster9x9d) -> numpy.ndarray
calculates full eta2x2
calculate_full_eta2(cluster: aare._aare.Cluster9x9f) -> aare::Eta2<float>
calculates full eta2x2
calculate_full_eta2(clusters: aare._aare.ClusterVector_Cluster9x9f) -> numpy.ndarray
calculates full eta2x2
calculate_full_eta2(cluster: aare._aare.Cluster3x3i16) -> aare::Eta2<short>
calculates full eta2x2
calculate_full_eta2(clusters: aare._aare.ClusterVector_Cluster3x3i16) -> numpy.ndarray
calculates full eta2x2
Full \(\eta\)-Function on 3x3 Clusters:¶
The \(\eta\) values can range between -0.5,0.5.
- aare.calculate_eta3(*args, **kwargs)¶
Overloaded function.
calculate_eta3(clusters: aare._aare.ClusterVector_Cluster3x3i) -> numpy.ndarray
calculates eta3x3 using entire cluster
calculate_eta3(cluster: aare._aare.Cluster3x3i) -> aare::Eta2<int>
calculates eta3x3 using entire cluster
calculate_eta3(clusters: aare._aare.ClusterVector_Cluster3x3d) -> numpy.ndarray
calculates eta3x3 using entire cluster
calculate_eta3(cluster: aare._aare.Cluster3x3d) -> aare::Eta2<double>
calculates eta3x3 using entire cluster
calculate_eta3(clusters: aare._aare.ClusterVector_Cluster3x3f) -> numpy.ndarray
calculates eta3x3 using entire cluster
calculate_eta3(cluster: aare._aare.Cluster3x3f) -> aare::Eta2<float>
calculates eta3x3 using entire cluster
calculate_eta3(clusters: aare._aare.ClusterVector_Cluster3x3i16) -> numpy.ndarray
calculates eta3x3 using entire cluster
calculate_eta3(cluster: aare._aare.Cluster3x3i16) -> aare::Eta2<short>
calculates eta3x3 using entire cluster
Cross \(\eta\)-Function on 3x3 Clusters:¶
The \(\eta\) values can range between -0.5,0.5.
- aare.calculate_cross_eta3(*args, **kwargs)¶
Overloaded function.
calculate_cross_eta3(clusters: aare._aare.ClusterVector_Cluster3x3i) -> numpy.ndarray
calculates eta3x3 taking into account cross pixels in cluster
calculate_cross_eta3(cluster: aare._aare.Cluster3x3i) -> aare::Eta2<int>
calculates eta3x3 taking into account cross pixels in cluster
calculate_cross_eta3(clusters: aare._aare.ClusterVector_Cluster3x3d) -> numpy.ndarray
calculates eta3x3 taking into account cross pixels in cluster
calculate_cross_eta3(cluster: aare._aare.Cluster3x3d) -> aare::Eta2<double>
calculates eta3x3 taking into account cross pixels in cluster
calculate_cross_eta3(clusters: aare._aare.ClusterVector_Cluster3x3f) -> numpy.ndarray
calculates eta3x3 taking into account cross pixels in cluster
calculate_cross_eta3(cluster: aare._aare.Cluster3x3f) -> aare::Eta2<float>
calculates eta3x3 taking into account cross pixels in cluster
calculate_cross_eta3(clusters: aare._aare.ClusterVector_Cluster3x3i16) -> numpy.ndarray
calculates eta3x3 taking into account cross pixels in cluster
calculate_cross_eta3(cluster: aare._aare.Cluster3x3i16) -> aare::Eta2<short>
calculates eta3x3 taking into account cross pixels in cluster
Interpolation class for \(\eta\)-Interpolation¶
Warning
Make sure to use the same \(\eta\)-function during interpolation as given by the joint \(\eta\)-distribution passed to the constructor.
Warning
The interpolation might lead to erroneous photon positions for clusters at the boarders of a frame. Make sure to filter out such cases.
Note
Make sure to use resonable energy bins, when constructing the joint distribution. If data is too sparse for a given energy the interpolation will lead to erreneous results.
- class aare.Interpolator¶
- __init__(*args, **kwargs)¶
Overloaded function.
__init__(self: aare._aare.Interpolator, etacube: typing.Annotated[numpy.typing.ArrayLike, numpy.float64], xbins: typing.Annotated[numpy.typing.ArrayLike, numpy.float64], ybins: typing.Annotated[numpy.typing.ArrayLike, numpy.float64], ebins: typing.Annotated[numpy.typing.ArrayLike, numpy.float64]) -> None
Constructor
Args:
- etacube:
joint distribution of eta_x, eta_y and photon energy (Note: for the joint distribution first dimension is eta_x, second: eta_y, third: energy bins.)
- xbins:
bin edges of etax
- ybins:
bin edges of etay
- ebins:
bin edges of photon energy
__init__(self: aare._aare.Interpolator, xbins: typing.Annotated[numpy.typing.ArrayLike, numpy.float64], ybins: typing.Annotated[numpy.typing.ArrayLike, numpy.float64], ebins: typing.Annotated[numpy.typing.ArrayLike, numpy.float64]) -> None
Constructor
Args:
- xbins:
bin edges of etax
- ybins:
bin edges of etay
- ebins:
bin edges of photon energy
- get_ietax(self: aare._aare.Interpolator) numpy.ndarray¶
conditional CDF of etax conditioned on etay, marginal CDF of etax (if rosenblatt transform applied)
- get_ietay(self: aare._aare.Interpolator) numpy.ndarray¶
conditional CDF of etay conditioned on etax
- interpolate(*args, **kwargs)¶
Overloaded function.
interpolate(self: aare._aare.Interpolator, cluster_vector: aare::ClusterVector<aare::Cluster<int, (unsigned char)3, (unsigned char)3, unsigned short>, void>) -> numpy.ndarray
interpolation based on eta2
- Returns:
interpolated photons
interpolate(self: aare._aare.Interpolator, cluster_vector: aare::ClusterVector<aare::Cluster<float, (unsigned char)3, (unsigned char)3, unsigned short>, void>) -> numpy.ndarray
interpolation based on eta2
- Returns:
interpolated photons
interpolate(self: aare._aare.Interpolator, cluster_vector: aare::ClusterVector<aare::Cluster<double, (unsigned char)3, (unsigned char)3, unsigned short>, void>) -> numpy.ndarray
interpolation based on eta2
- Returns:
interpolated photons
interpolate(self: aare._aare.Interpolator, cluster_vector: aare::ClusterVector<aare::Cluster<int, (unsigned char)2, (unsigned char)2, unsigned short>, void>) -> numpy.ndarray
interpolation based on eta2
- Returns:
interpolated photons
interpolate(self: aare._aare.Interpolator, cluster_vector: aare::ClusterVector<aare::Cluster<float, (unsigned char)2, (unsigned char)2, unsigned short>, void>) -> numpy.ndarray
interpolation based on eta2
- Returns:
interpolated photons
interpolate(self: aare._aare.Interpolator, cluster_vector: aare::ClusterVector<aare::Cluster<double, (unsigned char)2, (unsigned char)2, unsigned short>, void>) -> numpy.ndarray
interpolation based on eta2
- Returns:
interpolated photons
- interpolate_cross_eta3(*args, **kwargs)¶
Overloaded function.
interpolate_cross_eta3(self: aare._aare.Interpolator, cluster_vector: aare::ClusterVector<aare::Cluster<int, (unsigned char)3, (unsigned char)3, unsigned short>, void>) -> numpy.ndarray
interpolation based on cross eta3
- Returns:
interpolated photons
interpolate_cross_eta3(self: aare._aare.Interpolator, cluster_vector: aare::ClusterVector<aare::Cluster<float, (unsigned char)3, (unsigned char)3, unsigned short>, void>) -> numpy.ndarray
interpolation based on cross eta3
- Returns:
interpolated photons
interpolate_cross_eta3(self: aare._aare.Interpolator, cluster_vector: aare::ClusterVector<aare::Cluster<double, (unsigned char)3, (unsigned char)3, unsigned short>, void>) -> numpy.ndarray
interpolation based on cross eta3
- Returns:
interpolated photons
- interpolate_eta3(*args, **kwargs)¶
Overloaded function.
interpolate_eta3(self: aare._aare.Interpolator, cluster_vector: aare::ClusterVector<aare::Cluster<int, (unsigned char)3, (unsigned char)3, unsigned short>, void>) -> numpy.ndarray
interpolation based on full eta3
- Returns:
interpolated photons
interpolate_eta3(self: aare._aare.Interpolator, cluster_vector: aare::ClusterVector<aare::Cluster<float, (unsigned char)3, (unsigned char)3, unsigned short>, void>) -> numpy.ndarray
interpolation based on full eta3
- Returns:
interpolated photons
interpolate_eta3(self: aare._aare.Interpolator, cluster_vector: aare::ClusterVector<aare::Cluster<double, (unsigned char)3, (unsigned char)3, unsigned short>, void>) -> numpy.ndarray
interpolation based on full eta3
- Returns:
interpolated photons
- interpolate_full_eta2(*args, **kwargs)¶
Overloaded function.
interpolate_full_eta2(self: aare._aare.Interpolator, cluster_vector: aare::ClusterVector<aare::Cluster<int, (unsigned char)3, (unsigned char)3, unsigned short>, void>) -> numpy.ndarray
interpolation based on full eta2
- Returns:
interpolated photons
interpolate_full_eta2(self: aare._aare.Interpolator, cluster_vector: aare::ClusterVector<aare::Cluster<float, (unsigned char)3, (unsigned char)3, unsigned short>, void>) -> numpy.ndarray
interpolation based on full eta2
- Returns:
interpolated photons
interpolate_full_eta2(self: aare._aare.Interpolator, cluster_vector: aare::ClusterVector<aare::Cluster<double, (unsigned char)3, (unsigned char)3, unsigned short>, void>) -> numpy.ndarray
interpolation based on full eta2
- Returns:
interpolated photons
interpolate_full_eta2(self: aare._aare.Interpolator, cluster_vector: aare::ClusterVector<aare::Cluster<int, (unsigned char)2, (unsigned char)2, unsigned short>, void>) -> numpy.ndarray
interpolation based on full eta2
- Returns:
interpolated photons
interpolate_full_eta2(self: aare._aare.Interpolator, cluster_vector: aare::ClusterVector<aare::Cluster<float, (unsigned char)2, (unsigned char)2, unsigned short>, void>) -> numpy.ndarray
interpolation based on full eta2
- Returns:
interpolated photons
interpolate_full_eta2(self: aare._aare.Interpolator, cluster_vector: aare::ClusterVector<aare::Cluster<double, (unsigned char)2, (unsigned char)2, unsigned short>, void>) -> numpy.ndarray
interpolation based on full eta2
- Returns:
interpolated photons
- rosenblatttransform(self: aare._aare.Interpolator, etacube: Annotated[numpy.typing.ArrayLike, numpy.float64]) None¶
calculated the rosenblatttransform for the given distribution
- etacube:
joint distribution of eta_x, eta_y and photon energy (Note: for the joint distribution first dimension is eta_x, second: eta_y, third: energy bins.)
- transform_eta_values(*args, **kwargs)¶
Overloaded function.
transform_eta_values(self: aare._aare.Interpolator, Eta: aare::Eta2<int>) -> tuple[float, float]
eta.x eta.y transformed to uniform coordinates based on CDF ietax, ietay
transform_eta_values(self: aare._aare.Interpolator, Eta: aare::Eta2<float>) -> tuple[float, float]
eta.x eta.y transformed to uniform coordinates based on CDF ietax, ietay
transform_eta_values(self: aare._aare.Interpolator, Eta: aare::Eta2<double>) -> tuple[float, float]
eta.x eta.y transformed to uniform coordinates based on CDF ietax, ietay