From 57826f34b345ff87c0121d5edec5ef62ae7aed37 Mon Sep 17 00:00:00 2001 From: Yaroslav Gevorkov Date: Fri, 7 Feb 2020 19:47:07 +0100 Subject: fix pinkIndexer documentation --- doc/man/indexamajig.1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/man/indexamajig.1 b/doc/man/indexamajig.1 index 41e34aa7..99463711 100644 --- a/doc/man/indexamajig.1 +++ b/doc/man/indexamajig.1 @@ -448,8 +448,8 @@ These set low-level parameters for the XGANDALF indexing algorithm. .IP \fB--pinkIndexer-multi=\fIn\fR .IP \fB--pinkIndexer-thread-count=\fIn\fR .IP \fB--pinkIndexer-no-check-indexed=\fIn\fR -.IP \fB--pinkIndexer-override-photon-energy=\fIn\fR .IP \fB--pinkIndexer-override-bandwidth=\fIn\fR +.IP \fB--pinkIndexer-override-photon-energy=\fIn\fR .IP \fB--pinkIndexer-override-visible-energy-range=\fImin-max\fR .PD @@ -473,9 +473,9 @@ These set low-level parameters for the PinkIndexer indexing algorithm. .IP \fB--pinkIndexer-no-check-indexed\fR Leave the check whether a pattern is indexed completely to CrystFEL. Useful for monochromatic (since CrystFEL's prediction model is smarter than the one of pinkIndexer) or in combnation with --no-check-peaks for geometry optimization. This flag is meant to eventually disappear, when the full pink pipeline is implemented. .IP -\fB--pinkIndexer-override-photon-energy=\fIn\fR Overrides the bandwidth in (delta energy)/(mean energy) to use for indexing (which usually is difined in the geometry file). Should be used together with \fB--pinkIndexer-override-bandwidth=\fIn\fR +\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 .IP -\fB--pinkIndexer-override-bandwidth=\fIn\fR Overrides the mean energy in eV to use for indexing (which usually is difined in the geometry file). Should be used together with \fB--pinkIndexer-override-bandwidth=\fIn\fR +\fB--pinkIndexer-override-photon-energy=\fIn\fR Overrides the mean energy in eV to use for indexing (which usually is defined in the geometry file). Should be used together with \fB--pinkIndexer-override-bandwidth=\fIn\fR .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). -- cgit v1.2.3 From a0c43b49789c78bcbbfc3a6d3da63eeeafadc148 Mon Sep 17 00:00:00 2001 From: Yaroslav Gevorkov Date: Fri, 7 Feb 2020 21:25:05 +0100 Subject: fix error message for photon_energy not known at indexer_prepare --- libcrystfel/src/pinkindexer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libcrystfel/src/pinkindexer.c b/libcrystfel/src/pinkindexer.c index 8941080a..9b731839 100644 --- a/libcrystfel/src/pinkindexer.c +++ b/libcrystfel/src/pinkindexer.c @@ -157,9 +157,9 @@ 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->customPhotonEnergy > 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"); + "constant in the geometry file or as a parameter (see --pinkIndexer-override-photon-energy)\n"); return NULL; } if ( (det->panels[0].clen_from != NULL) && pinkIndexer_opts->refinement_type == -- cgit v1.2.3 From 190204f3806cd343097afad62a29523bd109cc7f Mon Sep 17 00:00:00 2001 From: Yaroslav Gevorkov Date: Fri, 7 Feb 2020 21:26:05 +0100 Subject: add error message for too small reflection radius when using electrons --- libcrystfel/src/pinkindexer.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libcrystfel/src/pinkindexer.c b/libcrystfel/src/pinkindexer.c index 9b731839..e3ecf5a9 100644 --- a/libcrystfel/src/pinkindexer.c +++ b/libcrystfel/src/pinkindexer.c @@ -222,6 +222,10 @@ void *pinkIndexer_prepare(IndexingMethod *indm, UnitCell *cell, reflectionRadius_1_per_A = pinkIndexer_opts->reflectionRadius * 1e10; /* m^-1 to A^-1*/ } + if(beamEenergy_eV > 75000 && nonMonochromaticity < 0.02 && reflectionRadius_1_per_A < 0.0005){ + STATUS("Trying to index electron diffraction? It might be helpful to set a higher reflection radius (see documentation for --pinkIndexer-reflection-radius)") + } + float divergenceAngle_deg = 0.01; //fake float tolerance = pinkIndexer_opts->tolerance; -- cgit v1.2.3 From 8823d9877ad3f1badacd232d900f269368a582b5 Mon Sep 17 00:00:00 2001 From: Yaroslav Gevorkov Date: Fri, 7 Feb 2020 21:26:58 +0100 Subject: refine documentation for --pinkIndexer-override-bandwidth --- doc/man/indexamajig.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/man/indexamajig.1 b/doc/man/indexamajig.1 index 99463711..64929727 100644 --- a/doc/man/indexamajig.1 +++ b/doc/man/indexamajig.1 @@ -473,7 +473,7 @@ These set low-level parameters for the PinkIndexer indexing algorithm. .IP \fB--pinkIndexer-no-check-indexed\fR Leave the check whether a pattern is indexed completely to CrystFEL. Useful for monochromatic (since CrystFEL's prediction model is smarter than the one of pinkIndexer) or in combnation with --no-check-peaks for geometry optimization. This flag is meant to eventually disappear, when the full pink pipeline is implemented. .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 +\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.01 is sufficiently large. If in doubt, use --pinkIndexer-override-visible-energy-range. .IP \fB--pinkIndexer-override-photon-energy=\fIn\fR Overrides the mean energy in eV to use for indexing (which usually is defined in the geometry file). Should be used together with \fB--pinkIndexer-override-bandwidth=\fIn\fR .IP -- cgit v1.2.3 From 1778d4c86f7afc90ed78ebd58de9a83b6233e33d Mon Sep 17 00:00:00 2001 From: Yaroslav Gevorkov Date: Sat, 8 Feb 2020 01:16:02 +0100 Subject: pinIndexer documentation tuning --- doc/man/indexamajig.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/man/indexamajig.1 b/doc/man/indexamajig.1 index 64929727..7bc71471 100644 --- a/doc/man/indexamajig.1 +++ b/doc/man/indexamajig.1 @@ -473,7 +473,7 @@ These set low-level parameters for the PinkIndexer indexing algorithm. .IP \fB--pinkIndexer-no-check-indexed\fR Leave the check whether a pattern is indexed completely to CrystFEL. Useful for monochromatic (since CrystFEL's prediction model is smarter than the one of pinkIndexer) or in combnation with --no-check-peaks for geometry optimization. This flag is meant to eventually disappear, when the full pink pipeline is implemented. .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.01 is sufficiently large. If in doubt, use --pinkIndexer-override-visible-energy-range. +\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-photon-energy=\fIn\fR Overrides the mean energy in eV to use for indexing (which usually is defined in the geometry file). Should be used together with \fB--pinkIndexer-override-bandwidth=\fIn\fR .IP -- cgit v1.2.3