Exemplo n.º 1
0
double Reflection::meanSigma(bool friedel)
{
    int num = (int)millerCount();
    int count = 0;
    
    double total_sigi = 0;
    
    for (int i = 0; i < num; i++)
    {
        MillerPtr aMiller = miller(i);
        
        if (aMiller->accepted())
        {
            total_sigi += aMiller->getSigma();
            count++;
        }
    }
    
    total_sigi /= count;
    
    if (total_sigi == 0)
        return nan(" ");
    
    return total_sigi;
}
Exemplo n.º 2
0
void Reflection::reflectionDescription()
{
    int acceptedCount = 0;
    
    std::ostringstream logged;
    
    for (int i = 0; i < millerCount(); i++)
    {
        MillerPtr miller = this->miller(i);
        logged << miller->getH() << "\t" << miller->getK() << "\t" << miller->getL() << "\t"
        << miller->getRawIntensity() << "\t"
        << "\t" << miller->getSigma() << "\t" << miller->getFilename()
        << std::endl;
        if (miller->accepted())
            acceptedCount++;
    }
    logged << std::endl;
    
    std::cout << logged.str();
}
Exemplo n.º 3
0
double Reflection::meanPartiality(bool withCutoff)
{
    int num = millerCount();
    double total_partiality = 0;
    int count = 0;
    
    for (int i = 0; i < num; i++)
    {
        MillerPtr miller = millers[i];
        
        if ((miller->accepted() && withCutoff) || !withCutoff)
        {
            total_partiality += miller->getPartiality();
            count++;
        }
    }
    
    total_partiality /= count;
    
    return total_partiality;
}
Exemplo n.º 4
0
double Reflection::meanSigma()
{
    int num = (int)millers.size();
    int count = 0;
    
    double total_sigi = 0;
    
    for (int i = 0; i < num; i++)
    {
        MillerPtr miller = millers[i];
        
        if (miller->accepted())
        {
            total_sigi += miller->getSigma();
            count++;
        }
    }
    
    total_sigi /= count;
    
    return total_sigi;
}
Exemplo n.º 5
0
double Reflection::meanWeight()
{
    int num = (int)millers.size();
    int count = 0;
    
    double total_weight = 0;
    
    for (int i = 0; i < num; i++)
    {
        MillerPtr miller = millers[i];
        
        if (miller->accepted())
        {
            total_weight += 1 / pow(miller->getSigma(), 2);
            count++;
        }
    }
    
    total_weight /= count;
    
    return total_weight;
}
Exemplo n.º 6
0
double Reflection::meanWeight(bool withCutoff)
{
    int num = (int)millerCount();
    int count = 0;
    
    double total_weight = 0;
    
    for (int i = 0; i < num; i++)
    {
        MillerPtr miller = millers[i];
        
        if ((miller->accepted() && withCutoff) || !withCutoff)
        {
            total_weight += miller->getWeight(withCutoff);
            count++;
        }
    }
    
    total_weight /= count;
    
    return total_weight;
}