Mise à jour terminée. Pour connaître les apports de la version 13.8.4 par rapport à notre ancienne version vous pouvez lire les "Release Notes" suivantes :
https://about.gitlab.com/releases/2021/02/11/security-release-gitlab-13-8-4-released/
https://about.gitlab.com/releases/2021/02/05/gitlab-13-8-3-released/

Commit 51c5fa4d authored by Laurent Belcour's avatar Laurent Belcour

Now the clamping if done after the cosine correction.

parent 70c63026
......@@ -102,11 +102,33 @@ void vertical_segment::load(const std::string& filename, const arguments& args)
}
else
{
// Read the data point x and y coordinates
vec v = vec::Zero(dimX() + 3*dimY()) ;
for(int i=0; i<dimX(); ++i)
for(int i=0; i<dimX()+dimY(); ++i)
{
linestream >> v[i] ;
}
// If data is not in the interval of fit
bool is_in = true ;
for(int i=0; i<dimX(); ++i)
{
if(v[i] < min[i] || v[i] > max[i])
{
is_in = false ;
}
}
for(int i=0; i<dimY(); ++i)
{
if(v[dimX()+i] < ymin[i] || v[dimX()+i] > ymax[i])
{
is_in = false ;
}
}
if(!is_in)
{
continue ;
}
// /*
// Correction of the data by 1/cosine(theta_L)
......@@ -118,6 +140,10 @@ void vertical_segment::load(const std::string& filename, const arguments& args)
if(cart[5] > 0.0 && cart[2] > 0.0)
{
factor = 1.0/cart[5]*cart[2];
for(int i=0; i<dimY(); ++i)
{
v[i + dimX()] /= factor;
}
}
else
{
......@@ -127,12 +153,6 @@ void vertical_segment::load(const std::string& filename, const arguments& args)
// End of correction
// */
for(int i=0; i<dimY(); ++i)
{
linestream >> v[dimX() + i];
v[dimX() + i] /= factor;
}
// Check if the data containt a vertical segment around the mean
// value.
for(int i=0; i<dimY(); ++i)
......@@ -193,27 +213,6 @@ void vertical_segment::load(const std::string& filename, const arguments& args)
#endif
}
// If data is not in the interval of fit
bool is_in = true ;
for(int i=0; i<dimX(); ++i)
{
if(v[i] < min[i] || v[i] > max[i])
{
is_in = false ;
}
}
for(int i=0; i<dimY(); ++i)
{
if(v[dimX()+i] < ymin[i] || v[dimX()+i] > ymax[i])
{
is_in = false ;
}
}
if(!is_in)
{
continue ;
}
_data.push_back(v) ;
// Update min and max
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment