« GPCorrelation » : différence entre les versions
Aucun résumé des modifications |
|||
(4 versions intermédiaires par le même utilisateur non affichées) | |||
Ligne 1 : | Ligne 1 : | ||
This widget allows to manage '''"pseudo correlation"''' or '''covariance''' matrices. | |||
Why '''"pseudo correlation"''' ? In fact a real correlation matrix has its diagonal only with values of "1", the sigma values being given independantly. Here, we will consider a '''"pseudo correlation"''' with the diagonal filled with these sigma values ! | |||
== How to call it == | == How to call it == | ||
Ligne 19 : | Ligne 23 : | ||
[[File:GPCorrelation0.png]] | [[File:GPCorrelation0.png]] | ||
By selecting the type of parameters, we may enter data for correlation/covariance | By selecting the type of parameters, we may enter data for pseudo correlation/covariance matrices for Keplerian/Cartesian/<font color=#FF8C00 title="Local Orbital Frame>LOF</font> cartesians parameters. The different displays will be: | ||
* In case of Keplerian parameters: | * In case of Keplerian parameters: | ||
Ligne 33 : | Ligne 37 : | ||
[[File:GPCorrelation3.png|1000px]] | [[File:GPCorrelation3.png|1000px]] | ||
So we may have a covariance matrix rather than a correlation one: | So we may have a covariance matrix rather than a pseudo correlation one: | ||
[[File:GPCorrelation4.png|1000px]] | [[File:GPCorrelation4.png|1000px]] | ||
If the initial correlation (resp. covariance) matrix is not null, a specific pop-up window will appear to ask for the type of conversion. A bit as for the [[GPOrbit|GPOrbit]] widget, it will be possible to do this conversion between correlation and covariance matrices (but not between the different type of parameters) using a kind of “pivot” notion. | If the initial pseudo correlation (resp. covariance) matrix is not null, a specific pop-up window will appear to ask for the type of conversion. A bit as for the [[GPOrbit|GPOrbit]] widget, it will be possible to do this conversion between pseudo correlation and covariance matrices (but not between the different type of parameters) using a kind of “pivot” notion. | ||
[[File:GPCorrelation6.png]] | [[File:GPCorrelation6.png]] | ||
Ligne 45 : | Ligne 49 : | ||
== How to use it == | == How to use it == | ||
There are no exactly corresponding correlation/covariance matrices inside [http://patrius.cnes.fr PATRIUS] but <font color=#556B2F>'''GENOPUS'''</font> gives some utility classes and methods to use them. | |||
In the examples below, we can recover the widget data inside [http://patrius.cnes.fr PATRIUS] <font color=#4169E1>RealMatrix</font> or <font color=#4169E1>Realvector</font> objects. | |||
<syntaxhighlight lang="java"> | |||
final GPCorrelationData data = gpCor.getGpCorrelationData(); | |||
final RealMatrix corMat = data.getCorrelationMatrix(); | |||
final RealMatrix covMat = data.getCovarianceMatrix(); | |||
final RealMatrix sqrtRootcovMat = data.getSqrtCovarianceMatrix(); | |||
final RealVector sigma = data.getSigma(); | |||
</syntaxhighlight> | |||
We have also the possibility to use these utility methods: | |||
<syntaxhighlight lang="java"> | <syntaxhighlight lang="java"> | ||
... | final RealMatrix mat1 = GPCorrelationUtils.corToCov(sigma, corMat); | ||
final RealMatrix mat2 = GPCorrelationUtils.pseudoCorToCov(corMat); | |||
final RealMatrix mat3 = GPCorrelationUtils.covToPseudoCor(covMat); | |||
</syntaxhighlight> | </syntaxhighlight> | ||
== How it is stored == | == How it is stored == | ||
Here is the <font color=#FF8C00 title="Extensible Markup Language">XML</font> format: | Here is an example of the <font color=#FF8C00 title="Extensible Markup Language">XML</font> format: | ||
<syntaxhighlight lang="XML"> | <syntaxhighlight lang="XML"> | ||
... | <!--Type of matrix:--> | ||
<String name="matrixType">CORRELATION</String> | |||
<!--Type of parameters:--> | |||
<String name="type">LOF</String> | |||
<!--LOF types:--> | |||
<String name="lofType">LVLH</String> | |||
<!--Absolute velocity:--> | |||
<Boolean name="velocityType">true</Boolean> | |||
<Real name="Sigma_x" unit="m">1.0E1</Real> | |||
<Real name="Rho_x/y">5.0E-1</Real> | |||
<Real name="Rho_x/z">0.0E0</Real> | |||
<Real name="Rho_x/vx">0.0E0</Real> | |||
<Real name="Rho_x/vy">0.0E0</Real> | |||
<Real name="Rho_x/vz">0.0E0</Real> | |||
<Real name="Sigma_y" unit="m">2.0E4</Real> | |||
<Real name="Rho_y/z">0.0E0</Real> | |||
<Real name="Rho_y/vx">0.0E0</Real> | |||
<Real name="Rho_y/vy">0.0E0</Real> | |||
<Real name="Rho_y/vz">0.0E0</Real> | |||
<Real name="Sigma_z" unit="m">3.0E4</Real> | |||
<Real name="Rho_z/vx">0.0E0</Real> | |||
<Real name="Rho_z/vy">0.0E0</Real> | |||
<Real name="Rho_z/vz">0.0E0</Real> | |||
<Real name="Sigma_vx" unit="m/s">1.0E2</Real> | |||
<Real name="Rho_vx/vy">0.0E0</Real> | |||
<Real name="Rho_vx/vz">0.0E0</Real> | |||
<Real name="Sigma_vy" unit="m/s">2.0E2</Real> | |||
<Real name="Rho_vy/vz">0.0E0</Real> | |||
<Real name="Sigma_vz" unit="m/s">3.0E2</Real> | |||
</syntaxhighlight> | </syntaxhighlight> |
Dernière version du 13 décembre 2021 à 16:38
This widget allows to manage "pseudo correlation" or covariance matrices.
Why "pseudo correlation" ? In fact a real correlation matrix has its diagonal only with values of "1", the sigma values being given independantly. Here, we will consider a "pseudo correlation" with the diagonal filled with these sigma values !
How to call it
For using the GPCorrelation class, the developer has only to create such an object as is:
gpCor = new GPCorrelation();
or:
gpCor = new GPCorrelation("widgetId", "MyMatrix");
Display
We will get:
By selecting the type of parameters, we may enter data for pseudo correlation/covariance matrices for Keplerian/Cartesian/LOF cartesians parameters. The different displays will be:
- In case of Keplerian parameters:
- In case of cartesian parameters:
- In case of LOF cartesian parameters:
So we may have a covariance matrix rather than a pseudo correlation one:
If the initial pseudo correlation (resp. covariance) matrix is not null, a specific pop-up window will appear to ask for the type of conversion. A bit as for the GPOrbit widget, it will be possible to do this conversion between pseudo correlation and covariance matrices (but not between the different type of parameters) using a kind of “pivot” notion.
How to use it
There are no exactly corresponding correlation/covariance matrices inside PATRIUS but GENOPUS gives some utility classes and methods to use them.
In the examples below, we can recover the widget data inside PATRIUS RealMatrix or Realvector objects.
final GPCorrelationData data = gpCor.getGpCorrelationData();
final RealMatrix corMat = data.getCorrelationMatrix();
final RealMatrix covMat = data.getCovarianceMatrix();
final RealMatrix sqrtRootcovMat = data.getSqrtCovarianceMatrix();
final RealVector sigma = data.getSigma();
We have also the possibility to use these utility methods:
final RealMatrix mat1 = GPCorrelationUtils.corToCov(sigma, corMat);
final RealMatrix mat2 = GPCorrelationUtils.pseudoCorToCov(corMat);
final RealMatrix mat3 = GPCorrelationUtils.covToPseudoCor(covMat);
How it is stored
Here is an example of the XML format:
<!--Type of matrix:-->
<String name="matrixType">CORRELATION</String>
<!--Type of parameters:-->
<String name="type">LOF</String>
<!--LOF types:-->
<String name="lofType">LVLH</String>
<!--Absolute velocity:-->
<Boolean name="velocityType">true</Boolean>
<Real name="Sigma_x" unit="m">1.0E1</Real>
<Real name="Rho_x/y">5.0E-1</Real>
<Real name="Rho_x/z">0.0E0</Real>
<Real name="Rho_x/vx">0.0E0</Real>
<Real name="Rho_x/vy">0.0E0</Real>
<Real name="Rho_x/vz">0.0E0</Real>
<Real name="Sigma_y" unit="m">2.0E4</Real>
<Real name="Rho_y/z">0.0E0</Real>
<Real name="Rho_y/vx">0.0E0</Real>
<Real name="Rho_y/vy">0.0E0</Real>
<Real name="Rho_y/vz">0.0E0</Real>
<Real name="Sigma_z" unit="m">3.0E4</Real>
<Real name="Rho_z/vx">0.0E0</Real>
<Real name="Rho_z/vy">0.0E0</Real>
<Real name="Rho_z/vz">0.0E0</Real>
<Real name="Sigma_vx" unit="m/s">1.0E2</Real>
<Real name="Rho_vx/vy">0.0E0</Real>
<Real name="Rho_vx/vz">0.0E0</Real>
<Real name="Sigma_vy" unit="m/s">2.0E2</Real>
<Real name="Rho_vy/vz">0.0E0</Real>
<Real name="Sigma_vz" unit="m/s">3.0E2</Real>