fix/improve printing and CLI
This commit is contained in:
@@ -375,9 +375,9 @@ namespace imc
|
||||
if ( sep == ' ' )
|
||||
{
|
||||
fou<<std::setw(width)<<std::left<<xname_
|
||||
<<std::setw(width)<<std::left<<yname_<<"\n"
|
||||
<<std::setw(width)<<std::left<<xunit_
|
||||
<<std::setw(width)<<std::left<<yunit_<<"\n";
|
||||
<<std::setw(width)<<std::left<<yname_<<"\n"
|
||||
<<std::setw(width)<<std::left<<xunit_
|
||||
<<std::setw(width)<<std::left<<yunit_<<"\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -388,7 +388,8 @@ namespace imc
|
||||
{
|
||||
if ( sep == ' ' )
|
||||
{
|
||||
fou<<std::setw(width)<<std::left<<xdata_[i]
|
||||
fou<<std::setprecision(9)<<std::fixed
|
||||
<<std::setw(width)<<std::left<<xdata_[i]
|
||||
<<std::setw(width)<<std::left<<ydata_[i]<<"\n";
|
||||
}
|
||||
else
|
||||
|
@@ -329,7 +329,7 @@ namespace imc
|
||||
{
|
||||
// check for given directory
|
||||
std::filesystem::path pd = output;
|
||||
if ( std::filesystem::is_directory(pd) )
|
||||
if ( !std::filesystem::is_directory(pd) )
|
||||
{
|
||||
throw std::runtime_error("given directory does not exist");
|
||||
}
|
||||
@@ -338,7 +338,9 @@ namespace imc
|
||||
it != channels_.end(); ++it)
|
||||
{
|
||||
// construct filename
|
||||
std::string filenam = std::string("channel_") + it->first + std::string(".csv");
|
||||
std::string chid = std::string("channel_") + it->first;
|
||||
std::string filenam = it->second.name_.empty() ? chid + std::string(".csv")
|
||||
: it->second.name_ + std::string(".csv");
|
||||
std::filesystem::path pf = pd / filenam;
|
||||
|
||||
// and print the channel
|
||||
|
Reference in New Issue
Block a user