Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Revert "add date to output dir/filename"

This reverts commit f01cc9d.
  • Loading branch information...
commit df8076f9ef00c62a90690fc0be532de8f1185d79 1 parent f01cc9d
@milianw authored
Showing with 14 additions and 20 deletions.
  1. +1 −2  mpi/main.cpp
  2. +1 −1  non-mpi/main.cpp
  3. +12 −17 plot_data.sh
View
3  mpi/main.cpp
@@ -25,7 +25,6 @@
#include <boost/program_options.hpp>
#include <boost/filesystem.hpp>
#include <boost/foreach.hpp>
-#include <boost/date_time/posix_time/posix_time.hpp>
#include "mpi_master.h"
#include "mpi_slave.h"
@@ -105,7 +104,7 @@ int main(int argc, char* argv[]) {
// append info about the experiment
stringstream stream;
- stream << outputDir << '/' << boost::posix_time::second_clock::local_time() << '=' << from << '-' << to << ':' << steps << ':' << identifierForExperiment(exp) << ":mpi";
+ stream << outputDir << "/" << from << '-' << to << ':' << steps << ':' << identifierForExperiment(exp) << ":mpi";
outputDir = stream.str();
// make sure the path exists
View
2  non-mpi/main.cpp
@@ -209,7 +209,7 @@ int main(int argc, char* argv[])
QDir outputDir(outputPath);
ENSURE(outputDir.exists(), "--output")
- QString base = QString("%5=%1-%2:%3:%4").arg(B_min).arg(B_max).arg(steps).arg(QString::fromStdString(identifierForExperiment(exp))).arg(QDateTime::currentDateTime().toString());
+ QString base = QString("%1-%2:%3:%4").arg(B_min).arg(B_max).arg(steps).arg(QString::fromStdString(identifierForExperiment(exp)));
ENSURE(outputDir.exists(base) || outputDir.mkdir(base), "--output");
const QString outputFileTpl(outputDir.canonicalPath() + QDir::separator() + base + QDir::separator() + "%1");
View
29 plot_data.sh
@@ -1,28 +1,23 @@
#!/bin/bash
echo "plotting files from: $1"
-if [[ "$(basename "$1")" == "intensity.data" ]]; then
- # mpi
- basestring=$(basename "$(dirname "$1")")
+plt_base=/tmp/.plt_$(basename $1)_
+
+if [ -d $1 ]; then
+ cat $1/* | sort -g > ${plt_base}raw
else
- # non-mpi
- basestring=$(basename "$1")
+ cat $1 | sort -g > ${plt_base}raw
fi
-plt_base=/tmp/.plt_${basestring}_
-
-if [ -d "$1" ]; then
- cat "$1"/* | sort -g > "${plt_base}raw"
+./convolute/convolute $1 > ${plt_base}conv
+if [[ "$(basename $1)" == "intensity.data" ]]; then
+ # mpi
+ a=($(basename $(dirname $1) | tr ":" "\n"))
else
- cat "$1" | sort -g > "${plt_base}raw"
+ # non-mpi
+ a=($(basename $1 | tr ":" "\n"))
fi
-./convolute/convolute "$1" > "${plt_base}conv"
-
-date=${basestring/=*/}
-exp=${basestring/*=/}
-
-a=($(echo $exp | tr ":" "\n"))
if [[ "${a[1]}" == "-1" ]]; then
steps="auto"
else
@@ -33,7 +28,7 @@ if [[ "$TITLE_ADD" != "" ]]; then
TITLE_ADD="\\n$TITLE_ADD"
fi
-t="Spectrum for ${a[2]}x 1H, ${a[3]}x 14H, mwFreq = ${a[4]} GHz\\nB-Range: ${a[0]} ($steps steps) ${a[5]} $date $TITLE_ADD"
+t="Spectrum for ${a[2]} 1H, ${a[3]} 14H, mwFreq = ${a[4]} GHz\\nB-Range: ${a[0]} ($steps steps) ${a[5]}$TITLE_ADD"
echo "$GNUPLOT_CMD set title \"$t\";
set xlabel 'static B-field in Tesla';
Please sign in to comment.
Something went wrong with that request. Please try again.