Skip to content

Commit dd53fd0

Browse files
authored
Merge pull request #249 from AdityaSavara/TuningCorrectorBugCheck
Tuning corrector bug fix
2 parents c43c7f8 + a0fcf20 commit dd53fd0

36 files changed

+826
-1215
lines changed

DefaultUserInput.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
#To change delete background average/slope based on time-interval, input below information below. 'yes' enables 'no' disables
9595
UserChoices['linearBaselineCorrectionSemiAutomatic']['on'] = 'no' #selection can be 'yes' or 'no'
9696
UserChoices['linearBaselineCorrectionSemiAutomatic']['baselineType'] = ['linear'] #baselineType may be either 'flat' or 'linear'
97-
# if you would like to apply this correction to all fragments, leave as []
97+
# if you would like to apply this correction to all fragments, leave below as []
9898
UserChoices['linearBaselineCorrectionSemiAutomatic']['massesToBackgroundCorrect'] = [2, 18, 27, 28, 31, 39, 41, 44, 57, 70] #mflist: enter mass list delimited With commas [m1, m2, m3]
9999
# to apply a uniform time range to all fragments, only insert one time range as such [[x,y]]
100100
UserChoices['linearBaselineCorrectionSemiAutomatic']['earlyBaselineTimes'] = [[177.0, 177.1]] # to apply different times for each fragment enter time pairs as such [[x,y],[z,w]..]
@@ -157,6 +157,8 @@
157157
UserChoices['measuredReferenceYorN']['on'] ='no'
158158
UserChoices['measuredReferenceYorN']['referenceFileExistingTuning'] =['ReferenceCollected.csv','xyyy'] #This is the pattern that will be changed.
159159
UserChoices['measuredReferenceYorN']['referenceFileDesiredTuning'] =['ReferenceLiterature.csv','xyyy'] #This is what the pattern will look more like after everything is done.
160+
UserChoices['measuredReferenceYorN']['tuningCorrectorGasMixtureMoleculeNames'] =[] #Optional: Special case, When using tuning corrector with a measured gas mixture spectrum molecule names must be provided
161+
UserChoices['measuredReferenceYorN']['tuningCorrectorGasMixtureConcentrations'] =[] #Optional: Special case, When using tuning corrector with a measured gas mixture spectrum concetrations must be provided
160162
#The reference correction coefficients are always used. If measuredReferenceYorN is 'yes' then the coefficients are overwritten and a new reference pattern is also generated to look more like the "Literature" case.
161163
UserChoices['measuredReferenceYorN']['referenceCorrectionCoefficients'] = {'A': 0.0, 'B': 0.0, 'C': 1.0}
162164
#default is 'A': 0.0, 'B': 0.0, 'C': 1.0. Used as.... Factor = A*X^2 + B*X + C, so A=0,B=0,C=1.0 means the final factor is 1.0 and independent of molecular weight.

MSRESOLVE.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1220,7 +1220,7 @@ def ReferenceInputPreProcessing(ReferenceData, verbose=True):
12201220
#Wanted to do something like "if list(G.referenceCorrectionCoefficients) != [0,0,1]:" but can't do it out here. Can do it inside function.
12211221
ReferenceData.standardized_reference_patterns, ReferenceData.standardized_reference_patterns_tuning_uncertainties = TuningCorrector(ReferenceData.standardized_reference_patterns,
12221222
G.referenceCorrectionCoefficients,G.referenceCorrectionCoefficients_cov,
1223-
G.referenceFileDesiredTuning, G.referenceFileExistingTuning,
1223+
G.referenceFileExistingTuning, G.referenceFileDesiredTuning,
12241224
G.measuredReferenceYorN)
12251225
#Now check if uncertainties already exist, and if they do then the two uncertainties need to be combined. Else, made equal.
12261226
try:

UnitTests/TuningCorrector/Exported10TuningCorrector_absolute_standard_uncertainties.csv

Lines changed: 0 additions & 56 deletions
This file was deleted.

UnitTests/TuningCorrector/Exported11StandardizeReferencePattern.csv

Lines changed: 0 additions & 56 deletions
This file was deleted.

UnitTests/TuningCorrector/Exported12StandardizeReferencePattern_absolute_standard_uncertainties.csv

Lines changed: 0 additions & 56 deletions
This file was deleted.

0 commit comments

Comments
 (0)