UltraScan III
List of all members | Classes | Public Member Functions | Private Slots | Private Attributes
US_MwlData Class Reference

#include "us_mwl_data.h"

Inheritance diagram for US_MwlData:
Inheritance graph
[legend]
Collaboration diagram for US_MwlData:
Collaboration graph
[legend]

Classes

class  DataHdr
 

Public Member Functions

 US_MwlData ()
 
bool import_data (QString &, QLineEdit *)
 Import data from a specified directory. More...
 
void load_mwl (QVector< US_DataIO::RawData > &)
 Load mwl internal variables from loaded rawDatas. More...
 
int rvalues (int &, int &, QVector< double > &)
 Return reading values for given triple, scan. More...
 
int lambdas (QVector< int > &, int=-1)
 Return lambda values. More...
 
int lambdas_raw (QVector< int > &)
 Return lambda values for raw original. More...
 
int set_lambdas (int=0, int=0, int=-1)
 Update output lambdas by range redefinition. More...
 
int set_lambdas (QVector< int > &, int=-1)
 Update output lambdas by new vector specification. More...
 
int indexOfLambda (int)
 Match lambda in original list. More...
 
int cellchannels (QStringList &)
 Return list of cells/channels. More...
 
int build_rawData (QVector< US_DataIO::RawData > &)
 Build RawData vector. More...
 
int countOf (QString)
 A count of specified type. More...
 
QString cc_description (QString)
 Return the cell/channel description string. More...
 
void run_values (QString &, QString &)
 Return runID and runType string for the data. More...
 
void clear (void)
 Clear all the data structures. More...
 
int set_celchnx (int=0)
 Set the current cell/channel index. More...
 
int data_index (int=0, int=-1)
 Return the output data index of a wavelength in a channel. More...
 
int data_index (QString, int=-1)
 Return the output data index of a wavelength in a channel. More...
 
int data_index (QString, QString)
 Return the output data index of a wavelength in a channel. More...
 
int update_speedsteps (QVector< SP_SPEEDPROFILE > &)
 Update the speed profile for MWL data. More...
 
int raw_speeds (QVector< double > &)
 Return vector of raw speeds for MWL data scans. More...
 

Private Slots

int hword (char *)
 
int iword (char *)
 
float fword (char *)
 
double dword (char *)
 
void read_header (QDataStream &, DataHdr &)
 
void read_lambdas (QDataStream &, QVector< int > &, int &)
 
void read_rdata (QDataStream &, QVector< double > &, int &, int &)
 
void read_runxml (QDir, QString)
 
void mapCounts (void)
 

Private Attributes

QVector< QVector< double > > ri_readings
 Raw input readings. More...
 
QVector< int > ri_wavelns
 Raw input wavelengths. More...
 
QVector< QVector< int > > ex_wavelns
 Export Wavelengths, ea. cc. More...
 
QVector< double > r_rpms
 Raw RPMs from scans. More...
 
QVector< double > s_rpms
 Set RPMs from speed steps. More...
 
QVector< double > a_rpms
 Average RPMs from speed steps. More...
 
QVector< double > d_rpms
 Standard Deviation RPMs from steps. More...
 
QList< DataHdrheaders
 Mwl input file headers. More...
 
QStringList fpaths
 Input file paths. More...
 
QStringList fnames
 Input file names. More...
 
QStringList cells
 Input Cell strings. More...
 
QStringList cellchans
 Input Cell/Channel strings. More...
 
QStringList ccdescs
 Cell/Channel description strings. More...
 
QStringList triples
 Output triple strings ("1 / A / 280") More...
 
QStringList trnodes
 Output triple file nodes ("1.A.280") More...
 
QLineEdit * le_status
 Status report LineEdit. More...
 
QMap< QString, int > counts
 Map of counts ('File','Scan',...) More...
 
int nfile
 Number of input files. More...
 
int nscan
 Number of scans per triple. More...
 
int ncell
 Number of cells. More...
 
int nchan
 Number of channels. More...
 
int ncelchn
 Number of Cell/Channels. More...
 
int nlambda
 Number of wavelengths (output) More...
 
int nlamb_i
 Number of wavelengths (raw input) More...
 
int ntriple
 Number of triples (output) More...
 
int ntrip_i
 Number of triples (raw input) More...
 
int npoint
 Number radius points per scan. More...
 
int npointt
 Number points per triple. More...
 
int curccx
 Current cell/chan index. More...
 
int slambda
 Starting output lambda. More...
 
int elambda
 Ending output lambda. More...
 
int dbg_level
 Debug level. More...
 
bool is_absorb
 Flag if import is absorbance;. More...
 
double evers
 Experiment version number. More...
 
QString cur_dir
 Currently selected i/p data directory. More...
 
QString runID
 Run ID. More...
 
QString runType
 Run Type (always "RI") More...
 

Detailed Description

Class for holding Multi-WaveLength Data with functions for importing from raw files or loading from vectors of rawData.

Definition at line 21 of file us_mwl_data.h.

Constructor & Destructor Documentation

US_MwlData::US_MwlData ( )

Definition at line 11 of file us_mwl_data.cpp.

Member Function Documentation

int US_MwlData::build_rawData ( QVector< US_DataIO::RawData > &  allData)

Build RawData vector.

Parameters
allDataOutput vector of rawDatas built from MWL data
Returns
Number of triples in the data (size of allData)

Definition at line 814 of file us_mwl_data.cpp.

QString US_MwlData::cc_description ( QString  celchn)

Return the cell/channel description string.

Parameters
celchnCell/channel to examine (e.g.,"1 / A")
Returns
Description string for the specified channel

Definition at line 1072 of file us_mwl_data.cpp.

int US_MwlData::cellchannels ( QStringList &  celchns)

Return list of cells/channels.

Parameters
celchnsOutput cell/channels string list
Returns
Number of cell/channels in the list

Definition at line 807 of file us_mwl_data.cpp.

void US_MwlData::clear ( void  )

Clear all the data structures.

Definition at line 529 of file us_mwl_data.cpp.

int US_MwlData::countOf ( QString  key)

A count of specified type.

Parameters
keyKey string for which to map a value ("file",...)
Returns
Number of values for the array with given key

Definition at line 1064 of file us_mwl_data.cpp.

int US_MwlData::data_index ( int  waveln = 0,
int  ccx = -1 
)

Return the output data index of a wavelength in a channel.

Parameters
wavelnWavelength in cell/channel to index
ccxCell/channel index at which to search for wavelength
Returns
The output data index of the triple

Definition at line 1190 of file us_mwl_data.cpp.

int US_MwlData::data_index ( QString  clambda,
int  ccx = -1 
)

Return the output data index of a wavelength in a channel.

Parameters
clambdaWavelength (as string) in cell/channel to index
ccxCell/channel index at which to search for wavelength
Returns
The output data index of the triple

Definition at line 1206 of file us_mwl_data.cpp.

int US_MwlData::data_index ( QString  clambda,
QString  celchn 
)

Return the output data index of a wavelength in a channel.

Parameters
clambdaWavelength string for search in cell/channel
celchnCell/channel string for search of wavelength
Returns
The output data index of the triple

Definition at line 1212 of file us_mwl_data.cpp.

double US_MwlData::dword ( char *  cbuf)
privateslot

Definition at line 597 of file us_mwl_data.cpp.

float US_MwlData::fword ( char *  cbuf)
privateslot

Definition at line 579 of file us_mwl_data.cpp.

int US_MwlData::hword ( char *  cc)
privateslot

Definition at line 562 of file us_mwl_data.cpp.

bool US_MwlData::import_data ( QString &  mwldir,
QLineEdit *  lestat 
)

Import data from a specified directory.

Parameters
mwldirRaw MWL data directory
lestatStatus LineEdit pointer
Returns
Status of import (true->imported OK)

Definition at line 20 of file us_mwl_data.cpp.

int US_MwlData::indexOfLambda ( int  lambda)

Match lambda in original list.

Parameters
lambdaLambda value to find in the original import list
Returns
Index of the lambda match in the lambdas list

Definition at line 783 of file us_mwl_data.cpp.

int US_MwlData::iword ( char *  cbuf)
privateslot

Definition at line 571 of file us_mwl_data.cpp.

int US_MwlData::lambdas ( QVector< int > &  wls,
int  ccx = -1 
)

Return lambda values.

Parameters
wlsOutput lambdas vector for given channel
ccxCell/channel index to use (-1 -> current)
Returns
Number of lambdas for the cell/channel

Definition at line 498 of file us_mwl_data.cpp.

int US_MwlData::lambdas_raw ( QVector< int > &  wls)

Return lambda values for raw original.

Parameters
wlsOutput lambdas vector for the imported data
Returns
Number of lambdas in the imported MWL data

Definition at line 515 of file us_mwl_data.cpp.

void US_MwlData::load_mwl ( QVector< US_DataIO::RawData > &  allData)

Load mwl internal variables from loaded rawDatas.

Parameters
allDataVector of loaded rawDatas

Definition at line 337 of file us_mwl_data.cpp.

void US_MwlData::mapCounts ( void  )
privateslot

Definition at line 1086 of file us_mwl_data.cpp.

int US_MwlData::raw_speeds ( QVector< double > &  rrpms)

Return vector of raw speeds for MWL data scans.

Parameters
rrpmsReference for returned raw RPM values for each scan
Returns
The number of rpm values (scans) returned

Definition at line 1253 of file us_mwl_data.cpp.

void US_MwlData::read_header ( QDataStream &  ds,
DataHdr hd 
)
privateslot

Definition at line 604 of file us_mwl_data.cpp.

void US_MwlData::read_lambdas ( QDataStream &  ds,
QVector< int > &  wvs,
int &  klambda 
)
privateslot

Definition at line 645 of file us_mwl_data.cpp.

void US_MwlData::read_rdata ( QDataStream &  ds,
QVector< double > &  rvs,
int &  scnx,
int &  npoint 
)
privateslot

Definition at line 661 of file us_mwl_data.cpp.

void US_MwlData::read_runxml ( QDir  ddir,
QString  curdir 
)
privateslot

Definition at line 1104 of file us_mwl_data.cpp.

void US_MwlData::run_values ( QString &  arunid,
QString &  aruntype 
)

Return runID and runType string for the data.

Parameters
arunidReturned runID value for the data
aruntypeReturned runType value for the data ("RI")

Definition at line 1079 of file us_mwl_data.cpp.

int US_MwlData::rvalues ( int &  tripx,
int &  scanx,
QVector< double > &  rvs 
)

Return reading values for given triple, scan.

Parameters
tripxTriple index
scanxScan index
rvsOutput readings values vector
Returns
Index for next scan

Definition at line 483 of file us_mwl_data.cpp.

int US_MwlData::set_celchnx ( int  ccx = 0)

Set the current cell/channel index.

Parameters
ccxCell/channel index to set as the current one
Returns
The actual current cell/channel index in use

Definition at line 1181 of file us_mwl_data.cpp.

int US_MwlData::set_lambdas ( int  start = 0,
int  end = 0,
int  ccx = -1 
)

Update output lambdas by range redefinition.

Parameters
startStart lambda (0 -> first)
endEnd lambda (0 -> last)
ccxCell/channel index to use (-1 -> current)
Returns
Number of lambdas in the new lambda range

Definition at line 684 of file us_mwl_data.cpp.

int US_MwlData::set_lambdas ( QVector< int > &  wls,
int  ccx = -1 
)

Update output lambdas by new vector specification.

Parameters
wlsNew wavelengths vector to use for the channel
ccxCell/channel index to use (-1 -> current)
Returns
Number of lambdas in the new lambda vector

Definition at line 771 of file us_mwl_data.cpp.

int US_MwlData::update_speedsteps ( QVector< SP_SPEEDPROFILE > &  speedsteps)

Update the speed profile for MWL data.

Parameters
speedstepsReference to speed steps profile to update
Returns
The number of speed steps in the profile

Definition at line 1219 of file us_mwl_data.cpp.

Member Data Documentation

QVector< double > US_MwlData::a_rpms
private

Average RPMs from speed steps.

Definition at line 163 of file us_mwl_data.h.

QStringList US_MwlData::ccdescs
private

Cell/Channel description strings.

Definition at line 173 of file us_mwl_data.h.

QStringList US_MwlData::cellchans
private

Input Cell/Channel strings.

Definition at line 171 of file us_mwl_data.h.

QStringList US_MwlData::cells
private

Input Cell strings.

Definition at line 170 of file us_mwl_data.h.

QMap< QString, int > US_MwlData::counts
private

Map of counts ('File','Scan',...)

Definition at line 179 of file us_mwl_data.h.

QString US_MwlData::cur_dir
private

Currently selected i/p data directory.

Definition at line 201 of file us_mwl_data.h.

int US_MwlData::curccx
private

Current cell/chan index.

Definition at line 192 of file us_mwl_data.h.

QVector< double > US_MwlData::d_rpms
private

Standard Deviation RPMs from steps.

Definition at line 164 of file us_mwl_data.h.

int US_MwlData::dbg_level
private

Debug level.

Definition at line 195 of file us_mwl_data.h.

int US_MwlData::elambda
private

Ending output lambda.

Definition at line 194 of file us_mwl_data.h.

double US_MwlData::evers
private

Experiment version number.

Definition at line 199 of file us_mwl_data.h.

QVector< QVector< int > > US_MwlData::ex_wavelns
private

Export Wavelengths, ea. cc.

Definition at line 159 of file us_mwl_data.h.

QStringList US_MwlData::fnames
private

Input file names.

Definition at line 169 of file us_mwl_data.h.

QStringList US_MwlData::fpaths
private

Input file paths.

Definition at line 168 of file us_mwl_data.h.

QList< DataHdr > US_MwlData::headers
private

Mwl input file headers.

Definition at line 166 of file us_mwl_data.h.

bool US_MwlData::is_absorb
private

Flag if import is absorbance;.

Definition at line 197 of file us_mwl_data.h.

QLineEdit* US_MwlData::le_status
private

Status report LineEdit.

Definition at line 177 of file us_mwl_data.h.

int US_MwlData::ncelchn
private

Number of Cell/Channels.

Definition at line 185 of file us_mwl_data.h.

int US_MwlData::ncell
private

Number of cells.

Definition at line 183 of file us_mwl_data.h.

int US_MwlData::nchan
private

Number of channels.

Definition at line 184 of file us_mwl_data.h.

int US_MwlData::nfile
private

Number of input files.

Definition at line 181 of file us_mwl_data.h.

int US_MwlData::nlamb_i
private

Number of wavelengths (raw input)

Definition at line 187 of file us_mwl_data.h.

int US_MwlData::nlambda
private

Number of wavelengths (output)

Definition at line 186 of file us_mwl_data.h.

int US_MwlData::npoint
private

Number radius points per scan.

Definition at line 190 of file us_mwl_data.h.

int US_MwlData::npointt
private

Number points per triple.

Definition at line 191 of file us_mwl_data.h.

int US_MwlData::nscan
private

Number of scans per triple.

Definition at line 182 of file us_mwl_data.h.

int US_MwlData::ntrip_i
private

Number of triples (raw input)

Definition at line 189 of file us_mwl_data.h.

int US_MwlData::ntriple
private

Number of triples (output)

Definition at line 188 of file us_mwl_data.h.

QVector< double > US_MwlData::r_rpms
private

Raw RPMs from scans.

Definition at line 161 of file us_mwl_data.h.

QVector< QVector< double > > US_MwlData::ri_readings
private

Raw input readings.

Definition at line 157 of file us_mwl_data.h.

QVector< int > US_MwlData::ri_wavelns
private

Raw input wavelengths.

Definition at line 158 of file us_mwl_data.h.

QString US_MwlData::runID
private

Run ID.

Definition at line 202 of file us_mwl_data.h.

QString US_MwlData::runType
private

Run Type (always "RI")

Definition at line 203 of file us_mwl_data.h.

QVector< double > US_MwlData::s_rpms
private

Set RPMs from speed steps.

Definition at line 162 of file us_mwl_data.h.

int US_MwlData::slambda
private

Starting output lambda.

Definition at line 193 of file us_mwl_data.h.

QStringList US_MwlData::triples
private

Output triple strings ("1 / A / 280")

Definition at line 174 of file us_mwl_data.h.

QStringList US_MwlData::trnodes
private

Output triple file nodes ("1.A.280")

Definition at line 175 of file us_mwl_data.h.


The documentation for this class was generated from the following files: