From d7de985ab7d626f150da3f6fc0d66a16bcbc8c10 Mon Sep 17 00:00:00 2001 From: Yaroslav Gevorkov Date: Wed, 13 Nov 2019 14:03:49 +0100 Subject: rename "overriden" to "custom" --- libcrystfel/src/pinkindexer.c | 26 +++++++++++++------------- libcrystfel/src/pinkindexer.h | 4 ++-- 2 files changed, 15 insertions(+), 15 deletions(-) (limited to 'libcrystfel') diff --git a/libcrystfel/src/pinkindexer.c b/libcrystfel/src/pinkindexer.c index 1ab977ba..645e22ed 100644 --- a/libcrystfel/src/pinkindexer.c +++ b/libcrystfel/src/pinkindexer.c @@ -157,7 +157,7 @@ void *pinkIndexer_prepare(IndexingMethod *indm, UnitCell *cell, struct pinkIndexer_options *pinkIndexer_opts, struct detector *det, struct beam_params *beam) { - if ( beam->photon_energy_from != NULL && pinkIndexer_opts->overridenPhotonEnergy > 0) { + if ( beam->photon_energy_from != NULL && pinkIndexer_opts->customPhotonEnergy > 0) { ERROR("For pinkIndexer, the photon_energy must be defined as a " "constant in the geometry file or a parameter\n"); return NULL; @@ -206,11 +206,11 @@ void *pinkIndexer_prepare(IndexingMethod *indm, UnitCell *cell, float beamEenergy_eV = beam->photon_energy; float nonMonochromaticity = beam->bandwidth*5; - if(pinkIndexer_opts->overridenPhotonEnergy > 0){ - beamEenergy_eV = pinkIndexer_opts->overridenPhotonEnergy; + if(pinkIndexer_opts->customPhotonEnergy > 0){ + beamEenergy_eV = pinkIndexer_opts->customPhotonEnergy; } - if(pinkIndexer_opts->overridenBandwidth >= 0){ - nonMonochromaticity = pinkIndexer_opts->overridenBandwidth; + if(pinkIndexer_opts->customBandwidth >= 0){ + nonMonochromaticity = pinkIndexer_opts->customBandwidth; } float reflectionRadius_1_per_A; @@ -441,8 +441,8 @@ static error_t parse_arg(int key, char *arg, struct argp_state *state) (*opts_ptr)->no_check_indexed = 0; (*opts_ptr)->min_peaks = 2; (*opts_ptr)->reflectionRadius = -1; - (*opts_ptr)->overridenPhotonEnergy = -1; - (*opts_ptr)->overridenBandwidth = -1; + (*opts_ptr)->customPhotonEnergy = -1; + (*opts_ptr)->customBandwidth = -1; break; case 1 : @@ -518,7 +518,7 @@ static error_t parse_arg(int key, char *arg, struct argp_state *state) break; case 11 : - if (sscanf(arg, "%f", &(*opts_ptr)->overridenPhotonEnergy) != 1) + if (sscanf(arg, "%f", &(*opts_ptr)->customPhotonEnergy) != 1) { ERROR("Invalid value for --pinkIndexer-override-photon-energy\n"); return EINVAL; @@ -526,7 +526,7 @@ static error_t parse_arg(int key, char *arg, struct argp_state *state) break; case 12 : - if (sscanf(arg, "%f", &(*opts_ptr)->overridenBandwidth) != 1) + if (sscanf(arg, "%f", &(*opts_ptr)->customBandwidth) != 1) { ERROR("Invalid value for --pinkIndexer-override-bandwidth\n"); return EINVAL; @@ -538,10 +538,10 @@ static error_t parse_arg(int key, char *arg, struct argp_state *state) ERROR("Invalid value for --pinkIndexer-override-visible-energy-range\n"); return EINVAL; } - (*opts_ptr)->overridenPhotonEnergy = (tmp + tmp2)/2; - (*opts_ptr)->overridenBandwidth = (tmp2 - tmp)/(*opts_ptr)->overridenPhotonEnergy; - if((*opts_ptr)->overridenBandwidth < 0){ - (*opts_ptr)->overridenBandwidth *= -1; + (*opts_ptr)->customPhotonEnergy = (tmp + tmp2)/2; + (*opts_ptr)->customBandwidth = (tmp2 - tmp)/(*opts_ptr)->customPhotonEnergy; + if((*opts_ptr)->customBandwidth < 0){ + (*opts_ptr)->customBandwidth *= -1; } break; } diff --git a/libcrystfel/src/pinkindexer.h b/libcrystfel/src/pinkindexer.h index 8c2d4cb6..fed04917 100644 --- a/libcrystfel/src/pinkindexer.h +++ b/libcrystfel/src/pinkindexer.h @@ -47,8 +47,8 @@ struct pinkIndexer_options { int min_peaks; int no_check_indexed; float reflectionRadius; /* In m^-1 */ - float overridenPhotonEnergy; - float overridenBandwidth; + float customPhotonEnergy; + float customBandwidth; }; #include -- cgit v1.2.3