Commit 4486e8bd authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

proceeding

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 2446
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 9b5dcbba
......@@ -2,14 +2,37 @@ this is <README.1st>
============================================================================
General guide for published packages
------------------------------------
$Id: README.1st,v 1.1 2007-11-20 17:07:52 tforb Exp $
$Id: README.1st,v 1.2 2007-11-23 09:15:27 tforb Exp $
============================================================================
The packages you obtain from my site are not full-featured, coming with
configure scripts or similar tools to support installation. The packages are
snapshots from my CVS repository. They are snapshots of the code I'm currently
using myself. Please feel free to use this code and compile the programs and
libraries. But you have to do it yourself. I will give you some guidance and
please feel free to get into contact with me if you have additional questions.
If you experience any problem, when compiling the code, please contact me:
Apart from this file you usually will find the following in the packages:
Makefile: The Makefile conatains all rules you need to compile the code.
Information about the purpose of the package, special
coniderations during installation and dependencies to other
packages are placed in the preamble of the Makefile.
README.compile:
This text is the same for all packages (published at the same
date). Here you find general information about utilities and
environment settings that are usually expected by the Makefile.
In some packages you may find a README. In most cases this is not a general
information about installing and using this package (please have a look at
Makefile for this). In particular in C++ library packages the README file is
part of the doxygen documentation.
If you experience any problem, please contact me:
--
| Dr. Thomas Forbriger e-mail: Thomas.Forbriger@gpi.uni-karlsruhe.de |
| Observatorium Schiltach (BFO), Heubach 206, D-77709 Wolfach, Germany, |
| Tel.: ++49 (0)7836/2151, Fax.: ++49 (0)7836/7650 |
| http://www-gpi.physik.uni-karlsruhe.de/pub/forbriger |
----- END OF README.1st -----
......@@ -2,14 +2,15 @@ this is <README.compile>
============================================================================
How to compile the source code
------------------------------
$Id: README.compile,v 1.5 2006-03-29 10:38:58 tforb Exp $
$Id: README.compile,v 1.6 2007-11-23 09:15:27 tforb Exp $
============================================================================
Here you will find some notes to help you in the process of compiling software
provided by me (Thomas Forbriger). My programs usually make use of several
different software libraries. With the beginning of 2006 I provide software
packages (main code) separately from the libraries, which make life easier for
(but harder for you). Please read the notes below to compensate for that.
packages (main code) separately from the libraries, which makes life easier
for me (but harder for you). Please read the notes below to compensate for
that.
Make
----
......@@ -67,7 +68,7 @@ tfmacros.h
Comments in header files
------------------------
Some Makefiles contain rules to strip comments from C++ and C header files.
They use the program remcmmnt by Jari Laaksonen (see below). If this is nit
They use the program remcmmnt by Jari Laaksonen (see below). If this is not
available to you, look for the variable REMCMMNT and set it to
REMCMMNT=cat
......
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: stuploxx.cc,v 1.11 2007-11-09 07:37:14 tforb Exp $
* $Id: stuploxx.cc,v 1.12 2007-11-23 09:15:28 tforb Exp $
* \author Thomas Forbriger
* \date 30/01/2007
*
......@@ -89,7 +89,7 @@
#define STUPLOXX_VERSION \
"STUPLOXX V1.0 Plot SFF waveform data"
#define STUPLOXX_CVSID \
"$Id: stuploxx.cc,v 1.11 2007-11-09 07:37:14 tforb Exp $"
"$Id: stuploxx.cc,v 1.12 2007-11-23 09:15:28 tforb Exp $"
#include <iostream>
#include <string>
......@@ -102,6 +102,8 @@
#include <tfxx/readtsdata.h>
#include <tfxx/error.h>
#include <tfxx/misc.h>
#include <aff/functions/max.h>
#include <aff/functions/min.h>
#include <datreadxx/readany.h>
#include <xpgplotCpp.h>
......@@ -136,7 +138,7 @@ using std::endl;
const int Cfirstpanel=0;
// panel index to be used to indicate that no panel was selected
// on the command line
const int Cnopanelselected=-9999;
const unsigned int Cnopanelselected=99999;
/*----------------------------------------------------------------------*/
......@@ -199,12 +201,37 @@ typedef std::list<DataFile> TDataFileList;
/*----------------------------------------------------------------------*/
// struct to deal with minimum and maximum values of time and sample value
struct DataTraceBoundingBox {
libtime::TAbsoluteTime first;
libtime::TAbsoluteTime last;
Ttimeseries::Tvalue min;
Ttimeseries::Tvalue max;
}; // struct DataTraceBoundingBox
// struct to hold trace data together with file parameters
struct DataTrace {
FileParameters para;
Ttimeseries ts;
sff::WID2 wid2() const { return ts.header.wid2(); }
libtime::TAbsoluteTime first() const { return(this->wid2().date); }
libtime::TAbsoluteTime last() const
{ return(sff::wid2lastsample(this->wid2())); }
Ttimeseries::Tvalue max() const { return(aff::func::max(ts)); }
Ttimeseries::Tvalue min() const { return(aff::func::min(ts)); }
DataTraceBoundingBox bbox() const;
}; // struct DataTrace
DataTraceBoundingBox DataTrace::bbox() const
{
DataTraceBoundingBox retval;
retval.first=this->first();
retval.last=this->last();
retval.min=this->min();
retval.max=this->max();
return(retval)
}
typedef std::list<DataTrace> TDataTraceList;
/*----------------------------------------------------------------------*/
......@@ -213,8 +240,42 @@ typedef std::list<DataTrace> TDataTraceList;
// this includes the set of files that should be displayed within this panel
struct Panel {
TDataTraceList dtl;
DataTraceBoundingBox bbox() const;
libtime::TAbsoluteTime first() const;
libtime::TAbsoluteTime last() const;
Timeseries::Tvalue min() const;
Timeseries::Tvalue max() const;
libtime::TRelativeTime length() const;
}; // struct Panel
// find date of first sample in set of traces
libtime::TAbsoluteTime Panel::first() const
{
libtime::TAbsoluteTime retval;
TDataTraceList::const_iterator IT=this->dtl.begin();
retval=IT->ts.first();
while(IT != dtl.end())
{
if (retval > IT->ts.first()) { retval=IT->ts.first(); }
++IT;
}
return(retval);
}
// find date of last sample in set of traces
libtime::TAbsoluteTime Panel::last() const
{
libtime::TAbsoluteTime retval;
TDataTraceList::const_iterator IT=this->dtl.begin();
retval=IT->ts.last();
while(IT != dtl.end())
{
if (retval < IT->ts.last()) { retval=IT->ts.last(); }
++IT;
}
return(retval);
}
typedef std::vector<Panel> TPanelVector;
/*======================================================================*/
......@@ -355,7 +416,7 @@ TPanelVector setuppanels(const TDataFileList& fpl,
const Ttimeseries& timeseries = *IT;
// set panel index to be used and next panel index to be used
int ipanel=para.ipanel;
unsigned int ipanel=para.ipanel;
if (ipanel==Cnopanelselected)
{
ipanel=nextpanel;
......@@ -369,8 +430,10 @@ TPanelVector setuppanels(const TDataFileList& fpl,
// local reference to output data
TFXX_debug(debug, "setuppanels",
"create reference to selected panel: " << ipanel);
if (ipanel
TPanelVector::iterator panel=retval.insert(ipanel);
TFXX_assert(ipanel>=0,"illegal panel index");
if (ipanel>=retval.size()) { retval.resize(ipanel+1); }
TPanelVector::iterator IPV=retval.begin();
for (unsigned int i=0; i< ipanel; ++i) { ++IPV; }
// create data to be added to list of traces
TFXX_debug(debug, "setuppanels",
......@@ -382,7 +445,7 @@ TPanelVector setuppanels(const TDataFileList& fpl,
// copy data to panel
TFXX_debug(debug, "setuppanels",
"copy data to panel");
panel->dtl.push_back(trace);
IPV->dtl.push_back(trace);
// go to next trace in this file
TFXX_debug(debug, "setuppanels",
......@@ -406,6 +469,17 @@ void plotdata(pgplot::basic_device& dev,
const TPanelVector& pl,
const PGstyle&)
{
// setup panels
pgplot::Ttiledpanels tiledpanels(pgplot::c_rect1919,
pgplot::c_rect1919,
pgplot::c_rect0101,
1, pl.size());
for (unsigned int ipanel=0; ipanel<pl.size(); ++ipanel)
{
Panel panel=pl[ipanel];
libtime::TAbsoluteTime first=panel.first();
libtime::TAbsoluteTime basedate(first.year(), first.month(), first.day());
}
dev.env(pgplot::c_rect1919).arro(float(0.2),float(0.2),float(0.8),float(0.8));
} // plotdata
......
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