Browse Source

Allow to set number of flats

Matthias Vogelgesang 9 years ago
parent
commit
f232ac07d9
3 changed files with 4 additions and 1 deletions
  1. 2 0
      lamino.c
  2. 1 1
      reco.c
  3. 1 0
      reco.h

+ 2 - 0
lamino.c

@@ -147,6 +147,7 @@ parse_params (Params *params, int argc, char **argv)
         { "height", 0, 0, G_OPTION_ARG_INT, &params->height, "Height", "[int]" },
         { "num-radios", 0, 0, G_OPTION_ARG_INT, &params->num_radios, "Number of radios", "[int]" },
         { "num-darks", 0, 0, G_OPTION_ARG_INT, &params->num_darks, "Number of darks", "[int]" },
+        { "num-flats", 0, 0, G_OPTION_ARG_INT, &params->num_flats, "Number of flats", "[int]" },
         { "radios", 0, 0, G_OPTION_ARG_STRING, &params->radios, "Radios", "[path|glob]" },
         { "darks", 0, 0, G_OPTION_ARG_STRING, &params->darks, "Darks", "[path|glob]" },
         { "flats", 0, 0, G_OPTION_ARG_STRING, &params->flats, "Flats", "[path|glob]" },
@@ -210,6 +211,7 @@ main (int argc, char **argv)
         .height = 0,
         .num_radios = 0,
         .num_darks = 1,
+        .num_flats = 1,
         .radio_step = 1,
         .theta = G_MAXDOUBLE,
         .dark_scale = 1.0,

+ 1 - 1
reco.c

@@ -330,7 +330,7 @@ run_simple_reconstruction (Params *params, gchar **argv)
             flat_interpolate = make_task (data->pm, "interpolate");
 
             g_object_set (flat_after_reader, "path", params->flats_after, NULL);
-            g_object_set (flat_after_stack, "num-items", 21, NULL);
+            g_object_set (flat_after_stack, "num-items", params->num_flats, NULL);
 
             ufo_task_graph_connect_nodes (data->graph, flat_after_reader, flat_after_stack);
             ufo_task_graph_connect_nodes (data->graph, flat_after_stack, flat_after_median);

+ 1 - 0
reco.h

@@ -15,6 +15,7 @@ typedef struct {
     gint height;
     guint num_radios;
     guint num_darks;
+    guint num_flats;
     guint radio_step;
     gdouble dark_scale;
     gdouble theta;