Index: tools/ddd/Functions.cpp
===================================================================
--- tools/ddd/Functions.cpp	(revision 109)
+++ tools/ddd/Functions.cpp	(revision 129)
@@ -56,4 +56,5 @@
   M0Start->setEnabled(true);
   M0Stop->setEnabled(true);
+  PhysPipeAction->setEnabled(true);
   EventNo->setRange(1, RD->RHeader->Events);
   M0Start->setRange(0,(RD->RHeader->Samples)-1);  
@@ -73,4 +74,5 @@
     M0Start->setEnabled(false);
     M0Stop->setEnabled(false);
+	PhysPipeAction->setEnabled(false);
     RunHeaderDisplay->clear();
     EventHeaderDisplay->clear();
@@ -85,4 +87,11 @@
   if(Socket->state() == QAbstractSocket::ConnectedState) return; // do not execute if socket is open
   
+  if (PhysPipeAction->isChecked()) {
+    Graph->setAxisTitle(QwtPlot::xBottom, "Time from start of physical pipeline (ns)");
+  }
+  else {
+    Graph->setAxisTitle(QwtPlot::xBottom, "Time from trigger (ns)");
+  }
+
   // Read event
   ftruncate(fileno(Tmpfile),0);
@@ -112,6 +121,10 @@
   for (unsigned int i=0; i<RD->RHeader->Samples; i++) {
     x[i] = (double) (i/RD->BStruct[BoardNo->value()].NomFreq);
-    y[i] = (double) *((short *) (RD->Data + RD->RHeader->NBoards*RD->RHeader->NChips*sizeof(int)) + BoardNo->value()*RD->RHeader->NChips*RD->RHeader->NChannels *
-	     RD->RHeader->Samples+ChannelNo->value()*RD->RHeader->Samples+i)*RD->BStruct[BoardNo->value()].ScaleFactor;
+	if (PhysPipeAction->isChecked()) {
+      y[(i + *((int *) RD->Data + BoardNo->value()*RD->RHeader->NChips+ChannelNo->value()/RD->RHeader->NChannels))%1024] = (double) *((short *) (RD->Data + RD->RHeader->NBoards*RD->RHeader->NChips*sizeof(int)) + BoardNo->value()*RD->RHeader->NChips*RD->RHeader->NChannels * RD->RHeader->Samples + ChannelNo->value()*RD->RHeader->Samples + i)*RD->BStruct[BoardNo->value()].ScaleFactor;
+	}
+	else {
+      y[i] = (double) *((short *) (RD->Data + RD->RHeader->NBoards*RD->RHeader->NChips*sizeof(int)) + BoardNo->value()*RD->RHeader->NChips*RD->RHeader->NChannels * RD->RHeader->Samples+ChannelNo->value()*RD->RHeader->Samples+(i))*RD->BStruct[BoardNo->value()].ScaleFactor;
+	}
   }
 
@@ -236,5 +249,8 @@
   else {
     if (RD->IsFileOpen() && QMessageBox::question(this, "ddd Request","Connecting will close current data file. Proceed?", 
-        QMessageBox::No, QMessageBox::Yes) != QMessageBox::Yes) return;    
+        QMessageBox::No, QMessageBox::Yes) != QMessageBox::Yes) return;
+		
+	PhysPipeAction->setChecked(false);
+	    
     Socket->connectToHost(IPAddress->text(),Port->value());
     Connect->setEnabled(false);  // While waiting for connection, button not available
@@ -314,4 +330,5 @@
       Signal->show();
       Zoomer->setZoomBase(Signal->boundingRect());
+	  Graph->setAxisTitle(QwtPlot::xBottom, "Time from trigger (ns)");
     }  
     delete[] x;   delete[] y;
@@ -400,4 +417,21 @@
 }
 
+void ddd::MenuSaveASCII() {
+  QString Filename = QFileDialog::getSaveFileName(this,
+     "Filename", ".", "Text files (*.txt *.ascii *.asc);;All files (*)");
+  if (Filename.length()>0) {
+    QFile File(Filename);
+	if (File.open(QFile::WriteOnly | QIODevice::Text | QFile::Truncate)) {
+      QTextStream Stream(&File);
+	  for (int i=0; i<Signal->dataSize(); i++) {
+        Stream << Signal->y(i) << endl;
+	  }
+	}
+	else {
+	  QMessageBox::warning(this, "ddd Message","Could not write data to file.",QMessageBox::Ok);
+    }
+  }
+}
+
 void ddd::MenuHelp() {
   QMessageBox Message;
Index: tools/ddd/GUI.cpp
===================================================================
--- tools/ddd/GUI.cpp	(revision 109)
+++ tools/ddd/GUI.cpp	(revision 129)
@@ -98,5 +98,4 @@
   // Plot area
   Graph = new QwtPlot(Central);
-  Graph->setAxisTitle(QwtPlot::xBottom, "Time (ns)");
   Graph->setAxisTitle(QwtPlot::yLeft, "Signal (mV)");
   Graph->setAutoReplot(true);
@@ -157,4 +156,9 @@
   SaveAction->setShortcut(Qt::CTRL + Qt::Key_S);
   Menu->addAction("Print plot", this, SLOT(MenuPrint()));
+  Menu->addAction("Save waveform to ASCII", this, SLOT(MenuSaveASCII()));
+  Menu->addSeparator();
+  PhysPipeAction = Menu->addAction("Plot physical pipeline", this, SLOT(DisplayEvent()));
+  PhysPipeAction->setCheckable(true);
+  PhysPipeAction->setEnabled(false);
   Menu->addSeparator();
   ConnectAction = Menu->addAction("Connect", this, SLOT(MakeConnection()));
Index: tools/ddd/GUI.h
===================================================================
--- tools/ddd/GUI.h	(revision 109)
+++ tools/ddd/GUI.h	(revision 129)
@@ -37,5 +37,5 @@
     QTcpSocket *Socket;
     QWidget *SocketWindow, *Central, *M0Window;
-    QAction *OpenAction, *ConnectAction;
+    QAction *OpenAction, *ConnectAction, *PhysPipeAction;
     QGridLayout *SocketLayout, *MainLayout, *M0Layout;
     QFormLayout *CommandLayout, *PortLayout, *AddressLayout, *FormLayout, *SpinLayout, *M0StartLayout, *M0StopLayout;
@@ -77,4 +77,5 @@
     void MenuSave();
     void MenuPrint();
+    void MenuSaveASCII();
     void MenuHelp();
     void MenuAbout();
