22 std::vector<double> result;
25 double step = n_points > 1 ? (z_max - z_min) / (n_points - 1) : 0.0;
26 for (
int i = 0; i < n_points; ++i)
27 result.push_back(z_min + i * step);
32 double z_min,
double z_max)
Global functions related to MultiLayers.
Defines class ProfileHelper.
Defines class SimulationOptions.
Our sample model: a stack of layers one below the other.
Object that can generate the material profile of a sample as a function of depth.
std::pair< double, double > defaultLimits() const
std::vector< complex_t > calculateProfile(const std::vector< double > &z_values) const
Collect the different options for simulation.SimulationOptions.
void setUseAvgMaterials(bool use_avg_materials)
Data structure that contains all the necessary data for scattering calculations.
static reSample make(const MultiLayer &sample, const SimulationOptions &options, bool forcePolarized=false)
Factory method that wraps the private constructor.
const SliceStack & averageSlices() const
std::pair< double, double > defaultMaterialProfileLimits(const MultiLayer &sample)
Get default z limits for generating a material profile.
std::vector< complex_t > materialProfileSLD(const MultiLayer &sample, int n_points, double z_min, double z_max)
Calculate average material profile for given sample.
std::vector< double > generateZValues(int n_points, double z_min, double z_max)