aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2021-03-11 14:20:59 +0100
committerThomas White <taw@physics.org>2021-03-11 16:10:54 +0100
commitc876486bbcb5dec16835259ff682ddb246ca5abf (patch)
tree73ed6922d7a5fc74f82bc94ba40994d5e80ce796
parent9f180701f20cf900e9b31d7e678b6acd1673ea81 (diff)
PinkIndexer: Remove wide bandwidth stuff
This will return later in a more centralised form, if we decide to work further on wide bandwidth.
-rw-r--r--doc/man/indexamajig.16
-rw-r--r--libcrystfel/src/indexers/pinkindexer.c46
2 files changed, 12 insertions, 40 deletions
diff --git a/doc/man/indexamajig.1 b/doc/man/indexamajig.1
index 66bb51ad..d20fb682 100644
--- a/doc/man/indexamajig.1
+++ b/doc/man/indexamajig.1
@@ -448,8 +448,6 @@ These set low-level parameters for the XGANDALF indexing algorithm.
.IP \fB--pinkIndexer-max-resolution-for-indexing=\fIn\fR
.IP \fB--pinkIndexer-thread-count=\fIn\fR
.IP \fB--pinkIndexer-max-refinement-disbalance=\fIn\fR
-.IP \fB--pinkIndexer-override-bandwidth=\fIn\fR
-.IP \fB--pinkIndexer-override-visible-energy-range=\fImin-max\fR
.PD
These set low-level parameters for the PinkIndexer indexing algorithm.
@@ -469,10 +467,6 @@ These set low-level parameters for the PinkIndexer indexing algorithm.
\fB--pinkIndexer-thread-count\fR sets the thread count for internal parallelization. Default is 1. Very useful for small datasets (e.g. for screening). Internal parallelization does not significantly increase the amount of RAM needed, whereas CrystFEL's parallelization does. For HPCs typically a mixture of both parallelizations leads to best results.
.IP
\fB--pinkIndexer-max-refinement-disbalance Indexing solutions are dismissed if the refinement refined very well to one side of the detector and very badly to the other side. Allowed values range from 0 (no disbalance) to 2 (extreme disbalance), default 0.4. Disbalance after refinement usually appears for bad geometries or bad prior unit cell parameters.
-.IP
-\fB--pinkIndexer-override-bandwidth=\fIn\fR Overrides the bandwidth in (delta energy)/(mean energy) to use for indexing (which usually is defined in the geometry file). Should be used together with \fB--pinkIndexer-override-photon-energy=\fIn\fR. Note: this option sets the borders for the spectrum, whereas the option in the geometry file sets the standard deviation for a Gaussian that fits the spectrum. Internally, the standard deviation is multiplied by 5 to compute the hard borders of the spectrum. I.e., photon_energy_bandwith = 0.005 in the geometry file equals --pinkIndexer-override-bandwidth=0.025. For monochromatic experiments usually --pinkIndexer-override-bandwidth=0.02 is sufficiently large. If in doubt, use --pinkIndexer-override-visible-energy-range.
-.IP
-\fB--pinkIndexer-override-visible-energy-range=\fImin-max\fR Overrides photon energy and bandwidth according to a range of energies that have high enough intensity to produce visible Bragg spots on the detector. min and max range borders are separated by a minus sign (no whitespace).
.SH INTEGRATION OPTIONS
.PD 0
diff --git a/libcrystfel/src/indexers/pinkindexer.c b/libcrystfel/src/indexers/pinkindexer.c
index 25bcdd4e..6c422ad1 100644
--- a/libcrystfel/src/indexers/pinkindexer.c
+++ b/libcrystfel/src/indexers/pinkindexer.c
@@ -267,12 +267,7 @@ void *pinkIndexer_prepare(IndexingMethod *indm,
.bx = bsz * 1e-10, .by = bsx * 1e-10, .bz = bsy * 1e-10,
.cx = csz * 1e-10, .cy = csx * 1e-10, .cz = csy * 1e-10 };
-
- /* FIXME: Beam gone */
- float nonMonochromaticity = beam->bandwidth*5;
- if(pinkIndexer_opts->customBandwidth >= 0){
- nonMonochromaticity = pinkIndexer_opts->customBandwidth;
- }
+ float nonMonochromaticity = 0.01;
float reflectionRadius_1_per_A;
if (pinkIndexer_opts->reflectionRadius < 0) {
@@ -466,15 +461,8 @@ static void pinkIndexer_show_help()
" Thread count for internal parallelization \n"
" Default: 1\n"
" --pinkIndexer-max-refinement-disbalance=n\n"
-" Maximum disbalance after refinement:\n"
-" 0 (no disbalance) to 2 (extreme disbalance), default 0.4\n"
-" --pinkIndexer-override-bandwidth=n\n"
-" Bandwidth in (delta energy)/(mean energy) to use for indexing.\n"
-" --pinkIndexer-override-visible-energy-range=min-max\n"
-" Overrides photon energy and bandwidth according to a range of \n"
-" energies that have high enough intensity to produce \"visible\" \n"
-" Bragg spots on the detector.\n"
-" Min and max range borders are separated by a minus sign (no whitespace).\n"
+" Maximum imbalance after refinement:\n"
+" 0 (no imbalance) to 2 (extreme imbalance), default 0.4\n"
);
}
@@ -493,7 +481,6 @@ int pinkIndexer_default_options(PinkIndexerOptions **opts_ptr)
opts->maxResolutionForIndexing_1_per_A = +INFINITY;
opts->thread_count = 1;
opts->reflectionRadius = -1;
- opts->customBandwidth = -1;
opts->maxRefinementDisbalance = 0.4;
*opts_ptr = opts;
@@ -504,7 +491,7 @@ int pinkIndexer_default_options(PinkIndexerOptions **opts_ptr)
static error_t pinkindexer_parse_arg(int key, char *arg,
struct argp_state *state)
{
- float tmp, tmp2;
+ float tmp;
int r;
struct pinkIndexer_options **opts_ptr = state->input;
@@ -593,24 +580,15 @@ static error_t pinkindexer_parse_arg(int key, char *arg,
return EINVAL;
case 12 :
- if (sscanf(arg, "%f", &(*opts_ptr)->customBandwidth) != 1)
- {
- ERROR("Invalid value for --pinkIndexer-override-bandwidth\n");
- return EINVAL;
- }
- break;
+ ERROR("This CrystFEL version does not handle wide bandwidth ");
+ ERROR("(invalid option --pinkIndexer-override-bandwidth)\n");
+ return EINVAL;
+
case 13 :
- if (sscanf(arg, "%f-%f", &tmp, &tmp2) != 2)
- {
- ERROR("Invalid value for --pinkIndexer-override-visible-energy-range\n");
- return EINVAL;
- }
- (*opts_ptr)->customPhotonEnergy = (tmp + tmp2)/2;
- (*opts_ptr)->customBandwidth = (tmp2 - tmp)/(*opts_ptr)->customPhotonEnergy;
- if((*opts_ptr)->customBandwidth < 0){
- (*opts_ptr)->customBandwidth *= -1;
- }
- break;
+ ERROR("This CrystFEL version does not handle wide bandwidth ");
+ ERROR("(invalid option --pinkIndexer-override-visible-energy-range)\n");
+ return EINVAL;
+
case 14 :
if (sscanf(arg, "%f", &(*opts_ptr)->maxRefinementDisbalance) != 1)
{