aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2021-10-26 15:52:10 +0200
committerThomas White <taw@physics.org>2021-10-26 15:57:41 +0200
commit7a43f3b5a9c59a972949ca58a340d2bfe1222429 (patch)
treec27a6c9d6f903e13ffb442a732c146e733ea2a11 /libcrystfel/src
parent1b0649e5af029970def587d1c6c494d0cae48427 (diff)
Remove detector rail direction altogether
This got missed out by accident in the conversion to DataTemplate, but absolutely no-one noticed. In the meantime, my views on how the geometry files should work have changed somewhat. I don't want to maintain the extra complexity here when it isn't even clear that it will eliminate the need to re-refine geometry for each camera length. This commit just takes the rail direction stuff out of the documentation and the geometry file parser. Closes: https://gitlab.desy.de/thomas.white/crystfel/-/issues/50
Diffstat (limited to 'libcrystfel/src')
-rw-r--r--libcrystfel/src/datatemplate.c30
-rw-r--r--libcrystfel/src/datatemplate_priv.h10
2 files changed, 0 insertions, 40 deletions
diff --git a/libcrystfel/src/datatemplate.c b/libcrystfel/src/datatemplate.c
index 37bb623c..5ed6aef8 100644
--- a/libcrystfel/src/datatemplate.c
+++ b/libcrystfel/src/datatemplate.c
@@ -565,16 +565,6 @@ static int parse_field_for_panel(struct panel_template *panel, const char *key,
panel->cnx = atof(val);
} else if ( strcmp(key, "corner_y") == 0 ) {
panel->cny = atof(val);
- } else if ( strcmp(key, "rail_direction") == 0 ) {
- if ( dir_conv(val, &panel->rail_x,
- &panel->rail_y,
- &panel->rail_z) )
- {
- ERROR("Invalid rail direction '%s'\n", val);
- reject = 1;
- }
- } else if ( strcmp(key, "clen_for_centering") == 0 ) {
- panel->clen_for_centering = atof(val);
} else if ( strcmp(key, "adu_per_eV") == 0 ) {
panel->adu_scale = atof(val);
panel->adu_scale_unit = ADU_PER_EV;
@@ -1085,10 +1075,6 @@ DataTemplate *data_template_new_from_string(const char *string_in)
defaults.ssx = NAN;
defaults.ssy = NAN;
defaults.ssz = NAN;
- defaults.rail_x = NAN; /* The actual default rail direction */
- defaults.rail_y = NAN; /* is below */
- defaults.rail_z = NAN;
- defaults.clen_for_centering = NAN;
defaults.adu_scale = NAN;
defaults.adu_scale_unit = ADU_PER_PHOTON;
for ( i=0; i<MAX_FLAG_VALUES; i++ ) defaults.flag_values[i] = 0;
@@ -1336,14 +1322,6 @@ DataTemplate *data_template_new_from_string(const char *string_in)
reject = 1;
}
- if ( isnan(p->clen_for_centering) && !isnan(p->rail_x) )
- {
- ERROR("You must specify clen_for_centering if you "
- "specify the rail direction (panel %s)\n",
- p->name);
- reject = 1;
- }
-
for ( j=0; j<MAX_MASKS; j++ ) {
if ( (p->masks[j].filename != NULL)
&& (p->masks[j].data_location == NULL) )
@@ -1355,14 +1333,6 @@ DataTemplate *data_template_new_from_string(const char *string_in)
}
}
- /* The default rail direction */
- if ( isnan(p->rail_x) ) {
- p->rail_x = 0.0;
- p->rail_y = 0.0;
- p->rail_z = 1.0;
- }
- if ( isnan(p->clen_for_centering) ) p->clen_for_centering = 0.0;
-
}
for ( i=0; i<dt->n_bad; i++ ) {
diff --git a/libcrystfel/src/datatemplate_priv.h b/libcrystfel/src/datatemplate_priv.h
index 94b3f8a9..053e9d13 100644
--- a/libcrystfel/src/datatemplate_priv.h
+++ b/libcrystfel/src/datatemplate_priv.h
@@ -165,16 +165,6 @@ struct panel_template
double ssz;
/*@}*/
- /** \name Rail direction */
- /*@{*/
- double rail_x;
- double rail_y;
- double rail_z;
- /*@}*/
-
- /* Value of clen (without coffset) at which beam is centered */
- double clen_for_centering;
-
/** \name Position of the panel in the data block in the file. */
/*@{*/
int orig_min_fs;