« GPCorrelation » : différence entre les versions

De GENOPUS
Aller à la navigation Aller à la recherche
(Page créée avec « TBW »)
 
Aucun résumé des modifications
 
(14 versions intermédiaires par le même utilisateur non affichées)
Ligne 1 : Ligne 1 :
TBW
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 [{{PathCurrentJavaDoc}}/fr/cnes/genopus/correlation/GPCorrelation.html GPCorrelation] class, the developer has only to create such an object as is:
 
<syntaxhighlight lang="java">
gpCor = new GPCorrelation();
</syntaxhighlight>
 
or:
 
<syntaxhighlight lang="java">
gpCor = new GPCorrelation("widgetId", "MyMatrix");
</syntaxhighlight>
 
== Display ==
 
We will get:
 
[[File:GPCorrelation0.png]]
 
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:
 
[[File:GPCorrelation1.png|1000px]]
 
*In case of cartesian parameters:
 
[[File:GPCorrelation2.png|1000px]]
 
* In case of <font color=#FF8C00 title="Local Orbital Frame>LOF</font> cartesian parameters:
 
[[File:GPCorrelation3.png|1000px]]
 
So we may have a covariance matrix rather than a pseudo correlation one:
 
[[File:GPCorrelation4.png|1000px]]
 
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:GPCorrelation5.png|800px]] => [[File:GPCorrelation7.png|800px]]
 
== 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">
final RealMatrix mat1 = GPCorrelationUtils.corToCov(sigma, corMat);
final RealMatrix mat2 = GPCorrelationUtils.pseudoCorToCov(corMat);
final RealMatrix mat3 = GPCorrelationUtils.covToPseudoCor(covMat);
</syntaxhighlight>
 
== How it is stored ==
 
Here is an example of the <font color=#FF8C00 title="Extensible Markup Language">XML</font> format:
 
<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>

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:

GPCorrelation0.png

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:

GPCorrelation1.png

  • In case of cartesian parameters:

GPCorrelation2.png

  • In case of LOF cartesian parameters:

GPCorrelation3.png

So we may have a covariance matrix rather than a pseudo correlation one:

GPCorrelation4.png

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.

GPCorrelation6.png

GPCorrelation5.png => GPCorrelation7.png

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>