""" Script to call plot_functions to make plots for a particular file """ import MirrorPlots.plot_functions as pf import matplotlib.pyplot as plt #pf.plot_data('test_data.csv', 'mm', debug=True, include_slave=True, # gantry_cutoff=True) #plot_functions.plot_data('M1L1_X_LimSwitchRpt.csv', 'um', gantry_cutoff=True, # by_index=True, debug=True) # Plot M1K3 X Data - includes slave pf.plot_data(\ '/reg/neh/home/sheppard/FlatMirrors/M1K3/M1K3_ScopeFiles/X_LimSwitchRpt_2019_9_18.csv', 'um', include_slave=True, gantry_cutoff=True, hl_roi=[(14.908, 924.665), (23629.5, 23633.1)], ll_roi=[(133.632, 1021.8), (15973.6, 15980)], pdf_title='TestData.pdf') input('Press <Return> to close') plt.close('all')
""" make_plots_m2l0.py Script to call plot_functions to make plots for a particular file """ import MirrorPlots.plot_functions as pf import matplotlib.pyplot as plt # Post-Install: ############################################################################## # Y Motion pf.plot_data( '/reg/neh/home/sheppard/FlatMirrors/Post-Install-Scope-Files/M2L0/Y_repeatability_2020_1_13.csv', 'um', gantry_cutoff=True, include_slave=True, pdf_title='M2L0/M2L0-Y-Repeatability.pdf') ############################################################################## # X Motion #pf.plot_data('/reg/neh/home/sheppard/FlatMirrors/Post-Install-Scope-Files/M2L0/X_repeatability_2020_1_13.csv', # 'um', gantry_cutoff=True, include_slave=True, pdf_title='M2L0/M2L0-X-Repeatability.pdf') ############################################################################## # Pitch Motion #pf.plot_data('/reg/neh/home/sheppard/FlatMirrors/Post-Install-Scope-Files/M2L0/Pitch-repeatability-2019_12_18.csv', # 'urad', gantry_cutoff=True, include_slave=True, pdf_title='M2L0/M2L0-Pitch-Repeatability.pdf') #pitch_data = pf.get_data('/reg/neh/home/sheppard/FlatMirrors/Post-Install-Scope-Files/M2L0/Pitch-repeatability-2019_12_18.csv',
# Plot Large Move Xup Slips with PLM Error Data #pf.plot_data(\ #'/reg/neh/home/sheppard/FlatMirrors/M2K3/M2K3_ScopeFiles/x_closedLoop_slip_PLMerror.csv', #'um', include_slave=True, gantry_cutoff=True) # Plot Y move after gantry re-alignment where heard loud noise #pf.plot_data(\ #'/reg/neh/home/sheppard/FlatMirrors/M2K3/M2K3_ScopeFiles/y_motion_gantry_realign_strange_ding_2019_10_29.csv', #'um', include_slave=True, gantry_cutoff=True) ############################################################################## # Plotting Data from after we got things working # X Motion: #pf.plot_data(\ #'/reg/neh/home/sheppard/FlatMirrors/M2K3/M2K3_ScopeFiles/Jackson-Project/X_LimToLim_JacksonProj_2019_12_10.csv', #'um', include_slave=True, gantry_cutoff=True, pdf_title='M2K3-X-PreInstallCheckoutPlots.pdf') # Y Motion #pf.plot_data(\ #'/reg/neh/home/sheppard/FlatMirrors-PreInstall-Checkouts/M2K3/Jackson-Project/Y_LLToHL_2019_12_10.csv', #'um', include_slave=True, gantry_cutoff=True, pdf_title='M2K3/M2K3-Y-PreInstallCheckoutPlots.pdf') # Pitch Motion pf.plot_data(\ '/reg/neh/home/sheppard/FlatMirrors-PreInstall-Checkouts/M2K3/Jackson-Project/Pitch_LimSwitchRpt_2019_12_11.csv', 'urad', include_slave=False, gantry_cutoff=True, pdf_title='M2K3/M2K3-Pitch-PreInstallCheckoutPlots.pdf') input('Press <Return> to close') plt.close('all')
""" Script to call plot_functions to make plots for a particular file """ import MirrorPlots.plot_functions as pf import matplotlib.pyplot as plt # Plot Small Moves Xup Slips Data #pf.plot_data(\ #'/reg/neh/home/sheppard/FlatMirrors/M2K3/M2K3_ScopeFiles/x_closedLoop_slipAt23600um.csv', #'um', include_slave=True, gantry_cutoff=True) # Plot Large Move Xup Slips Data #pf.plot_data(\ #'/reg/neh/home/sheppard/FlatMirrors/M2K3/M2K3_ScopeFiles/x_closedLoop_slipAT23600um_largeMove.csv', #'um', include_slave=True, gantry_cutoff=True) # Plot Large Move Xup Slips with PLM Error Data #pf.plot_data(\ #'/reg/neh/home/sheppard/FlatMirrors/M2K3/M2K3_ScopeFiles/x_closedLoop_slip_PLMerror.csv', #'um', include_slave=True, gantry_cutoff=True) # Plot Y move after gantry re-alignment where heard loud noise pf.plot_data(\ '/reg/neh/home/sheppard/FlatMirrors/M2K3/M2K3_ScopeFiles/y_motion_gantry_realign_strange_ding_2019_10_29.csv', 'um', include_slave=True, gantry_cutoff=True) input('Press <Return> to close') plt.close('all')
#ll_roi=[(-9.376, 412.916), (13517.3, 13519.5)], #pdf_title='M1K1-Y-LLPreInstallCheckoutPlots.pdf') # Plot Y Repeatability Data #pf.plot_and_zoom(\ #'/reg/neh/home/sheppard/FlatMirrors/M1K1/M1K1_ScopeFiles/Y_repeatability_2019_10_23.csv', #'um', pdf_title='M1K1-Y-Repeatability-PreInstallCheckoutPlots.pdf') # Plot Y 1 um Adjustment Data #pf.plot_and_zoom(\ #'/reg/neh/home/sheppard/FlatMirrors/M1K1/M1K1_ScopeFiles/Y_1um_adjust_2019_10_23.csv', #'um', pdf_title='M1K1-Y-1umAdjust-PreInstallCheckoutPlots.pdf') # Plot Encoder Noise Data pf.plot_data(\ '/reg/neh/home/sheppard/FlatMirrors-PreInstall-Checkouts/M1K1/Y_EncNoise_2019_10_23.csv', 'um', gantry_cutoff=True) ########################################################################### ########################################################################### # X Motion: # Plot X HL Data #pf.plot_data(\ #'/reg/neh/home/sheppard/FlatMirrors/M1K1/M1K1_ScopeFiles/X_HL_rpt_2019_10_23.csv', #'um', include_slave=True, gantry_cutoff=True, by_index=True, #move_start_indecesX=[1059, 2479, 8165, 9844, 18761, 24600, 29330, 31020, 35690, 37495], #peak_gantry_indecesX=[1218, 2675, 8326, 9964, 18913, 24669, 29482, 31097, 35842, 37572], #move_end_indecesX=[2213, 3994, 9505, 11340, 20254, 26125, 30640, 32410, 37000, 38900]) #hl_roi=[(-2.92, 464.72), (31758.4, 31769.4)], #pdf_title='M1K1-X-HLPreInstallCheckoutPlots.pdf')
#ll_roi=[(90.7599, 806.176), (14662.2, 14740.7)], #pdf_title='M1L0-Pitch-PreInstallCheckoutPlots.pdf') # Plot Pitch 1 um Adjustment #pf.plot_and_zoom(\ #'/reg/neh/home/sheppard/HOMSRefurbish/M1L0-PreInstall-Checkout/PitchCoarse_1_um_adj_9_4_19.csv', #'urad', pdf_title='M1L0-Pitch-1umAdjust-PreInstallCheckoutPlots.pdf') #pf.plot_and_zoom(\ #'/reg/neh/home/sheppard/HOMSRefurbish/M1L0-PreInstall-Checkout/PitchCoarse_1_um_adj_9_4_19.csv', #'urad', pdf_title='M1L0/M1L0-Pitch-1umAdjustRptAbility-PreInstallCheckoutPlots.pdf') pf.plot_data( '/reg/neh/home/sheppard/FlatMirrors/Post-Install-Scope-Files/M1L0/Pitch-repeatability-2019_12_18.csv', 'urad', gantry_cutoff=True, by_index=True, include_slave=False ) #, pdf_title='M1L0/Post-Install/M1L0-Pitch-Repeatability.pdf') pitch_data = pf.get_data( '/reg/neh/home/sheppard/FlatMirrors/Post-Install-Scope-Files/M1L0/Pitch-repeatability-2019_12_18.csv', 22, gantry_cutoff=True) pitch_tvals = pitch_data[0][0][9086:13373] pitch_actpos = pitch_data[0][1][9086:13373] pitch_setpos = pitch_data[0][2][9086:13373] rms_error = pf.calculate_rms_error(pitch_tvals, pitch_actpos, pitch_setpos) print(rms_error) input('Press <Return> to close') plt.close('all')
#peak_gantry_indecesY=[3680, 5262, 18066, 22591, 30910, 34548, 47689, 51273, 60447, 62485, 73242], #move_end_indecesY=[4453, 9250, 20597, 24210, 33600, 37209, 48789, 52197, 61677, 65509, 75055]) #hl_roi=[(-4.451, 743.181), (113550, 113560.2,)], #pdf_title='M1K2-Y-HLPreInstallCheckoutPlots.pdf') # Plot Y LL Data #pf.plot_data(\ #'/reg/neh/home/sheppard/FlatMirrors/M1K2/M1K2_ScopeFiles/Y_LL_LimSwitchRpt_2019_10_1.csv', #'um', include_slave=True, gantry_cutoff=True, #ll_roi=[(-21.2297, 872.42), (17933, 17942.5)], #pdf_title='M1K2-Y-LLPreInstallCheckoutPlots.pdf') # Plot X Data pf.plot_data(\ '/reg/neh/home/sheppard/FlatMirrors/M1K2/M1K2_ScopeFiles/X_LimSwitchRpt_2019_10_1.csv', 'um', include_slave=True, gantry_cutoff=True, by_index=True, move_start_indecesX=[8140, 22000, 36955, 53508, 68144, 86431, 98121, 113090, 121555], peak_gantry_indecesX=[10629, 24288, 37616, 53524, 68391, 87840, 98138, 115644, 121950], move_end_indecesX=[12050, 26054, 40845, 58282, 72060, 90843, 101968, 117954, 124861]) #hl_roi=[(-14.447, 1234.18), (22588, 22591.5)], #ll_roi=[(82.6332, 1290.52), (18280.8, 18295.9)], #pdf_title='M1K2-X-PreInstallCheckoutPlots.pdf') # Plot Pitch Data #pf.plot_data(\ #'/reg/neh/home/sheppard/FlatMirrors/M1K2/M1K2_ScopeFiles/Pitch_LimSwitchRpt_2019_10_1.csv', #'urad', gantry_cutoff=True, hl_roi=[(-17.3134, 406.21), (25898.4, 25898.9)], #ll_roi=[(13.0417, 497.862), (25653.1, 25654.8)], #pdf_title='M1K2-Pitch-PreInstallCheckoutPlots.pdf') input('Press <Return> to close') plt.close('all')