commit 6d11366704f8f5caad147a94dbbbc7bd315ccffb
parent 97d635df25c51a9fc7a754bc3dcc5211d8f95d79
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Mon, 9 Nov 2015 12:07:02 +0100
Improve command line interface
Output a message to notify when no optical propertie is submitted and
that the user must enter them.
Diffstat:
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/src/schiff_args.c b/src/schiff_args.c
@@ -59,13 +59,15 @@ print_help(const char* binary)
"respectively, of the relative refractive index, and \"Ne\" the refractive index\n"
"of the medium. With no FILE, read optical properties from standard input.\n\n");
printf(
-"The estimated results are written to OUTPUT or stdout whether the \"-o\" option\n"
-"is defined or not, respectively. The line format of the outputed results is \"W\n"
-"E E' A A' S S' P P'\" with \"W\" the wavelength in vacuum (expressed in micron),\n"
-"\"E\", \"A\" and \"S\" the estimation of the extinction, absorption and scattering\n"
-"cross section, respectively, and \"P\" the estimated average projected area. The\n"
-"\"E'\", \"A'\", \"S'\" and \"P'\" values are the standard error of the aforementioned\n"
-"estimations.\n\n");
+"The estimated results are written to OUTPUT or to standard output whether the\n"
+"\"-o\" option is defined or not, respectively. ");
+printf(
+"The line format of the outputed\n"
+"results is \"W E E' A A' S S' P P'\" with \"W\" the wavelength in vacuum (expressed\n"
+"in micron), \"E\", \"A\" and \"S\" the estimation of the extinction, absorption and\n"
+"scattering cross section, respectively, and \"P\" the estimated average projected\n"
+"area. The \"E'\", \"A'\", \"S'\" and \"P'\" values are the standard error of the\n"
+"aforementioned estimations.\n\n");
printf(
" -c R:S:A[:N] the micro organisms are cylindrical meshes discretized in N\n"
" slices. By default N is %u. The radius `r' and the height `h'\n"
@@ -346,6 +348,8 @@ schiff_args_init
}
if(optind == argc) {
+ fprintf(stderr,
+"Enter the optical properties. Type ^D (i.e. CTRL+d) to stop the sequence:\n");
res = schiff_optical_properties_load_stream(&args->properties, stdin, "stdin");
} else {
res = schiff_optical_properties_load(&args->properties, argv[optind]);