aboutsummaryrefslogtreecommitdiff
path: root/src/hdfsee.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2014-09-22 18:06:07 +0200
committerThomas White <taw@physics.org>2014-09-22 18:06:07 +0200
commit0a5a04cc90619a1973c91489c71585ce127df045 (patch)
treec1903fc77534cd97840330b914b98b7b1187bce0 /src/hdfsee.c
parent142e1ad4e0fad73d223c67a842dfb9728a3bf34c (diff)
Beam file removal, part I
Diffstat (limited to 'src/hdfsee.c')
-rw-r--r--src/hdfsee.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/src/hdfsee.c b/src/hdfsee.c
index 8ae55f9c..4961c7b0 100644
--- a/src/hdfsee.c
+++ b/src/hdfsee.c
@@ -81,7 +81,6 @@ static void show_help(const char *s)
" -g, --geometry=<filename> Use geometry from file for display.\n"
" (When this option is used, the value of\n"
" of the -e parameter is ignored)"
-" -m, --beam=<filename> Get beam parameters from <filename>.\n"
"\n");
}
@@ -126,13 +125,13 @@ int main(int argc, char *argv[])
int colscale = SCALE_COLOUR;
char *cscale = NULL;
char *element = NULL;
- char *beam = NULL;
double ring_size = 5.0;
char *reslist = NULL;
double ring_radii[128];
int n_rings = -1;
int median_filter = 0;
struct detector *det_geom = NULL;
+ struct beam_params beam;
/* Long options */
const struct option longopts[] = {
@@ -145,7 +144,6 @@ int main(int argc, char *argv[])
{"colscale", 1, NULL, 'c'},
{"image", 1, NULL, 'e'},
{"geometry", 1, NULL, 'g'},
- {"beam", 1, NULL, 'm'},
{"show-rings", 0, &config_showrings, 1},
{"ring-size", 1, NULL, 2},
{"simple-rings", 1, NULL, 'r'},
@@ -210,16 +208,12 @@ int main(int argc, char *argv[])
break;
case 'g' :
- det_geom = get_detector_geometry(optarg);
+ det_geom = get_detector_geometry(optarg, &beam);
if ( det_geom == NULL ) {
- ERROR("Failed to read detector geometry from "
- "'%s'\n", optarg);
- return 1;
- }
- break;
-
- case 'm' :
- beam = strdup(optarg);
+ ERROR("Failed to read detector geometry from '%s'\n",
+ optarg);
+ return 1;
+ }
break;
case 2 :
@@ -298,7 +292,7 @@ int main(int argc, char *argv[])
config_noisefilter,
config_calibmode,
colscale, element,
- det_geom, beam,
+ det_geom, &beam,
config_showrings,
ring_radii,
n_rings,