aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2019-05-03 10:24:12 +0200
committerThomas White <taw@physics.org>2019-05-07 16:00:38 +0200
commit6d5dd6eda5f344563b87da86112a9605a463d298 (patch)
treeb41eaaef8b73b8e5e4e5b934aea50d713658e3a2
parent50a3cb06809bae0f56e5063e5e051a6d04502b99 (diff)
Move spectrum type enum to pattern_sim.c
-rw-r--r--libcrystfel/src/image.h16
-rw-r--r--src/pattern_sim.c9
2 files changed, 8 insertions, 17 deletions
diff --git a/libcrystfel/src/image.h b/libcrystfel/src/image.h
index cc1bcc5d..cf06d0a1 100644
--- a/libcrystfel/src/image.h
+++ b/libcrystfel/src/image.h
@@ -55,22 +55,6 @@ struct imagefile_field_list;
#include "index.h"
#include "events.h"
-/**
- * SpectrumType:
- * @SPECTRUM_TOPHAT: A top hat distribution of wavelengths
- * @SPECTRUM_SASE: A simulated SASE spectrum
- * @SPECTRUM_TWOCOLOUR: A spectrum containing two peaks
- * @SPECTRUM_FROMFILE: An arbitrary spectrum read from input file
- *
- * A %SpectrumType represents a type of X-ray energy spectrum to use for
- * generating simulated data.
- **/
-typedef enum {
- SPECTRUM_TOPHAT,
- SPECTRUM_SASE,
- SPECTRUM_TWOCOLOUR,
- SPECTRUM_FROMFILE
-} SpectrumType;
/**
diff --git a/src/pattern_sim.c b/src/pattern_sim.c
index 5b25100e..5ee53514 100644
--- a/src/pattern_sim.c
+++ b/src/pattern_sim.c
@@ -58,6 +58,13 @@
#include "stream.h"
+enum spectrum_type {
+ SPECTRUM_TOPHAT, /**< A top hat distribution */
+ SPECTRUM_SASE, /**< A simulated SASE spectrum */
+ SPECTRUM_TWOCOLOUR, /**< A spectrum containing two peaks */
+ SPECTRUM_FROMFILE /**< An arbitrary spectrum read from a file */
+};
+
static void show_help(const char *s)
{
printf("Syntax: %s [options]\n\n", s);
@@ -370,7 +377,7 @@ int main(int argc, char *argv[])
char *spectrum_str = NULL;
char *spectrum_fn = NULL;
GradientMethod grad;
- SpectrumType spectrum_type;
+ enum spectrum_type spectrum_type;
int ndone = 0; /* Number of simulations done (images or not) */
int number = 1; /* Number used for filename of image */
int n_images = 1; /* Generate one image by default */