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
firstFixedThenVariableLatticeParameters,
firstFixedThenVariableLatticeParametersMultiSeedLengths,
firstFixedThenVariableLatticeParametersMultiSeed,
variableLatticeParametersCenterAdjustmentMultiSeed
firstFixedThenVariableLatticeParametersCenterAdjustmentMultiSeed
};
PinkIndexer(const ExperimentSettings& experimentSettings, ConsideredPeaksCount consideredPeaksCount, AngleResolution angleResolution,
......
......@@ -38,7 +38,7 @@ typedef enum
REFINEMENT_TYPE_variableLatticeParameters = 2,
REFINEMENT_TYPE_firstFixedThenVariableLatticeParameters = 3,
REFINEMENT_TYPE_firstFixedThenVariableLatticeParametersMultiSeed = 4,
REFINEMENT_TYPE_variableLatticeParametersCenterAdjustmentMultiSeed = 5,
REFINEMENT_TYPE_firstFixedThenVariableLatticeParametersCenterAdjustmentMultiSeed = 5,
REFINEMENT_TYPE_lastEnum
} refinementType_t;
......
......@@ -144,7 +144,7 @@ void PinkIndexer::refine(Lattice& indexedLattice, Vector2f& centerShift, const M
}
}
break;
case RefinementType::variableLatticeParametersCenterAdjustmentMultiSeed:
case RefinementType::firstFixedThenVariableLatticeParametersCenterAdjustmentMultiSeed:
{
constexpr int refinementTries = 750;
int fittedNodesCount[refinementTries];
......@@ -164,6 +164,10 @@ void PinkIndexer::refine(Lattice& indexedLattice, Vector2f& centerShift, const M
fittedLattices[i] = Lattice(currentBasis);
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.refineVariableLatticeWithCenter(fittedLattices[i], centerShifts[i], detectorPeaks_m);
......
......@@ -73,8 +73,8 @@ extern "C" PinkIndexer* PinkIndexer_new(ExperimentSettings* experimentSettings,
case REFINEMENT_TYPE_firstFixedThenVariableLatticeParametersMultiSeed:
refinementType_enumClass = PinkIndexer::RefinementType::firstFixedThenVariableLatticeParametersMultiSeed;
break;
case REFINEMENT_TYPE_variableLatticeParametersCenterAdjustmentMultiSeed:
refinementType_enumClass = PinkIndexer::RefinementType::variableLatticeParametersCenterAdjustmentMultiSeed;
case REFINEMENT_TYPE_firstFixedThenVariableLatticeParametersCenterAdjustmentMultiSeed:
refinementType_enumClass = PinkIndexer::RefinementType::firstFixedThenVariableLatticeParametersCenterAdjustmentMultiSeed;
break;
default:
......
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