Autoplot Interface

From SPEDAS Wiki
Jump to navigation Jump to search

SPEDAS supports sending tplot variables to Autoplot using the command tplot2ap.

Getting Started

For this feature to work, you'll need to open Autoplot (by clicking "Start Autoplot" on autoplot.org) and enable the 'Server' feature via the 'Options' menu with the default port (12345). Depending on your firewall settings, you may also need to allow Autoplot to listen for TCP/IP connections on this port.


SPEDAS to Autoplot

To send tplot data to Autoplot, simply use the tplot2ap command as you would use the tplot command, e.g.

<syntaxhighlight lang="idl"> IDL> kyoto_load_ae, trange=['2015-12-15', '2015-12-16'] IDL> tplot2ap, 'kyoto_ae' </syntaxhighlight>


Autoplot to SPEDAS

Support is being added for retrieving data from Autoplot windows via the ap2tplot command; check back for updates soon!


More Examples

You can find more examples of using tplot2ap in the SPEDAS distribution at:

   projects/mms/examples/advanced/mms_tplot2autoplot_crib.pro
   projects/themis/examples/advanced/thm_crib_tplot2autoplot.pro


Clearing the Cache

The tplot2ap routine uses temporary CDF files to send data to Autoplot. These files are stored in the 'autoplot' folder in your default local data directory. With heavy usage, these files can take up a lot of your hard drive space, so you may want to delete the files in this folder from time to time; you can do this with the /clear_cache command to tplot2ap (make sure Autoplot is closed and your IDL session has been reset prior to attempting to clear the cache).

<syntaxhighlight lang="idl"> IDL> tplot2ap, /clear_cache </syntaxhighlight>