Attention une mise à jour du serveur va être effectuée le vendredi 16 avril entre 12h et 12h30. Cette mise à jour va générer une interruption du service de quelques minutes.

Commit 290d0b2c authored by Laurent Belcour's avatar Laurent Belcour

Updating the xml_cmd script to avoid to specify the build dir in the xml commands.

Adding the Kirb2 xml example.
parent 78f12332
......@@ -93,6 +93,9 @@ struct Fitter : fitter, bp::wrapper<fitter> {
bool fit_data(const ptr<data>& d, ptr<function>& f, const arguments& args) {
return this->get_override("fit_data")(f, args);
}
bool fit_data(const ptr<Data>& d, ptr<Function>& f, const arguments& args) {
return this->get_override("fit_data")(f, args);
}
void set_parameters(const arguments& args) {
this->get_override("set_parameters")(args);
......@@ -128,7 +131,6 @@ BOOST_PYTHON_MODULE(alta)
// Data interface
bp::class_<Data, ptr<Data>, boost::noncopyable>("data")
.def("load", bp::pure_virtual(static_cast< void(data::*)(const std::string&)>(&data::load)))
// .def("load", bp::pure_virtual(&data::load));
.def("size", bp::pure_virtual(&data::size));
bp::def("get_data", plugins_manager::get_data);
bp::def("load_data", load_data);
......@@ -136,7 +138,8 @@ BOOST_PYTHON_MODULE(alta)
// Fitter interface
bp::class_<Fitter, ptr<Fitter>, boost::noncopyable>("fitter")
.def("fit_data", bp::pure_virtual(&fitter::fit_data));
//.def("fit_data", &Fitter::fit_data);
.def("fit_data", bp::pure_virtual(&fitter::fit_data));
bp::def("get_fitter", plugins_manager::get_fitter);
bp::register_ptr_to_python< ptr<fitter> >();
}
......@@ -114,7 +114,8 @@ def parseFunction(xmlNode):
global lib_dir
cmd = ''
cmd += lib_dir + dd + libName(xmlNode.attrib['name'])
#cmd = lib_dir + dd + libName(xmlNode.attrib['name'])
cmd = xmlNode.attrib['name']
# Parse the parameters of the function
for param in xmlNode.findall('parameter'):
......@@ -168,7 +169,8 @@ def parseAction(xmlNode):
for plugin in xmlNode.findall('plugin'):
cmd += ' --' + plugin.attrib['type']
cmd += ' ' + lib_dir + dd + libName(plugin.attrib['name'])
#cmd += ' ' + lib_dir + dd + libName(plugin.attrib['name'])
cmd += ' ' + plugin.attrib['name']
#end
for param in xmlNode.findall('parameter'):
......@@ -196,7 +198,12 @@ else:
for child in root.findall('action'):
# Create the cmd string with the command name
cmd = lib_dir + dd + child.attrib['name']
cmd = ''
if lib_dir != '':
cmd = lib_dir + dd + child.attrib['name']
else:
cmd = child.attrib['name']
# Parse the action
cmd += parseAction(child)
......
<?xml version="1.0"?>
<!-- This script file is part of the ALTA library. It is provided to
perform unit testing of the library rational fitting methods
and functions.
This test script requires to be launched using the xml_cmd python
script provided in the $ALTA/sources/scripts directory. It also
requires to have the data file Kirby2.dat to be present in the
$ALTA/data/1d/NIST/Kirby2 directory
-->
<alta>
<!-- Fit the data to a Legendre RF, using a LS fitter -->
<action name="data2brdf">
<!-- Input and output arguments of the action -->
<input name="../data/1d/NIST/Kirby2/Kirby2.dat" />
<output name="Kirby2.func" />
<!-- Define the function to use -->
<function name="rational_function_legendre" />
<!-- Define the ftting procedure to use -->
<plugin type="fitter" name="rational_fitter_eigen" />
</action>
<action name="brdf2gnuplot">
<!-- Input and output arguments of the action -->
<input name="Kirby2.func" />
<output name="Kirby2.dat" />
<!-- Parameters -->
<parameter name="data-file" value="../data/1d/NIST/Kirby2/Kirby2.dat" />
</action>
<!-- Fit the data to a Legendre RF, using a VS fitter -->
<action name="data2brdf">
<!-- Input and output arguments of the action -->
<input name="../data/1d/NIST/Kirby2/Kirby2.dat" />
<output name="Kirby2.func" />
<!-- Define the function to use -->
<function name="rational_function_legendre" />
<!-- Define the ftting procedure to use -->
<plugin type="fitter" name="rational_fitter_parallel" />
</action>
</alta>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment