Spectrogram: Difference between revisions

From SPEDAS Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 12: Line 12:
</pre>
</pre>


Result: [[File:idl_plot_spectra.png|200px|||IDL spectrogram example]]
Result: [[File:idl_plot_spectra.png|400px|||IDL spectrogram example]]




Line 40: Line 40:
</pre>
</pre>


Result: [[File:pyspedas_plot_spectra.png|200px|thumb|right|pyspedas spectrogram example]]
Result: [[File:pyspedas_plot_spectra.png|400px|||pyspedas spectrogram example]]

Revision as of 23:22, 24 April 2020


Spectrogram

  • IDL code:
trange = ['2010-02-13', '2010-02-14']
probe = 'b'
thm_load_esa, probe=probe, trange=trange, datatype='peef_density peef_velocity_dsl peef_en_eflux'
tplot, ['thb_peef_density', 'thb_peef_velocity_dsl', 'thb_peef_en_eflux']

Result: IDL spectrogram example


  • Python code:
import pyspedas
import pytplot

# Get data
trange = ['2010-02-13', '2010-02-13']
probe = 'b'
var = ['thb_peef_density', 'thb_peef_velocity_dsl', 'thb_peef_en_eflux']
pyspedas.themis.esa(probe=probe, trange=trange, varnames=var)

# Set plot options
pytplot.options(var[1], 'ytitle', var[1])
pytplot.ylim(var[1], -700, 800)
pytplot.options(var[2], 'colormap', 'jet')
pytplot.options(var[2], 'ylog', True)
pytplot.options(var[2], 'zlog', True)
pytplot.options(var[2], 'ytitle', var[2])
pytplot.ylim(var[2], 1.5, 50000.0)

# Plot
pytplot.tplot(var) 

Result: pyspedas spectrogram example