Skip to content
Snippets Groups Projects
Commit 46866b30 authored by Van Herck, Walter's avatar Van Herck, Walter
Browse files

Merge branch 'roughnessbug' into develop

Conflicts:
	GUI/coregui/Models/JobModel.cpp
parents 32eed917 37697a95
No related branches found
No related tags found
No related merge requests found
......@@ -82,6 +82,10 @@ void MultiLayerDWBASimulation::run()
}
}
// The normalization of the calculated scattering intensities is:
// For nanoparticles: rho * (scattering cross-section/scattering particle)
// For roughness: (scattering cross-section of area S)/S
// This allows them to be added and normalized together to the beam afterwards
void MultiLayerDWBASimulation::runProtected()
{
msglog(MSG::DEBUG2) << "MultiLayerDWBASimulation::runProtected()";
......
......@@ -91,9 +91,9 @@ double MultiLayerRoughnessDWBASimulation::evaluate(const SimulationElement& sim_
for(size_t j=0; j<mp_multi_layer->getNumberOfLayers()-1; j++){
for(size_t k=0; k<mp_multi_layer->getNumberOfLayers()-1; k++) {
if(j==k) continue;
crosscorr += rterm[j]*sterm[j]*rterm[k]*
crosscorr += rterm[j]*sterm[j]*
mp_multi_layer->getCrossCorrSpectralFun(q,j,k)*
std::conj(sterm[k]);
std::conj(rterm[k])*std::conj(sterm[k]);
}
}
}
......@@ -114,18 +114,19 @@ complex_t MultiLayerRoughnessDWBASimulation::get_sum4terms(size_t ilayer,
double wavelength = sim_element.getWavelength();
double alpha_i = sim_element.getAlphaI();
double alpha_f = sim_element.getAlphaMean();
kvector_t k_i = sim_element.getKI();
kvector_t k_f = sim_element.getMeanKF();
complex_t qz1 = k_i.z() + k_f.z();
complex_t qz2 = k_i.z() - k_f.z();
complex_t qz3 = -k_i.z() + k_f.z();
complex_t qz4 = -k_i.z() - k_f.z();
const std::unique_ptr<const ILayerRTCoefficients> P_in_coeff(
mp_specular_info_vector[ilayer + 1]->getInCoefficients(alpha_i, 0.0, wavelength));
const std::unique_ptr<const ILayerRTCoefficients> P_out_coeff(
mp_specular_info_vector[ilayer + 1]->getOutCoefficients(alpha_f, 0.0, wavelength));
complex_t kiz = P_in_coeff->getScalarKz();
complex_t kfz = P_out_coeff->getScalarKz();
complex_t qz1 = kiz + kfz;
complex_t qz2 = kiz - kfz;
complex_t qz3 = -qz2;
complex_t qz4 = -qz1;
double sigma(0.0);
if (const LayerRoughness *roughness
= mp_multi_layer->getLayerBottomInterface(ilayer)->getRoughness()) {
......
......@@ -38,7 +38,7 @@ MesoCrystalBuilder::MesoCrystalBuilder()
, m_sigma_meso_radius(1.3863e+00*Units::nanometer)
, m_sigma_lattice_length_a(1.1601e+00*Units::nanometer)
, m_surface_filling_ratio(1.7286e-01)
, m_roughness(2.8746e+01*Units::nanometer)
, m_roughness(12e+00*Units::nanometer)
, m_nphi_rotations(2)
{
init_parameters();
......@@ -109,7 +109,7 @@ ISample* MesoCrystalBuilder::buildSample() const
n_particle_adapted, &ff_meso) );
P_meso->setPosition(0.0, 0.0, -m_meso_height);
// particle_layout.addParticle(*P_meso, z_rotation);
particle_layout.addParticle(*P_meso, 1.0, kvector_t(0,0,0), z_rotation);
particle_layout.addParticle(*P_meso, 1.0, kvector_t(0.0, 0.0, 0.0), z_rotation);
}
}
......
......@@ -175,7 +175,7 @@ void FitTools::onError(const QString &text)
box.exec();
}
void FitTools::onUpdatePlots(OutputData<double> *sim, OutputData<double> *chi2)
void FitTools::onUpdatePlots(OutputData<double> *sim, OutputData<double> *)
{
Q_UNUSED(chi2);
// hack to preserve axis information
......
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment