ProteoWizard
|
Class for binary storage of complex frequency data. More...
#include <FrequencyData.hpp>
Public Types | |
types | |
typedef std::vector < FrequencyDatum > | container |
typedef container::iterator | iterator |
typedef container::const_iterator | const_iterator |
Public Member Functions | |
instantiation | |
FrequencyData () | |
FrequencyData (const std::string &filename, IOMode mode=Automatic) | |
FrequencyData (const FrequencyData &that, const_iterator begin, const_iterator end) | |
FrequencyData (const FrequencyData &that, const_iterator center, int radius) | |
~FrequencyData () | |
I/O | |
void | read (const std::string &filename, IOMode mode=Automatic) |
void | read (std::istream &is, IOMode mode=Binary) |
void | write (const std::string &filename, IOMode mode=Binary) const |
void | write (std::ostream &os, IOMode mode=Binary) const |
data access | |
const container & | data () const |
const access to underlying data | |
container & | data () |
non-const access to underlying data – must call analyze() to recache after any changes | |
metadata | |
int | scanNumber () const |
void | scanNumber (int value) |
double | retentionTime () const |
void | retentionTime (double value) |
const CalibrationParameters & | calibrationParameters () const |
void | calibrationParameters (const CalibrationParameters &cp) |
double | observationDuration () const |
void | observationDuration (double value) |
double | noiseFloor () const |
void | noiseFloor (double value) |
data transformation | |
void | transform (double shift, std::complex< double > scale) |
transform all underlying data: (x,y) -> (x+shift,y*scale) | |
double | shift () const |
return current shift of data (compared to original) | |
std::complex< double > | scale () const |
return current scale of data (compared to original) | |
void | normalize () |
normalize by transform( -max.x, 1/abs(max.y) ) | |
void | operator+= (const FrequencyData &that) |
addition | |
analysis | |
void | analyze () |
recache statistics calculations after any direct data changes via non-const data() | |
const_iterator | max () const |
returns an iterator to FrequencyDatum with highest magnitude | |
double | mean () const |
double | meanSquare () const |
double | sumSquares () const |
double | variance () const |
double | cutoffNoiseFloor () const |
special calculation of noise floor for data with zero holes, e.g. | |
double | observationDurationEstimatedFromData () const |
calculation of the observation duration from the data | |
auxilliary | |
const_iterator | findNearest (double frequency) const |
Finds the FrequencyDatum nearest the desired frequency. |
Static Public Member Functions | |
auxilliary functions | |
static std::pair< double, double > | magnitudeSample (const FrequencyDatum &datum) |
Returns a <frequency,magnitude> pair. |
Private Member Functions | |
FrequencyData (FrequencyData &that) | |
Hidden to prevent unintended copying of large amounts of data. | |
FrequencyData & | operator= (FrequencyData &that) |
Hidden to prevent unintended copying of large amounts of data. |
Private Attributes | |
std::auto_ptr< Impl > | impl_ |
Class for binary storage of complex frequency data.
Stores raw frequency-domain data, as well as meta-data. Also includes basic access and analysis functions.
Definition at line 48 of file FrequencyData.hpp.
typedef std::vector<FrequencyDatum> pwiz::data::FrequencyData::container |
Definition at line 55 of file FrequencyData.hpp.
typedef container::iterator pwiz::data::FrequencyData::iterator |
Definition at line 56 of file FrequencyData.hpp.
typedef container::const_iterator pwiz::data::FrequencyData::const_iterator |
Definition at line 57 of file FrequencyData.hpp.
pwiz::data::FrequencyData::FrequencyData | ( | ) |
pwiz::data::FrequencyData::FrequencyData | ( | const std::string & | filename, |
IOMode | mode = Automatic |
||
) |
pwiz::data::FrequencyData::FrequencyData | ( | const FrequencyData & | that, |
const_iterator | begin, | ||
const_iterator | end | ||
) |
pwiz::data::FrequencyData::FrequencyData | ( | const FrequencyData & | that, |
const_iterator | center, | ||
int | radius | ||
) |
pwiz::data::FrequencyData::~FrequencyData | ( | ) |
|
private |
Hidden to prevent unintended copying of large amounts of data.
void pwiz::data::FrequencyData::read | ( | const std::string & | filename, |
IOMode | mode = Automatic |
||
) |
void pwiz::data::FrequencyData::read | ( | std::istream & | is, |
IOMode | mode = Binary |
||
) |
void pwiz::data::FrequencyData::write | ( | const std::string & | filename, |
IOMode | mode = Binary |
||
) | const |
Referenced by test().
void pwiz::data::FrequencyData::write | ( | std::ostream & | os, |
IOMode | mode = Binary |
||
) | const |
const container& pwiz::data::FrequencyData::data | ( | ) | const |
const access to underlying data
Referenced by initializeWithTestData(), test(), testAddition(), testData(), testData2_LocalMax(), testData2_Parabola(), testFind(), and testNoiseFloorVarianceCalculation().
container& pwiz::data::FrequencyData::data | ( | ) |
non-const access to underlying data – must call analyze() to recache after any changes
int pwiz::data::FrequencyData::scanNumber | ( | ) | const |
Referenced by test().
void pwiz::data::FrequencyData::scanNumber | ( | int | value | ) |
double pwiz::data::FrequencyData::retentionTime | ( | ) | const |
Referenced by test().
void pwiz::data::FrequencyData::retentionTime | ( | double | value | ) |
const CalibrationParameters& pwiz::data::FrequencyData::calibrationParameters | ( | ) | const |
Referenced by initializeWithTestData(), and test().
void pwiz::data::FrequencyData::calibrationParameters | ( | const CalibrationParameters & | cp | ) |
double pwiz::data::FrequencyData::observationDuration | ( | ) | const |
Referenced by initializeWithTestData(), and test().
void pwiz::data::FrequencyData::observationDuration | ( | double | value | ) |
double pwiz::data::FrequencyData::noiseFloor | ( | ) | const |
Referenced by test(), and testNoiseFloor().
void pwiz::data::FrequencyData::noiseFloor | ( | double | value | ) |
void pwiz::data::FrequencyData::transform | ( | double | shift, |
std::complex< double > | scale | ||
) |
transform all underlying data: (x,y) -> (x+shift,y*scale)
Referenced by test(), and testAddition().
double pwiz::data::FrequencyData::shift | ( | ) | const |
return current shift of data (compared to original)
Referenced by test().
std::complex<double> pwiz::data::FrequencyData::scale | ( | ) | const |
return current scale of data (compared to original)
Referenced by test(), and testData().
void pwiz::data::FrequencyData::normalize | ( | ) |
normalize by transform( -max.x, 1/abs(max.y) )
Referenced by test(), and testData().
void pwiz::data::FrequencyData::operator+= | ( | const FrequencyData & | that | ) |
addition
void pwiz::data::FrequencyData::analyze | ( | ) |
recache statistics calculations after any direct data changes via non-const data()
Referenced by initializeWithTestData(), test(), testFind(), and testNoiseFloorVarianceCalculation().
const_iterator pwiz::data::FrequencyData::max | ( | ) | const |
returns an iterator to FrequencyDatum with highest magnitude
Referenced by test(), and testData().
double pwiz::data::FrequencyData::mean | ( | ) | const |
Referenced by test().
double pwiz::data::FrequencyData::meanSquare | ( | ) | const |
Referenced by test().
double pwiz::data::FrequencyData::sumSquares | ( | ) | const |
Referenced by test().
double pwiz::data::FrequencyData::variance | ( | ) | const |
Referenced by test(), and testNoiseFloor().
double pwiz::data::FrequencyData::cutoffNoiseFloor | ( | ) | const |
special calculation of noise floor for data with zero holes, e.g.
data obtained from RAW file m/z-intensity pairs
Referenced by testNoiseFloorVarianceCalculation().
double pwiz::data::FrequencyData::observationDurationEstimatedFromData | ( | ) | const |
calculation of the observation duration from the data
Referenced by test().
const_iterator pwiz::data::FrequencyData::findNearest | ( | double | frequency | ) | const |
Finds the FrequencyDatum nearest the desired frequency.
Referenced by testFind().
|
static |
Returns a <frequency,magnitude> pair.
|
private |
Hidden to prevent unintended copying of large amounts of data.
|
private |
Definition at line 156 of file FrequencyData.hpp.