private MsDataFileImpl GetDataFile(bool ignoreZeroIntensityPoints) { if (_dataFile == null) { if (DataFilePath is MsDataFilePath) { string dataFilePath = FindDataFilePath(); var lockMassParameters = DataFilePath.GetLockMassParameters(); if (dataFilePath == null) { throw new FileNotFoundException(string.Format( Resources .ScanProvider_GetScans_The_data_file__0__could_not_be_found__either_at_its_original_location_or_in_the_document_or_document_parent_folder_, DataFilePath)); } int sampleIndex = SampleHelp.GetPathSampleIndexPart(dataFilePath); if (sampleIndex == -1) { sampleIndex = 0; } // Full-scan extraction always uses SIM as spectra _dataFile = new MsDataFileImpl(dataFilePath, sampleIndex, lockMassParameters, true, combineIonMobilitySpectra: DataFilePath.GetCombineIonMobilitySpectra(), requireVendorCentroidedMS1: DataFilePath.GetCentroidMs1(), requireVendorCentroidedMS2: DataFilePath.GetCentroidMs2(), ignoreZeroIntensityPoints: ignoreZeroIntensityPoints); } else { _dataFile = DataFilePath.OpenMsDataFile(true, 0, null, ignoreZeroIntensityPoints); } } return(_dataFile); }
private MsDataFileImpl GetDataFile(bool ignoreZeroIntensityPoints) { if (_dataFile == null) { const bool simAsSpectra = true; // SIM always as spectra here const bool preferOnlyMs1 = false; // Open with all available spectra indexed if (DataFilePath is MsDataFilePath) { string dataFilePath = FindDataFilePath(); var lockMassParameters = DataFilePath.GetLockMassParameters(); if (dataFilePath == null) { throw new FileNotFoundException(string.Format( Resources .ScanProvider_GetScans_The_data_file__0__could_not_be_found__either_at_its_original_location_or_in_the_document_or_document_parent_folder_, DataFilePath)); } int sampleIndex = SampleHelp.GetPathSampleIndexPart(dataFilePath); if (sampleIndex == -1) { sampleIndex = 0; } // Full-scan extraction always uses SIM as spectra _dataFile = new MsDataFileImpl(dataFilePath, sampleIndex, lockMassParameters, simAsSpectra, combineIonMobilitySpectra: _cachedFile.HasCombinedIonMobility, requireVendorCentroidedMS1: _cachedFile.UsedMs1Centroids, requireVendorCentroidedMS2: _cachedFile.UsedMs2Centroids, ignoreZeroIntensityPoints: ignoreZeroIntensityPoints); } else { _dataFile = DataFilePath.OpenMsDataFile(simAsSpectra, preferOnlyMs1, _cachedFile.UsedMs1Centroids, _cachedFile.UsedMs2Centroids, ignoreZeroIntensityPoints); } } return(_dataFile); }