16 ionId=rng.
addIon(
"FeO",
"FeO",c);
20 rangeId = rng.
addRange(55.9+16.0,56.3+16.0,ionId);
27 if(massTable.open(
"../data/naturalAbundance.xml"))
29 cerr <<
"unable to execute test, could not find abundance data" << endl;
36 cerr <<
"Unable to compute charge state, thats not right" << endl;
37 TEST(
false,
"charge guess failed");
40 TEST(charge ==1,
"Check charge state guess");
unsigned int addIon(const std::string &shortName, const std::string &longName, const RGBf &ionCol)
Add the ion to the database returns ion ID if successful, -1 otherwise.
Data holder for colour as float.
bool guessChargeState(unsigned int rangeId, const AtomProbe::AbundanceData &massTable, unsigned int &charge, float tolerance=0.5f) const
Guess the charge state for the ion that corresponds to the given range's midpoint.
bool isSelfConsistent() const
Performs checks for self consistency.
Data storage and retrieval class for "ranging" a spectra, where overlapping ranges are permitted...
Class to load abundance information for natural isotopes.
Data storage and retrieval class for various range files.
unsigned int addRange(float start, float end, unsigned int ionID)
Add a range to the rangefile. Returns ID number of added range.