Commit d7de985a authored by Yaroslav Gevorkov's avatar Yaroslav Gevorkov
Browse files

rename "overriden" to "custom"

parent 21b12a07
...@@ -157,7 +157,7 @@ void *pinkIndexer_prepare(IndexingMethod *indm, UnitCell *cell, ...@@ -157,7 +157,7 @@ void *pinkIndexer_prepare(IndexingMethod *indm, UnitCell *cell,
struct pinkIndexer_options *pinkIndexer_opts, struct pinkIndexer_options *pinkIndexer_opts,
struct detector *det, struct beam_params *beam) 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 " ERROR("For pinkIndexer, the photon_energy must be defined as a "
"constant in the geometry file or a parameter\n"); "constant in the geometry file or a parameter\n");
return NULL; return NULL;
...@@ -206,11 +206,11 @@ void *pinkIndexer_prepare(IndexingMethod *indm, UnitCell *cell, ...@@ -206,11 +206,11 @@ void *pinkIndexer_prepare(IndexingMethod *indm, UnitCell *cell,
float beamEenergy_eV = beam->photon_energy; float beamEenergy_eV = beam->photon_energy;
float nonMonochromaticity = beam->bandwidth*5; float nonMonochromaticity = beam->bandwidth*5;
if(pinkIndexer_opts->overridenPhotonEnergy > 0){ if(pinkIndexer_opts->customPhotonEnergy > 0){
beamEenergy_eV = pinkIndexer_opts->overridenPhotonEnergy; beamEenergy_eV = pinkIndexer_opts->customPhotonEnergy;
} }
if(pinkIndexer_opts->overridenBandwidth >= 0){ if(pinkIndexer_opts->customBandwidth >= 0){
nonMonochromaticity = pinkIndexer_opts->overridenBandwidth; nonMonochromaticity = pinkIndexer_opts->customBandwidth;
} }
float reflectionRadius_1_per_A; float reflectionRadius_1_per_A;
...@@ -441,8 +441,8 @@ static error_t parse_arg(int key, char *arg, struct argp_state *state) ...@@ -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)->no_check_indexed = 0;
(*opts_ptr)->min_peaks = 2; (*opts_ptr)->min_peaks = 2;
(*opts_ptr)->reflectionRadius = -1; (*opts_ptr)->reflectionRadius = -1;
(*opts_ptr)->overridenPhotonEnergy = -1; (*opts_ptr)->customPhotonEnergy = -1;
(*opts_ptr)->overridenBandwidth = -1; (*opts_ptr)->customBandwidth = -1;
break; break;
case 1 : case 1 :
...@@ -518,7 +518,7 @@ static error_t parse_arg(int key, char *arg, struct argp_state *state) ...@@ -518,7 +518,7 @@ static error_t parse_arg(int key, char *arg, struct argp_state *state)
break; break;
case 11 : 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"); ERROR("Invalid value for --pinkIndexer-override-photon-energy\n");
return EINVAL; return EINVAL;
...@@ -526,7 +526,7 @@ static error_t parse_arg(int key, char *arg, struct argp_state *state) ...@@ -526,7 +526,7 @@ static error_t parse_arg(int key, char *arg, struct argp_state *state)
break; break;
case 12 : 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"); ERROR("Invalid value for --pinkIndexer-override-bandwidth\n");
return EINVAL; return EINVAL;
...@@ -538,10 +538,10 @@ static error_t parse_arg(int key, char *arg, struct argp_state *state) ...@@ -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"); ERROR("Invalid value for --pinkIndexer-override-visible-energy-range\n");
return EINVAL; return EINVAL;
} }
(*opts_ptr)->overridenPhotonEnergy = (tmp + tmp2)/2; (*opts_ptr)->customPhotonEnergy = (tmp + tmp2)/2;
(*opts_ptr)->overridenBandwidth = (tmp2 - tmp)/(*opts_ptr)->overridenPhotonEnergy; (*opts_ptr)->customBandwidth = (tmp2 - tmp)/(*opts_ptr)->customPhotonEnergy;
if((*opts_ptr)->overridenBandwidth < 0){ if((*opts_ptr)->customBandwidth < 0){
(*opts_ptr)->overridenBandwidth *= -1; (*opts_ptr)->customBandwidth *= -1;
} }
break; break;
} }
......
...@@ -47,8 +47,8 @@ struct pinkIndexer_options { ...@@ -47,8 +47,8 @@ struct pinkIndexer_options {
int min_peaks; int min_peaks;
int no_check_indexed; int no_check_indexed;
float reflectionRadius; /* In m^-1 */ float reflectionRadius; /* In m^-1 */
float overridenPhotonEnergy; float customPhotonEnergy;
float overridenBandwidth; float customBandwidth;
}; };
#include <stddef.h> #include <stddef.h>
......
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