void VESPERSSpatialLineScanConfigurationView::onSetEndPosition() { double position = 0; double otherPosition = 0; switch(int(config_->motor())){ case VESPERS::H: position = VESPERSBeamline::vespers()->pseudoSampleStage()->horiz()->value(); otherPosition = VESPERSBeamline::vespers()->pseudoSampleStage()->vert()->value(); break; case VESPERS::X: position = VESPERSBeamline::vespers()->sampleStageX()->value(); otherPosition = VESPERSBeamline::vespers()->sampleStageZ()->value(); break; case VESPERS::V: position = VESPERSBeamline::vespers()->pseudoSampleStage()->vert()->value(); otherPosition = VESPERSBeamline::vespers()->pseudoSampleStage()->horiz()->value(); break; case VESPERS::Z: position = VESPERSBeamline::vespers()->sampleStageZ()->value(); otherPosition = VESPERSBeamline::vespers()->sampleStageX()->value(); break; } config_->setEnd(position); end_->setValue(position); config_->setOtherPosition(otherPosition); otherPosition_->setValue(otherPosition); updateMapInfo(); axesAcceptable(); }
void VESPERS2DScanConfigurationView::onSetStartPosition() { double h = 0; double v = 0; double n = 0; VESPERS::Motors motor = configuration_->motor(); if (motor == (VESPERS::H | VESPERS::V)){ h = VESPERSBeamline::vespers()->pseudoSampleStageMotorGroupObject()->horizontalAxis()->translationMotor()->value(); v = VESPERSBeamline::vespers()->pseudoSampleStageMotorGroupObject()->verticalAxis()->translationMotor()->value(); n = VESPERSBeamline::vespers()->pseudoSampleStageMotorGroupObject()->normalAxis()->translationMotor()->value(); } else if (motor == (VESPERS::X | VESPERS::Z)){ h = VESPERSBeamline::vespers()->sampleStageX()->value(); v = VESPERSBeamline::vespers()->sampleStageZ()->value(); n = VESPERSBeamline::vespers()->sampleStageY()->value(); } else if (motor == (VESPERS::AttoH | VESPERS::AttoV)){ h = VESPERSBeamline::vespers()->attoStageHorizontal()->value(); v = VESPERSBeamline::vespers()->attoStageVertical()->value(); n = VESPERSBeamline::vespers()->pseudoSampleStageMotorGroupObject()->normalAxis()->translationMotor()->value(); // focusing isn't done with attocube motors. } else if (motor == (VESPERS::AttoX | VESPERS::AttoZ)){ h = VESPERSBeamline::vespers()->attoStageX()->value(); v = VESPERSBeamline::vespers()->attoStageZ()->value(); n = VESPERSBeamline::vespers()->sampleStageY()->value(); } else if (motor == (VESPERS::BigBeamX | VESPERS::BigBeamZ)){ h = VESPERSBeamline::vespers()->bigBeamMotorGroupObject()->horizontalAxis()->translationMotor()->value(); v = VESPERSBeamline::vespers()->bigBeamMotorGroupObject()->verticalAxis()->translationMotor()->value(); n = 888888.88; } configuration_->scanAxisAt(0)->regionAt(0)->setRegionStart(h); configuration_->scanAxisAt(1)->regionAt(0)->setRegionStart(v); configuration_->setNormalPosition(n); hStart_->setValue(h); vStart_->setValue(v); updateMapInfo(); axesAcceptable(); }
void VESPERS2DScanConfigurationView::onSetEndPosition() { double h = 0; double v = 0; VESPERS::Motors motor = configuration_->motor(); if (motor == (VESPERS::H | VESPERS::V)){ h = VESPERSBeamline::vespers()->pseudoSampleStageMotorGroupObject()->horizontalAxis()->translationMotor()->value(); v = VESPERSBeamline::vespers()->pseudoSampleStageMotorGroupObject()->verticalAxis()->translationMotor()->value(); } else if (motor == (VESPERS::X | VESPERS::Z)){ h = VESPERSBeamline::vespers()->sampleStageX()->value(); v = VESPERSBeamline::vespers()->sampleStageZ()->value(); } else if (motor == (VESPERS::AttoH | VESPERS::AttoV)){ h = VESPERSBeamline::vespers()->attoStageHorizontal()->value(); v = VESPERSBeamline::vespers()->attoStageVertical()->value(); } else if (motor == (VESPERS::AttoX | VESPERS::AttoZ)){ h = VESPERSBeamline::vespers()->attoStageX()->value(); v = VESPERSBeamline::vespers()->attoStageZ()->value(); } else if (motor == (VESPERS::BigBeamX | VESPERS::BigBeamZ)){ h = VESPERSBeamline::vespers()->bigBeamMotorGroupObject()->horizontalAxis()->translationMotor()->value(); v = VESPERSBeamline::vespers()->bigBeamMotorGroupObject()->verticalAxis()->translationMotor()->value(); } configuration_->scanAxisAt(0)->regionAt(0)->setRegionEnd(h); configuration_->scanAxisAt(1)->regionAt(0)->setRegionEnd(v); hEnd_->setValue(h); vEnd_->setValue(v); updateMapInfo(); axesAcceptable(); }
void VESPERS2DScanConfigurationView::onSetEndPosition() { double h = 0; double v = 0; if (config_->motor() == (VESPERS::H | VESPERS::V)){ h = VESPERSBeamline::vespers()->pseudoSampleStage()->horiz()->value(); v = VESPERSBeamline::vespers()->pseudoSampleStage()->vert()->value(); } else if (config_->motor() == (VESPERS::X | VESPERS::Z)){ h = VESPERSBeamline::vespers()->sampleStageX()->value(); v = VESPERSBeamline::vespers()->sampleStageZ()->value(); } config_->setXEnd(h); hEnd_->setValue(h); config_->setYEnd(v); vEnd_->setValue(v); updateMapInfo(); axesAcceptable(); }
void VESPERS2DScanConfigurationView::onYStepChanged() { config_->setYStep(vStep_->value()/1000); updateMapInfo(); axesAcceptable(); }
void VESPERS2DScanConfigurationView::onYEndChanged() { config_->setYEnd(vEnd_->value()); updateMapInfo(); axesAcceptable(); }
void VESPERS2DScanConfigurationView::onYStartChanged() { config_->setYStart(vStart_->value()); updateMapInfo(); axesAcceptable(); }
void VESPERS2DScanConfigurationView::onYStepChanged() { configuration_->scanAxisAt(1)->regionAt(0)->setRegionStep(vStep_->value()/1000); updateMapInfo(); axesAcceptable(); }
void VESPERS2DScanConfigurationView::onYEndChanged() { configuration_->scanAxisAt(1)->regionAt(0)->setRegionEnd(vEnd_->value()); updateMapInfo(); axesAcceptable(); }
void VESPERS2DScanConfigurationView::onXStartChanged() { configuration_->scanAxisAt(0)->regionAt(0)->setRegionStart(hStart_->value()); updateMapInfo(); axesAcceptable(); }
void VESPERSSpatialLineScanConfigurationView::onStepChanged() { config_->setStep(step_->value()/1000); updateMapInfo(); axesAcceptable(); }
void VESPERSSpatialLineScanConfigurationView::onEndChanged() { config_->setEnd(end_->value()); updateMapInfo(); axesAcceptable(); }
void VESPERSSpatialLineScanConfigurationView::onStartChanged() { config_->setStart(start_->value()); updateMapInfo(); axesAcceptable(); }