Data structures and methods to read/write experimental data. More...
#include "us_dataIO.h"
Classes | |
class | BeckmanRawScan |
Beckman Raw data scan. More... | |
class | EditedData |
The CCW data after edits are applied. More... | |
class | EditedPoint |
Changes made to a scan value. More... | |
class | EditValues |
Entries for edits of a scan. More... | |
class | NewEditedData |
The CCW data after edits are applied. More... | |
class | Parameters |
A private convenience class. More... | |
class | RawData |
All data associated with a cell / channel / wavelength (CCW) More... | |
class | Scan |
Single scan parameter and readings. More... | |
class | SpeedData |
Additional data for each triplet, if equilibrium data. More... | |
Public Types | |
enum | ioError { OK, CANTOPEN, BADCRC, NOT_USDATA, BADTYPE, BADXML, NODATA, NO_GUID_MATCH, BAD_VERSION } |
Values that are returned for various errors when managing scan data. More... | |
Static Public Member Functions | |
static bool | readLegacyFile (const QString &, BeckmanRawScan &) |
static int | writeRawData (const QString &, RawData &) |
static int | readRawData (const QString &, RawData &) |
static int | readEdits (const QString &, EditValues &) |
static QString | errorString (int) |
static int | index (const QVector< double > &, double) |
static int | index (US_DataIO::RawData *, double) |
static int | index (US_DataIO::EditedData *, double) |
static int | loadData (const QString &, const QString &, QVector< EditedData > &, QVector< RawData > &) |
static int | loadData (const QString &, const QString &, QVector< EditedData > &) |
static int | loadData (const QString &, const QString &, EditedData &) |
static void | adjust_interference (RawData &, const EditValues &) |
static void | calc_integral (RawData &, const EditValues &) |
static bool | spike_check (const Scan &, const QVector< double > &, int, int, int, double *) |
Static Public Attributes | |
static const uint | format_version = 5 |
Static Private Member Functions | |
static void | writeScan (QDataStream &, const Scan &, quint32 &, const Parameters &) |
static void | write (QDataStream &, const char *, int, quint32 &) |
static void | read (QDataStream &, char *, int, quint32 &) |
static void | ident (QXmlStreamReader &, EditValues &) |
static void | run (QXmlStreamReader &, EditValues &) |
static void | all_lambdas (QXmlStreamReader &, EditValues &) |
static void | excludes (QXmlStreamReader &, EditValues &) |
static void | params (QXmlStreamReader &, EditValues &) |
static void | operations (QXmlStreamReader &, EditValues &) |
static void | do_edits (QXmlStreamReader &, EditValues &) |
static void | copyRange (double, double, const Scan &, Scan &, const QVector< double > &) |
static void | copyxRange (double, double, const QVector< double > &, QVector< double > &) |
static QList< double > | calc_residuals (int, const QVector< Scan > &) |
Data structures and methods to read/write experimental data.
The US_DataIO class provides data structures and static methods to read and write experimental data.
For memory efficiency, there is only a single vector of radius values that applies to all the scans. So for instance, if you have an instance of RawData or EditedData like this:
EditedData* data;
you could refer to an individual scan reading value like this:
data->scanData[ scanIndex ].rvalues[ readingIndex ]
Definition at line 24 of file us_dataIO.h.
enum US_DataIO::ioError |
Values that are returned for various errors when managing scan data.
Enumerator | |
---|---|
OK | |
CANTOPEN | |
BADCRC | |
NOT_USDATA | |
BADTYPE | |
BADXML | |
NODATA | |
NO_GUID_MATCH | |
BAD_VERSION |
Definition at line 245 of file us_dataIO.h.
|
static |
Adjust interference data by aligning air gaps at zero fringes
data | A reference to the RawData structure to be adjusted |
ev | The EditValues used for the adjustment. Only airGapLeft, airGapRight, and includes are needed. |
Definition at line 1202 of file us_dataIO.cpp.
|
staticprivate |
Definition at line 831 of file us_dataIO.cpp.
|
static |
Align integral fringe shifts within the valid data range
data | A reference to the RawData structure to be adjusted |
ee | The EditValues used for the adjustment. Only rangeLeft, rangeRight, and gapTolerance are needed. |
Definition at line 1251 of file us_dataIO.cpp.
|
staticprivate |
Definition at line 1553 of file us_dataIO.cpp.
|
staticprivate |
Definition at line 1362 of file us_dataIO.cpp.
|
staticprivate |
Definition at line 1416 of file us_dataIO.cpp.
|
staticprivate |
Definition at line 971 of file us_dataIO.cpp.
|
static |
A string describing the last read or write error
code | The error code to be described |
Definition at line 1651 of file us_dataIO.cpp.
|
staticprivate |
Definition at line 955 of file us_dataIO.cpp.
|
staticprivate |
Definition at line 773 of file us_dataIO.cpp.
|
static |
Determine the index of a radius in a vector of radii
xvals | A vector of data radius information |
xvalue | The radius where the index is needed |
Definition at line 1620 of file us_dataIO.cpp.
|
static |
Determine the index of a radius in a RawData set
rdata | A pointer to the RawData set to examine |
xvalue | The radius where the index is needed |
Definition at line 1608 of file us_dataIO.cpp.
|
static |
Determine the index of a radius in an EditedData set
edata | A pointer to the EditedData set to examine |
xvalue | The radius where the index is needed |
Definition at line 1614 of file us_dataIO.cpp.
|
static |
Load edited data into a data structure. This is the method most analysis programs will call to read data into memory. It uses the functions readRawData and readEdits.
directory | The directory of the auc files |
editFilename | The the file with the edited parameters |
data | The location where the edited data is placed |
raw | The location where the raw data is placed |
Definition at line 1017 of file us_dataIO.cpp.
|
static |
This is an overloaded method to read data into memory. It uses the functions readRawData and readEdits.
directory | The directory of the auc files |
editFilename | The the file with the edited parameters |
data | The location where the edited data is placed |
Definition at line 992 of file us_dataIO.cpp.
|
static |
This is an overloaded method to read data into memory. It uses the functions readRawData and readEdits.
directory | The directory of the auc files |
editFilename | The the file with the edited parameters |
data | The location where the edited data is placed |
Definition at line 1001 of file us_dataIO.cpp.
|
staticprivate |
Definition at line 930 of file us_dataIO.cpp.
|
staticprivate |
Definition at line 847 of file us_dataIO.cpp.
|
staticprivate |
Definition at line 732 of file us_dataIO.cpp.
|
static |
Read a set of edit parameters in xml format
filename | The filename to be read |
parameters | A reference to the data structure for the read data |
Definition at line 738 of file us_dataIO.cpp.
|
static |
Read a set of legacy data in raw teckman data set format
file | The filename to be read |
data | A reference to the data structure location for read data |
Definition at line 193 of file us_dataIO.cpp.
|
static |
Read a set of data in the US3 binary format
file | The filename to be read |
data | A reference to the data structure for the read data |
Definition at line 500 of file us_dataIO.cpp.
|
staticprivate |
Definition at line 801 of file us_dataIO.cpp.
|
static |
Check a scan point to see if it is a spike relative to the non-interpolated points around it
sc | The scan to check |
xvalues | The vector of radius values associated with the scan |
point | The inde of the point to check |
start | The beginning of the valid scan range |
end | The end of the valid scan range |
value | The value of the interpolated point if a spike is detected |
Definition at line 1427 of file us_dataIO.cpp.
|
staticprivate |
Definition at line 494 of file us_dataIO.cpp.
|
static |
Write a set of data to a file in the US3 binary format
file | The filename to be read |
data | A reference to the data structure of the data to be written |
Definition at line 260 of file us_dataIO.cpp.
|
staticprivate |
Definition at line 414 of file us_dataIO.cpp.
|
static |
A constant value that identifies the format of the auc raw data. Internal programs use this value to determine if the format of the file is known.
Definition at line 31 of file us_dataIO.h.