# -*- coding: utf-8 -*-
"""
file: basic_spectra.py

Desrciption:  
    Basic example with THEMIS data.
    Downloads THEMIS data and plots a spectrogram.
    
"""

import pyspedas
import pytplot

def basic_spectra():
    # Print the installed version of pyspedas
    pyspedas.get_spedas_prefs() 
    # Delete any existing pytplot variables
    pytplot.del_data()     
    # Download THEMIS state data for 2015-12-31
    pyspedas.load_data('themis', '2015-12-31', ['tha'], 'sst', 'l2')
    pytplot.tplot_options('title', 'tha_psif_en_eflux 2015-12-31') 
    pytplot.ylim('tha_psif_en_eflux', 10000.0, 10000000.0)
    pytplot.options('tha_psif_en_eflux', 'colormap', 'viridis')
    pytplot.tplot(['tha_psif_en_eflux'])

#Run the example code
#basic_spectra()