Commit 39f9e154 authored by Wolfgang Brehm's avatar Wolfgang Brehm Committed by Thomas White
Browse files

Add partiality model GGPM

parent f9101682
...@@ -412,6 +412,7 @@ static Reflection *check_reflection(struct image *image, Crystal *cryst, ...@@ -412,6 +412,7 @@ static Reflection *check_reflection(struct image *image, Crystal *cryst,
set_lorentz(refl, 1.0); set_lorentz(refl, 1.0);
set_symmetric_indices(refl, h, k, l); set_symmetric_indices(refl, h, k, l);
set_redundancy(refl, 1); set_redundancy(refl, 1);
set_partiality(refl, partiality);
return refl; return refl;
} }
...@@ -903,6 +904,11 @@ void calculate_partialities(Crystal *cryst, PartialityModel pmodel) ...@@ -903,6 +904,11 @@ void calculate_partialities(Crystal *cryst, PartialityModel pmodel)
set_random_partialities(cryst); set_random_partialities(cryst);
break; break;
case PMODEL_GGPM :
/* Do nothing, because this is the model used for prediction,
* so the partialities have been set by check_reflection */
break;
default : default :
ERROR("Unknown partiality model %i\n", pmodel); ERROR("Unknown partiality model %i\n", pmodel);
break; break;
......
...@@ -61,6 +61,7 @@ typedef enum { ...@@ -61,6 +61,7 @@ typedef enum {
PMODEL_XSPHERE, /**< Flat sphere model with super-Gaussian spectrum */ PMODEL_XSPHERE, /**< Flat sphere model with super-Gaussian spectrum */
PMODEL_OFFSET, /**< Ewald offset model for monochromatic beam */ PMODEL_OFFSET, /**< Ewald offset model for monochromatic beam */
PMODEL_RANDOM, /**< Randomly assigned partialities */ PMODEL_RANDOM, /**< Randomly assigned partialities */
PMODEL_GGPM /**< Generalised gaussian prediction model */
} PartialityModel; } PartialityModel;
......
...@@ -1281,6 +1281,8 @@ int main(int argc, char *argv[]) ...@@ -1281,6 +1281,8 @@ int main(int argc, char *argv[])
pmodel = PMODEL_OFFSET; pmodel = PMODEL_OFFSET;
} else if ( strcmp(pmodel_str, "random") == 0 ) { } else if ( strcmp(pmodel_str, "random") == 0 ) {
pmodel = PMODEL_RANDOM; pmodel = PMODEL_RANDOM;
} else if ( strcmp(pmodel_str, "ggpm") == 0 ) {
pmodel = PMODEL_GGPM;
} else { } else {
ERROR("Unknown partiality model '%s'.\n", pmodel_str); ERROR("Unknown partiality model '%s'.\n", pmodel_str);
return 1; return 1;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment