Skip to content

Commit

Permalink
Updated SpectraFileAveraging.cs to include the ScanFilter parameter
Browse files Browse the repository at this point in the history
in the MsDataScan constructor, replacing null values. This change
ensures that the ScanFilter property is properly set, improving the
accuracy and completeness of the scan data.
  • Loading branch information
nbollis committed Oct 25, 2024
1 parent 6c18e9f commit f655238
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mzLib/SpectralAveraging/Algorithms/SpectraFileAveraging.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ private static MsDataScan[] AverageAll(IReadOnlyCollection<MsDataScan> scans, Sp
// create output
MsDataScan averagedScan = new(averagedSpectrum, 1, representativeScan.OneBasedScanNumber,
representativeScan.IsCentroid, representativeScan.Polarity, scans.Select(p => p.RetentionTime).Average(),
averagedSpectrum.Range, null, representativeScan.MzAnalyzer, scans.Select(p => p.TotalIonCurrent).Average(),
averagedSpectrum.Range, representativeScan.ScanFilter, representativeScan.MzAnalyzer, scans.Select(p => p.TotalIonCurrent).Average(),
representativeScan.InjectionTime, null, representativeScan.NativeId);
MsDataScan[] msDataScans = { averagedScan };
return msDataScans;
Expand Down Expand Up @@ -129,7 +129,8 @@ private static MsDataScan GetAveragedDataScanFromAveragedSpectrum(MzSpectrum ave
centralScan.IsCentroid,
centralScan.Polarity,
centralScan.RetentionTime,
averagedSpectrum.Range, null,
averagedSpectrum.Range,
centralScan.ScanFilter,
centralScan.MzAnalyzer,
averagedSpectrum.SumOfAllY,
centralScan.InjectionTime,
Expand Down

0 comments on commit f655238

Please sign in to comment.