gold.sumFullDFGs() #write sum of padded DFGs to file #gold.writeSumDFG('goldSumDFG.txt') #smooth the DFGs with a gaussian filter gold.smoothDFGs(5) #write smoothed padded DFGs to file #gold.writeSmoothedDFGs('goldSmoothedDFGs.txt') #plot the smoothed and raw DFGs gold.plotSmoothRawDFGs() #find the indices of where the reference signal falls off to guide truncation gold.findTruncateIndices() #truncate gold.truncateFullDFGs(gold) #write smoothed, padded, truncated DFGs to file #gold.writeTruncatedDFGs('goldTruncatedDFGs.txt') #plot the truncated DFGs gold.plotTruncatedDFGs() #sum the truncated DFGs gold.sumTruncatedDFGs() #plot the summed, truncated DFGS gold.plotSumTruncatedDFG()
os.chdir(input_path) # make sure files are in the data_input folder, then specify where the gold refs are gold = '20180124/endAu' gold_name = 'test_gold' gold_spec = Spectrum(gold) # argument for .removeCRs() is the threshold for removing cosmic rays gold_spec.removeCRs(200) gold_spec.subtractBGs() gold_spec.sumFullDFGs() gold_spec.plotDFGs() gold_spec.plotSumDFG() # argument for .smoothDFGs() is the strength(window size) of smoothing function gold_spec.smoothDFGs(5) gold_spec.plotSmoothRawDFGs() gold_spec.findTruncateIndices() gold_spec.truncateFullDFGs(gold_spec) gold_spec.plotTruncatedDFGs() gold_spec.sumTruncatedDFGs() gold_spec.plotSumTruncatedDFG() """ load sample, specify folder name """ os.chdir(input_path) sample = '20180124/expt/lipidspec' sample_name = 'test_sample' sample_spec = Spectrum(sample) # argument for .removeCRs() is the threshold for removing cosmic rays sample_spec.removeCRs(50)