From 7a43f3b5a9c59a972949ca58a340d2bfe1222429 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 26 Oct 2021 15:52:10 +0200 Subject: 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 --- libcrystfel/src/datatemplate.c | 30 ------------------------------ libcrystfel/src/datatemplate_priv.h | 10 ---------- 2 files changed, 40 deletions(-) (limited to 'libcrystfel') 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; iclen_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; jmasks[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; in_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; -- cgit v1.2.3