|
@@ -10,6 +10,7 @@ typedef struct {
|
|
|
gint height;
|
|
|
guint num_radios;
|
|
|
guint num_darks;
|
|
|
+ gdouble dark_scale;
|
|
|
gdouble theta;
|
|
|
gdouble tau;
|
|
|
gdouble psi;
|
|
@@ -223,6 +224,7 @@ run_reconstruction (Params *params)
|
|
|
dark_reader = make_task (pm, "reader");
|
|
|
ffc = make_task (pm, "flat-field-correction");
|
|
|
|
|
|
+ g_object_set (ffc, "dark-scale", params->dark_scale, NULL);
|
|
|
g_object_set (flat_reader, "path", params->flats, NULL);
|
|
|
g_object_set (dark_reader, "path", params->darks, NULL);
|
|
|
|
|
@@ -280,26 +282,27 @@ parse_params (Params *params, int argc, char **argv)
|
|
|
GError *error = NULL;
|
|
|
|
|
|
GOptionEntry entries[] = {
|
|
|
- { "width", 0, 0, G_OPTION_ARG_INT, ¶ms->width, "Width", "" },
|
|
|
- { "height", 0, 0, G_OPTION_ARG_INT, ¶ms->height, "Height", "" },
|
|
|
- { "num-radios", 0, 0, G_OPTION_ARG_INT, ¶ms->num_radios, "Number of radios", "" },
|
|
|
- { "num-darks", 0, 0, G_OPTION_ARG_INT, ¶ms->num_darks, "Number of darks", "" },
|
|
|
- { "radios", 0, 0, G_OPTION_ARG_STRING, ¶ms->radios, "Radios", "" },
|
|
|
- { "darks", 0, 0, G_OPTION_ARG_STRING, ¶ms->darks, "Darks", "" },
|
|
|
- { "flats", 0, 0, G_OPTION_ARG_STRING, ¶ms->flats, "Flats", "" },
|
|
|
- { "output", 0, 0, G_OPTION_ARG_STRING, ¶ms->output, "Output", "" },
|
|
|
- { "theta", 0, 0, G_OPTION_ARG_DOUBLE, ¶ms->theta, "Tilt (theta)", "" },
|
|
|
- { "tau", 0, 0, G_OPTION_ARG_DOUBLE, ¶ms->tau, "Pixel size (theta)", "" },
|
|
|
- { "psi", 0, 0, G_OPTION_ARG_DOUBLE, ¶ms->psi, "Misalignment (psi)", "" },
|
|
|
- { "px", 0, 0, G_OPTION_ARG_DOUBLE, ¶ms->px, "X coordinate of axis", "" },
|
|
|
- { "py", 0, 0, G_OPTION_ARG_DOUBLE, ¶ms->py, "Y coordinate of axis", "" },
|
|
|
- { "px-variation", 0, 0, G_OPTION_ARG_DOUBLE, ¶ms->px_variation, "X axis variation", "" },
|
|
|
- { "vx", 0, 0, G_OPTION_ARG_DOUBLE, ¶ms->v_origin[0], "X coordinate of box origin", "" },
|
|
|
- { "vy", 0, 0, G_OPTION_ARG_DOUBLE, ¶ms->v_origin[1], "Y coordinate of box origin", "" },
|
|
|
- { "vz", 0, 0, G_OPTION_ARG_DOUBLE, ¶ms->v_origin[2], "Z coordinate of box origin", "" },
|
|
|
- { "vw", 0, 0, G_OPTION_ARG_INT, ¶ms->v_size[0], "Width of box", "" },
|
|
|
- { "vh", 0, 0, G_OPTION_ARG_INT, ¶ms->v_size[1], "Height of box", "" },
|
|
|
- { "vd", 0, 0, G_OPTION_ARG_INT, ¶ms->v_size[2], "Depth of box", "" },
|
|
|
+ { "width", 0, 0, G_OPTION_ARG_INT, ¶ms->width, "Width", "[int]" },
|
|
|
+ { "height", 0, 0, G_OPTION_ARG_INT, ¶ms->height, "Height", "[int]" },
|
|
|
+ { "num-radios", 0, 0, G_OPTION_ARG_INT, ¶ms->num_radios, "Number of radios", "[int]" },
|
|
|
+ { "num-darks", 0, 0, G_OPTION_ARG_INT, ¶ms->num_darks, "Number of darks", "[int]" },
|
|
|
+ { "radios", 0, 0, G_OPTION_ARG_STRING, ¶ms->radios, "Radios", "[path|glob]" },
|
|
|
+ { "darks", 0, 0, G_OPTION_ARG_STRING, ¶ms->darks, "Darks", "[path|glob]" },
|
|
|
+ { "flats", 0, 0, G_OPTION_ARG_STRING, ¶ms->flats, "Flats", "[path|glob]" },
|
|
|
+ { "dark-scale", 0, 0, G_OPTION_ARG_DOUBLE, ¶ms->dark_scale, "Dark scale", "[float]" },
|
|
|
+ { "output", 0, 0, G_OPTION_ARG_STRING, ¶ms->output, "Output", "[path]" },
|
|
|
+ { "theta", 0, 0, G_OPTION_ARG_DOUBLE, ¶ms->theta, "Tilt (theta)", "[float]" },
|
|
|
+ { "tau", 0, 0, G_OPTION_ARG_DOUBLE, ¶ms->tau, "Pixel size (theta)", "[float]" },
|
|
|
+ { "psi", 0, 0, G_OPTION_ARG_DOUBLE, ¶ms->psi, "Misalignment (psi)", "[float]" },
|
|
|
+ { "px", 0, 0, G_OPTION_ARG_DOUBLE, ¶ms->px, "X coordinate of axis", "[float]" },
|
|
|
+ { "py", 0, 0, G_OPTION_ARG_DOUBLE, ¶ms->py, "Y coordinate of axis", "[float]" },
|
|
|
+ { "px-variation", 0, 0, G_OPTION_ARG_DOUBLE, ¶ms->px_variation, "X axis variation", "[float]" },
|
|
|
+ { "vx", 0, 0, G_OPTION_ARG_DOUBLE, ¶ms->v_origin[0], "X coordinate of box origin", "[float]" },
|
|
|
+ { "vy", 0, 0, G_OPTION_ARG_DOUBLE, ¶ms->v_origin[1], "Y coordinate of box origin", "[float]" },
|
|
|
+ { "vz", 0, 0, G_OPTION_ARG_DOUBLE, ¶ms->v_origin[2], "Z coordinate of box origin", "[float]" },
|
|
|
+ { "vw", 0, 0, G_OPTION_ARG_INT, ¶ms->v_size[0], "Width of box", "[int]" },
|
|
|
+ { "vh", 0, 0, G_OPTION_ARG_INT, ¶ms->v_size[1], "Height of box", "[int]" },
|
|
|
+ { "vd", 0, 0, G_OPTION_ARG_INT, ¶ms->v_size[2], "Depth of box", "[int]" },
|
|
|
{ NULL }
|
|
|
};
|
|
|
|
|
@@ -336,6 +339,7 @@ main (int argc, char **argv)
|
|
|
.num_radios = 0,
|
|
|
.num_darks = 1,
|
|
|
.theta = G_MAXDOUBLE,
|
|
|
+ .dark_scale = 1.0,
|
|
|
.tau = 1.0,
|
|
|
.psi = 0.0,
|
|
|
.px = G_MAXDOUBLE,
|