Commit 48aa91fd authored by Yaroslav Gevorkov's avatar Yaroslav Gevorkov
Browse files

added stage of fixed refinement for center refinement

parent 9239728d
...@@ -41,7 +41,7 @@ class PinkIndexer ...@@ -41,7 +41,7 @@ class PinkIndexer
firstFixedThenVariableLatticeParameters, firstFixedThenVariableLatticeParameters,
firstFixedThenVariableLatticeParametersMultiSeedLengths, firstFixedThenVariableLatticeParametersMultiSeedLengths,
firstFixedThenVariableLatticeParametersMultiSeed, firstFixedThenVariableLatticeParametersMultiSeed,
variableLatticeParametersCenterAdjustmentMultiSeed firstFixedThenVariableLatticeParametersCenterAdjustmentMultiSeed
}; };
PinkIndexer(const ExperimentSettings& experimentSettings, ConsideredPeaksCount consideredPeaksCount, AngleResolution angleResolution, PinkIndexer(const ExperimentSettings& experimentSettings, ConsideredPeaksCount consideredPeaksCount, AngleResolution angleResolution,
......
...@@ -38,7 +38,7 @@ typedef enum ...@@ -38,7 +38,7 @@ typedef enum
REFINEMENT_TYPE_variableLatticeParameters = 2, REFINEMENT_TYPE_variableLatticeParameters = 2,
REFINEMENT_TYPE_firstFixedThenVariableLatticeParameters = 3, REFINEMENT_TYPE_firstFixedThenVariableLatticeParameters = 3,
REFINEMENT_TYPE_firstFixedThenVariableLatticeParametersMultiSeed = 4, REFINEMENT_TYPE_firstFixedThenVariableLatticeParametersMultiSeed = 4,
REFINEMENT_TYPE_variableLatticeParametersCenterAdjustmentMultiSeed = 5, REFINEMENT_TYPE_firstFixedThenVariableLatticeParametersCenterAdjustmentMultiSeed = 5,
REFINEMENT_TYPE_lastEnum REFINEMENT_TYPE_lastEnum
} refinementType_t; } refinementType_t;
......
...@@ -144,7 +144,7 @@ void PinkIndexer::refine(Lattice& indexedLattice, Vector2f& centerShift, const M ...@@ -144,7 +144,7 @@ void PinkIndexer::refine(Lattice& indexedLattice, Vector2f& centerShift, const M
} }
} }
break; break;
case RefinementType::variableLatticeParametersCenterAdjustmentMultiSeed: case RefinementType::firstFixedThenVariableLatticeParametersCenterAdjustmentMultiSeed:
{ {
constexpr int refinementTries = 750; constexpr int refinementTries = 750;
int fittedNodesCount[refinementTries]; int fittedNodesCount[refinementTries];
...@@ -164,6 +164,10 @@ void PinkIndexer::refine(Lattice& indexedLattice, Vector2f& centerShift, const M ...@@ -164,6 +164,10 @@ void PinkIndexer::refine(Lattice& indexedLattice, Vector2f& centerShift, const M
fittedLattices[i] = Lattice(currentBasis); fittedLattices[i] = Lattice(currentBasis);
centerShifts[i] = Vector2f::Random() * 80e-6; centerShifts[i] = Vector2f::Random() * 80e-6;
refinement.setTolerance(min(finalRefinementTolerance * 2.5, 0.12));
refinement.refineFixedLattice(fittedLattices[i], ucsDirections, ucsBorderNorms);
refinement.setTolerance(min(finalRefinementTolerance * 1.8, 0.10));
refinement.refineVariableLatticeWithCenter(fittedLattices[i], centerShifts[i], detectorPeaks_m);
refinement.setTolerance(finalRefinementTolerance); refinement.setTolerance(finalRefinementTolerance);
refinement.refineVariableLatticeWithCenter(fittedLattices[i], centerShifts[i], detectorPeaks_m); refinement.refineVariableLatticeWithCenter(fittedLattices[i], centerShifts[i], detectorPeaks_m);
......
...@@ -73,8 +73,8 @@ extern "C" PinkIndexer* PinkIndexer_new(ExperimentSettings* experimentSettings, ...@@ -73,8 +73,8 @@ extern "C" PinkIndexer* PinkIndexer_new(ExperimentSettings* experimentSettings,
case REFINEMENT_TYPE_firstFixedThenVariableLatticeParametersMultiSeed: case REFINEMENT_TYPE_firstFixedThenVariableLatticeParametersMultiSeed:
refinementType_enumClass = PinkIndexer::RefinementType::firstFixedThenVariableLatticeParametersMultiSeed; refinementType_enumClass = PinkIndexer::RefinementType::firstFixedThenVariableLatticeParametersMultiSeed;
break; break;
case REFINEMENT_TYPE_variableLatticeParametersCenterAdjustmentMultiSeed: case REFINEMENT_TYPE_firstFixedThenVariableLatticeParametersCenterAdjustmentMultiSeed:
refinementType_enumClass = PinkIndexer::RefinementType::variableLatticeParametersCenterAdjustmentMultiSeed; refinementType_enumClass = PinkIndexer::RefinementType::firstFixedThenVariableLatticeParametersCenterAdjustmentMultiSeed;
break; break;
default: default:
......
Supports Markdown
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