@@ -75,12 +75,12 @@ void BunchTuneAnalysis::analyzeBunch(Bunch* bunch){
7575 if (!bunch->hasParticleAttributes (" ParticlePhaseAttributes" )){
7676 cerr<<" adding particle phase information attribute\n " ;
7777 std::map<std::string, double > tunemap;
78- tunemap.insert (std::make_pair (" xLastPhase " , 0 ));
79- tunemap.insert (std::make_pair (" yLastPhase " , 0 ));
80- tunemap.insert (std::make_pair (" xLastTune " , 0 ));
81- tunemap.insert (std::make_pair (" yLastTune " , 0 ));
82- tunemap.insert (std::make_pair (" xAction " , 0 ));
83- tunemap.insert (std::make_pair (" yAction " , 0 ));
78+ tunemap.insert (std::make_pair (" phase_1 " , 0 ));
79+ tunemap.insert (std::make_pair (" phase_2 " , 0 ));
80+ tunemap.insert (std::make_pair (" tune_1 " , 0 ));
81+ tunemap.insert (std::make_pair (" tune_2 " , 0 ));
82+ tunemap.insert (std::make_pair (" action_1 " , 0 ));
83+ tunemap.insert (std::make_pair (" action_2 " , 0 ));
8484 bunch->addParticleAttributes (" ParticlePhaseAttributes" , tunemap);
8585 }
8686
@@ -131,8 +131,8 @@ void BunchTuneAnalysis::analyzeBunch(Bunch* bunch){
131131 bunch->getParticleAttributes (" ParticlePhaseAttributes" )->attValue (i, 3 ) = yTune;
132132
133133 // Compute actions
134- double xAction = xval * xval + xpval * xpval;
135- double yAction = yval * yval + ypval * ypval;
134+ double xAction = ( xval * xval + xpval * xpval) / 2.0 ;
135+ double yAction = ( yval * yval + ypval * ypval) / 2.0 ;
136136
137137 bunch->getParticleAttributes (" ParticlePhaseAttributes" )->attValue (i, 4 ) = xAction;
138138 bunch->getParticleAttributes (" ParticlePhaseAttributes" )->attValue (i, 5 ) = yAction;
0 commit comments