Spectrogram: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
Compare IDL code to python code for creating a spectrogram from THEMIS data. | |||
== IDL code: SPEDAS == | |||
== | |||
<pre> | <pre> | ||
Line 12: | Line 10: | ||
</pre> | </pre> | ||
[[File:idl_plot_spectra.png|400px|||IDL spectrogram example]] | |||
== Python code: pySPEDAS == | |||
<pre> | <pre> | ||
Line 40: | Line 38: | ||
</pre> | </pre> | ||
[[File:pyspedas_plot_spectra.png|400px|||pyspedas spectrogram example]] |
Latest revision as of 03:15, 3 May 2020
Compare IDL code to python code for creating a spectrogram from THEMIS data.
IDL code: SPEDAS
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']
Python code: pySPEDAS
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)