aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2015-01-20 16:10:04 +0100
committerThomas White <taw@physics.org>2015-01-20 16:10:04 +0100
commit38f81ac432e313ed451eceb80c3f36ba6f1008e8 (patch)
treed354c0adc18e53fc935310fe4681e80d949a3ff1 /src
parent15931c364e2ee96bcd545b33ef5bc0db9e52341f (diff)
Add informational messages when symmetry doesn't match for monoclinic point groups
Diffstat (limited to 'src')
-rw-r--r--src/check_hkl.c13
-rw-r--r--src/compare_hkl.c25
-rw-r--r--src/get_hkl.c8
-rw-r--r--src/partial_sim.c10
-rw-r--r--src/pattern_sim.c23
-rw-r--r--src/render_hkl.c9
6 files changed, 66 insertions, 22 deletions
diff --git a/src/check_hkl.c b/src/check_hkl.c
index 69ec34ef..0449c7a9 100644
--- a/src/check_hkl.c
+++ b/src/check_hkl.c
@@ -3,11 +3,11 @@
*
* Characterise reflection lists
*
- * Copyright © 2012-2014 Deutsches Elektronen-Synchrotron DESY,
+ * Copyright © 2012-2015 Deutsches Elektronen-Synchrotron DESY,
* a research centre of the Helmholtz Association.
*
* Authors:
- * 2010-2014 Thomas White <taw@physics.org>
+ * 2010-2015 Thomas White <taw@physics.org>
*
* This file is part of CrystFEL.
*
@@ -840,6 +840,10 @@ int main(int argc, char *argv[])
return 1;
}
cell = load_cell_from_file(cellfile);
+ if ( cell == NULL ) {
+ ERROR("Failed to load cell.\n");
+ return 1;
+ }
free(cellfile);
raw_list = read_reflections(file);
@@ -855,6 +859,11 @@ int main(int argc, char *argv[])
if ( check_list_symmetry(raw_list, sym) ) {
ERROR("The input reflection list does not appear to"
" have symmetry %s\n", symmetry_name(sym));
+ if ( cell_get_lattice_type(cell) == L_MONOCLINIC ) {
+ ERROR("You may need to specify the unique axis in your "
+ "point group. The default is unique axis c.\n");
+ ERROR("See 'man crystfel' for more details.\n");
+ }
return 1;
}
diff --git a/src/compare_hkl.c b/src/compare_hkl.c
index 29d0746c..d3f60feb 100644
--- a/src/compare_hkl.c
+++ b/src/compare_hkl.c
@@ -3,11 +3,11 @@
*
* Compare reflection lists
*
- * Copyright © 2012-2014 Deutsches Elektronen-Synchrotron DESY,
+ * Copyright © 2012-2015 Deutsches Elektronen-Synchrotron DESY,
* a research centre of the Helmholtz Association.
*
* Authors:
- * 2010-2014 Thomas White <taw@physics.org>
+ * 2010-2015 Thomas White <taw@physics.org>
* 2013 Lorenzo Galli <lorenzo.galli@desy.de>
*
* This file is part of CrystFEL.
@@ -1124,14 +1124,17 @@ int main(int argc, char *argv[])
afile = strdup(argv[optind++]);
bfile = strdup(argv[optind]);
+ if ( shell_file == NULL ) shell_file = strdup("shells.dat");
+
+ cell = load_cell_from_file(cellfile);
if ( cellfile == NULL ) {
ERROR("You must provide a unit cell.\n");
exit(1);
}
-
- if ( shell_file == NULL ) shell_file = strdup("shells.dat");
-
- cell = load_cell_from_file(cellfile);
+ if ( cell == NULL ) {
+ ERROR("Failed to load cell.\n");
+ return 1;
+ }
free(cellfile);
list1_raw = read_reflections(afile);
@@ -1150,11 +1153,21 @@ int main(int argc, char *argv[])
if ( check_list_symmetry(list1_raw, sym) ) {
ERROR("The first input reflection list does not appear to"
" have symmetry %s\n", symmetry_name(sym));
+ if ( cell_get_lattice_type(cell) == L_MONOCLINIC ) {
+ ERROR("You may need to specify the unique axis in your "
+ "point group. The default is unique axis c.\n");
+ ERROR("See 'man crystfel' for more details.\n");
+ }
return 1;
}
if ( check_list_symmetry(list2_raw, sym) ) {
ERROR("The second input reflection list does not appear to"
" have symmetry %s\n", symmetry_name(sym));
+ if ( cell_get_lattice_type(cell) == L_MONOCLINIC ) {
+ ERROR("You may need to specify the unique axis in your "
+ "point group. The default is unique axis c.\n");
+ ERROR("See 'man crystfel' for more details.\n");
+ }
return 1;
}
diff --git a/src/get_hkl.c b/src/get_hkl.c
index 52798a89..b1d83c79 100644
--- a/src/get_hkl.c
+++ b/src/get_hkl.c
@@ -3,11 +3,11 @@
*
* Small program to manipulate reflection lists
*
- * Copyright © 2013-2014 Deutsches Elektronen-Synchrotron DESY,
+ * Copyright © 2013-2015 Deutsches Elektronen-Synchrotron DESY,
* a research centre of the Helmholtz Association.
*
* Authors:
- * 2009-2014 Thomas White <taw@physics.org>
+ * 2009-2015 Thomas White <taw@physics.org>
*
* This file is part of CrystFEL.
*
@@ -596,6 +596,10 @@ int main(int argc, char *argv[])
{
ERROR("The input reflection list does not appear to"
" have symmetry %s\n", symmetry_name(mero));
+ ERROR("If your unit cell is monoclinic, you may need to specify"
+ " the unique axis for your point group. The default is"
+ " unique axis c.\n");
+ ERROR("See 'man crystfel' for more details.\n");
return 1;
}
diff --git a/src/partial_sim.c b/src/partial_sim.c
index b8914feb..c0d9aaaa 100644
--- a/src/partial_sim.c
+++ b/src/partial_sim.c
@@ -3,11 +3,11 @@
*
* Generate partials for testing scaling
*
- * Copyright © 2012-2014 Deutsches Elektronen-Synchrotron DESY,
+ * Copyright © 2012-2015 Deutsches Elektronen-Synchrotron DESY,
* a research centre of the Helmholtz Association.
*
* Authors:
- * 2011-2014 Thomas White <taw@physics.org>
+ * 2011-2015 Thomas White <taw@physics.org>
* 2014 Valerio Mariani
*
* This file is part of CrystFEL.
@@ -728,6 +728,12 @@ int main(int argc, char *argv[])
if ( check_list_symmetry(full, sym) ) {
ERROR("The input reflection list does not appear to"
" have symmetry %s\n", symmetry_name(sym));
+ if ( cell_get_lattice_type(cell) == L_MONOCLINIC ) {
+ ERROR("You may need to specify the unique axis "
+ "in your point group. The default is "
+ "unique axis c.\n");
+ ERROR("See 'man crystfel' for more details.\n");
+ }
return 1;
}
diff --git a/src/pattern_sim.c b/src/pattern_sim.c
index aa3192d8..4ee77c19 100644
--- a/src/pattern_sim.c
+++ b/src/pattern_sim.c
@@ -3,11 +3,11 @@
*
* Simulate diffraction patterns from small crystals
*
- * Copyright © 2012-2014 Deutsches Elektronen-Synchrotron DESY,
+ * Copyright © 2012-2015 Deutsches Elektronen-Synchrotron DESY,
* a research centre of the Helmholtz Association.
*
* Authors:
- * 2009-2014 Thomas White <taw@physics.org>
+ * 2009-2015 Thomas White <taw@physics.org>
* 2013-2014 Chun Hong Yoon <chun.hong.yoon@desy.de>
* 2014 Valerio Mariani
* 2013 Alexandra Tolstikova
@@ -573,6 +573,12 @@ int main(int argc, char *argv[])
}
free(spectrum_str);
+ /* Load unit cell */
+ input_cell = load_cell_from_file(filename);
+ if ( input_cell == NULL ) {
+ exit(1);
+ }
+
if ( intfile == NULL ) {
/* Gentle reminder */
@@ -606,6 +612,13 @@ int main(int argc, char *argv[])
if ( check_list_symmetry(reflections, sym) ) {
ERROR("The input reflection list does not appear to"
" have symmetry %s\n", symmetry_name(sym));
+ if ( cell_get_lattice_type(input_cell) == L_MONOCLINIC )
+ {
+ ERROR("You may need to specify the unique axis "
+ "in your point group. The default is "
+ "unique axis c.\n");
+ ERROR("See 'man crystfel' for more details.\n");
+ }
return 1;
}
@@ -622,12 +635,6 @@ int main(int argc, char *argv[])
image.bw = bandwidth;
image.nsamples = nsamples;
- /* Load unit cell */
- input_cell = load_cell_from_file(filename);
- if ( input_cell == NULL ) {
- exit(1);
- }
-
/* Initialise stuff */
image.filename = NULL;
image.features = NULL;
diff --git a/src/render_hkl.c b/src/render_hkl.c
index 9013cf01..f9398c3d 100644
--- a/src/render_hkl.c
+++ b/src/render_hkl.c
@@ -3,11 +3,11 @@
*
* Draw pretty renderings of reflection lists
*
- * Copyright © 2012-2014 Deutsches Elektronen-Synchrotron DESY,
+ * Copyright © 2012-2015 Deutsches Elektronen-Synchrotron DESY,
* a research centre of the Helmholtz Association.
*
* Authors:
- * 2010-2014 Thomas White <taw@physics.org>
+ * 2010-2015 Thomas White <taw@physics.org>
*
* This file is part of CrystFEL.
*
@@ -1005,6 +1005,11 @@ int main(int argc, char *argv[])
if ( check_list_symmetry(list, sym) ) {
ERROR("The input reflection list does not appear to"
" have symmetry %s\n", symmetry_name(sym));
+ if ( cell_get_lattice_type(cell) == L_MONOCLINIC ) {
+ ERROR("You may need to specify the unique axis in your "
+ "point group. The default is unique axis c.\n");
+ ERROR("See 'man crystfel' for more details.\n");
+ }
return 1;
}