def METHOD_NAME(raiseExceptions = raiseExceptions, intensityRatios = intensityRatios, 
        statsOnly = statsOnly, pl = pl, npSize = npSize, npomTypes = npomTypes, consolidateScans = consolidateScans,
        customScan = customScan, extractFirst = extractFirst, avgZScans = avgZScans, upperCutoff = upperCutoff, 
        lowerCutoff = lowerCutoff,startSpec = startSpec, finishSpec = finishSpec):
    print('\tModules imported')
    absoluteStartTime = time.time()
    if statsOnly == True:
        outputFileName = mpf.findH5File(os.getcwd(), nameFormat = 'MultiPeakFitOutput', mostRecent = True)#finds the most recent file with given name format
        mpf.doStats(outputFileName, stacks = False, pl = pl, npomTypes = npomTypes, intensityRatios = intensityRatios, 
                    upperCutoff = upperCutoff, lowerCutoff = lowerCutoff)
    else:
        #if consolidateScans == True:
        #    cdf.consoliData(os.getcwd())
        if extractFirst == True:
            summaryFile = cdf.extractAllSpectra(os.getcwd(), returnIndividual = True, start = startSpec,
                                                finish = finishSpec, raiseExceptions = raiseExceptions, customScan = customScan,
                                                consolidated = consolidateScans, avgZScans = avgZScans)#condenses Z-stack (inc. background subtraction and referencing) for each particle and makes summary file
            if pl == True:
                summaryFile, pl = cdf.transferPlSpectra(os.getcwd(), startWl = 505, start = startSpec,
                                                    finish = finishSpec)#background subtracts each PL spectra and transfers them to the existing summary file
        #summaryFile = 'summary.h5' #use this instead of the above functions if you already have a summary file
        if raiseExceptions == True:
            outputFileName = mpf.createOutputFile('MultiPeakFitOutput')
            mpf.fitAllSpectra(os.getcwd(), outputFileName, npSize = npSize, first = startSpec, last = finishSpec,
                              pl = pl, closeFigures = True, stats = True, npomTypes = npomTypes,
                              raiseExceptions = raiseExceptions, raiseSpecExceptions = raiseExceptions, 
                              intensityRatios = intensityRatios, upperCutoff = upperCutoff, lowerCutoff = lowerCutoff)
            print('\nData fitting complete')
        else:
            try:
                outputFileName = mpf.createOutputFile('MultiPeakFitOutput')
                mpf.fitAllSpectra(os.getcwd(), outputFileName, npSize = npSize, first = startSpec, last = finishSpec,
                                  pl = pl, closeFigures = True, stats = True, npomTypes = npomTypes, lowerCutoff = lowerCutoff,
                                  raiseExceptions = raiseExceptions, raiseSpecExceptions = raiseExceptions, 
                                  intensityRatios = intensityRatios, upperCutoff = upperCutoff)
                print('\nData fitting complete')
            except Exception as e:
                print('\nData fitting failed because %s' % (e))
    plt.close('all')
    absoluteEndTime = time.time()
    timeElapsed = absoluteEndTime - absoluteStartTime
    hours = int(old_div(timeElapsed, 3600))
    mins = int(np.round(old_div((timeElapsed % 3600),60)))
    secs = int(np.round(timeElapsed % 60))
    if hours > 0:
        print('\nM8 that took ages. %s hours %s min %s sec' % (hours, mins, secs))
    else:
        print('\nFinished in %s min %s sec' % (mins, secs))