diff --git a/CMakeLists.txt b/CMakeLists.txt index 07f1673..964d064 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,7 +10,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}") set(Boost_USE_STATIC_LIBS ON) set(Boost_USE_MULTITHREADED ON) set(Boost_USE_STATIC_RUNTIME OFF) -find_package( Boost 1.54.0 COMPONENTS program_options ) +find_package( Boost 1.49.0 COMPONENTS program_options ) #set up CUDA find_package(CUDA) diff --git a/main.cpp b/main.cpp index a643b27..216d29c 100644 --- a/main.cpp +++ b/main.cpp @@ -33,11 +33,12 @@ int main(int argc, char* argv[]) ("input-file,i", po::value(), "Input file containing material information.") ("input-format,f", po::value()->default_value("wavenumber,n,k"), "Format string identifying the order of material properties in the input file. Options include: microns, wavenumber, n (real RI), k (imaginary RI), A (absorbance), Xp (real Chi), Xpp (imaginary Chi).\n\nThe default [microns,n,k] will load a material file with columns representing the wavelength in microns, followed by the real and imaginary parts of the refractive index.") ("output-file,o", po::value()->default_value("out.txt"), "Output file containing the processed material information.") - ("output-format,t", po::value()->default_value("wavenumber,n,k"), "Format string for the output file (similar to --input-format).") + ("output-format,t", po::value()->default_value("wavenumber,n,k"), "Format string for the output file (similar to --input-format).") ("scaling,s", po::value()->default_value(1.0), "Scaling value for the absorbance parameter. This value gives the thickness (in microns) of the measured material.") ("n0,n", po::value()->default_value(1.48), "Average effective refractive index. This is required when computing the real refractive index from the absorption.") ("padding,p", po::value()->default_value(2), "Padding factor used to remove edge artifacts in the Kramers-Kronig computation for computing the real RI from absorption. The default value of p=2 is sufficient in most cases.") - ("resolution,r", po::value(), "Resolution of the spectrum. The default value is based on the number of spectral samples provided in the input file."); + ("resolution,r", po::value(), "Resolution of the spectrum. The default value is based on the number of spectral samples provided in the input file.") + ("reverse,v", "reverse the order of the output file"); po::positional_options_description pos; pos.add("input-file", 1); @@ -52,7 +53,7 @@ int main(int argc, char* argv[]) cout<(); //compute the real refractive index - rts::material N = M.computeN(vm["n0"].as(), + rts::material N = M.computeN(vm["n0"].as(), R, vm["padding"].as()); //output the file using the standard format - N.save(vm["output-file"].as(), vm["output-format"].as()); + bool reverse_order = false; + if(vm.count("reverse")) + reverse_order = true; + N.save(vm["output-file"].as(), vm["output-format"].as(), reverse_order); return 0; } -- libgit2 0.21.4