65 if (!File::exists(filename))
69 else if (!File::readable(filename))
85 while (spectrum.size() < acqus.
getSize())
90 spectrum.push_back(p);
98 spectrum.
setType(SpectrumSettings::SpectrumType::PROFILE);
99 spectrum.
setNativeID(
"spectrum=xsd:" + [](std::string s){ StringUtils::remove(s,
'<'); StringUtils::remove(s,
'>');
return s; }(acqus.
getParam(
"$ID_raw")));
103 instrument_settings.
setScanMode(InstrumentSettings::ScanMode::MASSSPECTRUM);
106 if (acqus.
getParam(
".IONIZATION MODE") ==
"LD+")
108 instrument_settings.
setPolarity(IonSource::Polarity::POSITIVE);
110 else if (acqus.
getParam(
".IONIZATION MODE") ==
"LD-")
112 instrument_settings.
setPolarity(IonSource::Polarity::NEGATIVE);
116 instrument_settings.
setPolarity(IonSource::Polarity::POLNULL);
126 source_file.
setPathToFile(StringUtils::prefix(filename, filename.length() - 3));
128 source_file.
setFileType(
"Xmass analysis file (fid)");
133 software.
setName(
"FlexControl");
134 std::string fc_ver = acqus.
getParam(
"$FCVer");
135 if (StringUtils::hasPrefix(fc_ver,
"<flexControl "))
137 fc_ver = StringUtils::suffix(fc_ver,
' ');
139 if (StringUtils::hasSuffix(fc_ver,
">"))
141 fc_ver = StringUtils::prefix(fc_ver,
'>');
144 software.
setMetaValue(
"Acquisition method",
DataValue([](std::string s){ StringUtils::remove(s,
'<'); StringUtils::remove(s,
'>');
return s; }(acqus.
getParam(
"$ACQMETH"))));
146 std::set<DataProcessing::ProcessingAction> actions;
147 actions.insert(DataProcessing::SMOOTHING);
148 actions.insert(DataProcessing::BASELINE_REDUCTION);
149 actions.insert(DataProcessing::CALIBRATION);
153 std::vector< std::shared_ptr< DataProcessing> > data_processing_vector;
154 data_processing_vector.push_back( std::shared_ptr< DataProcessing>(
new DataProcessing(data_processing)) );
168 Internal::AcqusHandler acqus(StringUtils::prefix(filename, filename.length() - 3) + std::string(
"acqus"));
175 instrument.
setModel([](std::string s){ StringUtils::remove(s,
'<'); StringUtils::remove(s,
'>');
return s; }(acqus.
getParam(
"$InstrID")));
177 std::vector<IonSource> & ionSourceList = instrument.
getIonSources();
178 ionSourceList.clear();
179 ionSourceList.resize(1);
180 if (acqus.
getParam(
".INLET") ==
"DIRECT")
182 ionSourceList[0].setInletType(IonSource::InletType::DIRECT);
186 ionSourceList[0].setInletType(IonSource::InletType::INLETNULL);
187 ionSourceList[0].setIonizationMethod(IonSource::IonizationMethod::MALDI);
189 if (acqus.
getParam(
".IONIZATION MODE") ==
"LD+")
191 ionSourceList[0].setPolarity(IonSource::Polarity::POSITIVE);
193 else if (acqus.
getParam(
".IONIZATION MODE") ==
"LD-")
195 ionSourceList[0].setPolarity(IonSource::Polarity::NEGATIVE);
199 ionSourceList[0].setPolarity(IonSource::Polarity::POLNULL);
201 ionSourceList[0].setMetaValue(
"MALDI target reference",
DataValue([](std::string s){ StringUtils::remove(s,
'<'); StringUtils::remove(s,
'>');
return s; }(acqus.
getParam(
"$TgIDS"))));
202 ionSourceList[0].setOrder(0);
204 std::vector<MassAnalyzer> & massAnalyzerList = instrument.
getMassAnalyzers();
205 massAnalyzerList.clear();
206 massAnalyzerList.resize(1);
207 if (acqus.
getParam(
".SPECTROMETER TYPE") ==
"TOF")
209 massAnalyzerList[0].setType(MassAnalyzer::AnalyzerType::TOF);
213 massAnalyzerList[0].setType(MassAnalyzer::AnalyzerType::ANALYZERNULL);
217 date.
set([](std::string s){ StringUtils::remove(s,
'<'); StringUtils::remove(s,
'>');
return s; }(acqus.
getParam(
"$AQ_DATE")));
Description of the combination of raw data to a single spectrum.
Definition AcquisitionInfo.h:29
void setMethodOfCombination(const std::string &method_of_combination)
sets the method of combination
Description of the applied preprocessing steps.
Definition DataProcessing.h:28
void setCompletionTime(const DateTime &completion_time)
sets the time of completion taking a DateTime object
void setSoftware(const Software &software)
sets the software used for processing
void setProcessingActions(const std::set< ProcessingAction > &actions)
sets the description of the applied processing
Class to hold strings, numeric values, lists of strings and lists of numeric values.
Definition DataValue.h:32
DateTime Class.
Definition DateTime.h:31
void set(UInt month, UInt day, UInt year, UInt hour, UInt minute, UInt second)
sets data from six integers
File not found exception.
Definition Exception.h:475
File not readable exception.
Definition Exception.h:501
General IOException.
Definition Exception.h:541
Not implemented exception.
Definition Exception.h:400
Description of the experimental settings.
Definition ExperimentalSettings.h:36
const Instrument & getInstrument() const
returns a const reference to the MS instrument description
void setDateTime(const DateTime &date)
sets the date the experiment was performed
Description of the settings a MS Instrument was run with.
Definition InstrumentSettings.h:24
void setPolarity(IonSource::Polarity polarity)
sets the polarity
void setZoomScan(bool zoom_scan)
sets if this scan is a zoom (enhanced resolution) scan
void setScanMode(ScanMode scan_mode)
sets the scan mode
Description of a MS instrument.
Definition Instrument.h:40
void setModel(const std::string &model)
sets the instrument model
const std::vector< IonSource > & getIonSources() const
returns a const reference to the ion source list
const std::vector< MassAnalyzer > & getMassAnalyzers() const
returns a const reference to the mass analyzer list
void setName(const std::string &name)
sets the name of the instrument
void setVendor(const std::string &vendor)
sets the instrument vendor
Read-only acqus File handler for XMass Analysis.
Definition AcqusHandler.h:27
Size getSize() const
Get size of spectrum.
std::string getParam(const std::string ¶m)
Read param as string.
double getPosition(Size index) const
Conversion from index to MZ ratio using internal calibration params.
Read-only fid File handler for XMass Analysis.
Definition FidHandler.h:27
Size getIndex() const
Get index of current position (without position moving).
Size getIntensity()
Get intensity of current position and move to next position.
In-Memory representation of a mass spectrometry run.
Definition MSExperiment.h:49
const ExperimentalSettings & getExperimentalSettings() const
returns the meta information of this experiment (const access)
The representation of a 1D spectrum.
Definition MSSpectrum.h:44
void setMSLevel(UInt ms_level)
Sets the MS level.
void setName(const std::string &name)
Sets the name.
void clear(bool clear_meta_data)
Clears all data and meta data.
void setRT(double rt)
Sets the absolute retention time (in seconds)
A 1-dimensional raw data point or peak.
Definition Peak1D.h:30
void setIntensity(IntensityType intensity)
Mutable access to the data point intensity (height)
Definition Peak1D.h:86
void setPosition(PositionType const &position)
Mutable access to the position.
Definition Peak1D.h:125
float IntensityType
Intensity type.
Definition Peak1D.h:38
Base class for all classes that want to report their progress.
Definition ProgressLogger.h:27
Description of the software used for processing.
Definition Software.h:26
void setName(const std::string &name)
Sets the name of the software.
void setVersion(const std::string &version)
Sets the software version.
Description of a file location, used to store the origin of (meta) data.
Definition SourceFile.h:23
void setPathToFile(const std::string &path_path_to_file)
sets the file path
void setNameOfFile(const std::string &name_of_file)
sets the file name
void setFileType(const std::string &file_type)
sets the file type
void setFileSize(float file_size)
sets the file size in MB
void setInstrumentSettings(const InstrumentSettings &instrument_settings)
sets the instrument settings of the current spectrum
void setType(SpectrumType type)
sets the spectrum type
void setSourceFile(const SourceFile &source_file)
sets the source file
void setDataProcessing(const std::vector< DataProcessingPtr > &data_processing)
sets the description of the applied processing
void setAcquisitionInfo(const AcquisitionInfo &acquisition_info)
sets the acquisition info
void setComment(const std::string &comment)
sets the free-text comment
void setNativeID(const std::string &native_id)
sets the native identifier for the spectrum, used by the acquisition software.
Definition XMassFile.h:43
void importExperimentalSettings(const std::string &filename, PeakMap &exp)
Import settings from a XMass file.
Definition XMassFile.h:166
~XMassFile() override
Destructor.
XMassFile()
Default constructor.
void store(const std::string &, const MSSpectrum &)
Stores a spectrum in a XMass file (not available)
Definition XMassFile.h:226
void load(const std::string &filename, MSSpectrum &spectrum)
Definition XMassFile.h:58
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19