width_delay_beam_experiment/analysis_script.py
def main():
    '''
    This is the main function -- it calls all the specified functions and
    methods and completes the analysis.
    '''
    # The following lines create the waveform object, load in the data
    # and then does the analysis. It is important that the analysis code
    # is called in this order -- with the exception of ...calculate_P()
    # this is the only analysis method which has no dependencies.
    # I should put exceptions / error messages in DataAnalysis.py to
    # outline this fact, but I'm too lazy at the moment.
    waveform = DataAnalysis.Waveform()
    waveform.load(data_path, filename_sample)
    waveform.clean(trim_start=15000)
    analyzed_waveform = DataAnalysis.Analyzer(waveform)
    analyzed_waveform.calculate_envelope()
    analyzed_waveform.calculate_bunchArea_diff()
    analyzed_waveform.calculate_P()

    # Call the plotting functions
#    plot_noise(data_path, filename_noise, save_path='.\\plots\\')
#    plot_sample_waveform(analyzed_waveform, save_path='.\\plots\\')

    # Do the analysis on ALL the data and plot the results
    analyzed_wave_list = batch_analyze(data_path)
    batch_plot_results(analyzed_wave_list)

    This is the main function -- it calls all the specified functions and
    methods and completes the analysis.
    
This is the main function -- it calls all the specified functions and
methods and completes the analysis.
This is the main function -- it calls all the specified functions and methods and completes the analysis .
def main():
    waveform = DataAnalysis.Waveform()
    waveform.load(data_path, filename_sample)
    waveform.clean(trim_start=15000)
    analyzed_waveform = DataAnalysis.Analyzer(waveform)
    analyzed_waveform.calculate_envelope()
    analyzed_waveform.calculate_bunchArea_diff()
    analyzed_waveform.calculate_P()
    analyzed_wave_list = batch_analyze(data_path)
    batch_plot_results(analyzed_wave_list)
def main ( ) : waveform = DataAnalysis . Waveform ( ) waveform . load ( data_path , filename_sample ) waveform . clean ( trim_start = 15000 ) analyzed_waveform = DataAnalysis . Analyzer ( waveform ) analyzed_waveform . calculate_envelope ( ) analyzed_waveform . calculate_bunchArea_diff ( ) analyzed_waveform . calculate_P ( ) analyzed_wave_list = batch_analyze ( data_path ) batch_plot_results ( analyzed_wave_list )
This is the main function -- it calls all the specified functions and
methods and completes the analysis.
This is the main function -- it calls all the specified functions and methods and completes the analysis .
'''
    This is the main function -- it calls all the specified functions and
    methods and completes the analysis.
    ''' # The following lines create the waveform object, load in the data # and then does the analysis. It is important that the analysis code # is called in this order -- with the exception of ...calculate_P() # this is the only analysis method which has no dependencies. # I should put exceptions / error messages in DataAnalysis.py to # outline this fact, but I'm too lazy at the moment. # Call the plotting functions #    plot_noise(data_path, filename_noise, save_path='.\\plots\\') #    plot_sample_waveform(analyzed_waveform, save_path='.\\plots\\') # Do the analysis on ALL the data and plot the results