User Tools

Site Tools


data:data_analysis_manual:sunraster

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
data:data_analysis_manual:sunraster [2021/06/25 18:07]
eric buchlin Read file
data:data_analysis_manual:sunraster [2021/06/25 18:19]
eric buchlin Plot with sunraster
Line 57: Line 57:
 print(window.data.shape) print(window.data.shape)
 # (1, 50, 784, 160) # (1, 50, 784, 160)
 +</​file>​
  
 +
 +===== Plot a SPICE file =====
 +
 +(to be run following the previous script)
 +
 +<file python plot_spice1.py>​
 +import matplotlib.pyplot as plt
 +
 +plt.figure()
 +window[0, 24, :, :​].plot() ​ # window central wavelength
 +plt.show()
 </​file>​ </​file>​
 +
 +{{:​data:​data_analysis_manual:​sunraster:​raster_plot1.png|}}
 +
 +Some adjustments are still needed:
 +  * for the 4" slit and no Y-rebin, the aspect ratio is about 4
 +  * color scale
 +
 +<file python plot_spice2.py>​
 +plt.figure()
 +window[0, 24, :, :​].plot(aspect=1/​4,​ vmin=0, vmax=.3)
 +plt.show()
 +</​file>​
 +
 +{{:​data:​data_analysis_manual:​sunraster:​raster_plot2.png|}}
 +
 +Adding a color bar:
 +
 +<file python plot_spice3.py>​
 +plt.figure(figsize=(9,​6))
 +ax = window[0, 24, :, :​].plot(aspect=1/​4,​ vmin=0, vmax=.3)
 +plt.colorbar(ax.get_images()[0])
 +plt.show()
 +</​file>​
 +
 +{{:​data:​data_analysis_manual:​sunraster:​raster_plot3.png|}}
data/data_analysis_manual/sunraster.txt · Last modified: 2023/02/04 15:59 by eric buchlin