diff options
author | Valerio Mariani <valerio.mariani@desy.de> | 2017-07-05 16:39:55 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2017-07-06 09:42:29 +0200 |
commit | 00e94235c11cf5432e2c7148b52fde4f7ce3fd99 (patch) | |
tree | 47c93a66c887ab4df153663e0041857956f2a0ee /src/geoptimiser.c | |
parent | 608cebf106489636a487d9a96092d073a70fc660 (diff) |
Temporary fix for the geomptimiser not being able to optimize whole quadrants
Diffstat (limited to 'src/geoptimiser.c')
-rw-r--r-- | src/geoptimiser.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/geoptimiser.c b/src/geoptimiser.c index 2c9074d6..da9b16c4 100644 --- a/src/geoptimiser.c +++ b/src/geoptimiser.c @@ -1085,12 +1085,7 @@ static void correct_rotation_and_stretch(struct rg_collection *connected, /* Calculate corner adjustment * NB All panels follow the first one */ - if ( ip == 0 ) { - - new_cnx = p->cnx * cs; - new_cny = p->cny * cs; - - } else { + if ( ip > 0 && connected->rigid_groups[di]->n_panels == 2 && !gparams->no_cspad ) { struct panel *p0; double delta_x, delta_y, delta; @@ -1105,6 +1100,10 @@ static void correct_rotation_and_stretch(struct rg_collection *connected, new_cnx = p0->cnx + delta*p0->fsx; new_cny = p0->cny + delta*p0->fsy; + } else { + + new_cnx = p->cnx * cs; + new_cny = p->cny * cs; } /* The average displacements now need to be updated */ |