Note: The default ITS GitLab runner is a shared resource and is subject to slowdowns during heavy usage.
You can run your own GitLab runner that is dedicated just to your group if you need to avoid processing delays.

Commit 1a7f0c79 authored by Qusai Al Shidi's avatar Qusai Al Shidi
Browse files

Autodoc

parent bfefaee3
# Module [swmfpy](#swmfpy)
A collection of tools to read, write, visualize with the
Space Weather Modeling Framework (SWMF)
## Sub-modules
* [swmfpy.io](#swmfpy.io)
* [swmfpy.paramin](#swmfpy.paramin)
# swmfpy
SWMF Tools
==========
A collection of tools to read, write, visualize with the
Space Weather Modeling Framework (SWMF).
Modules
-------
# Module [swmfpy.io](#swmfpy.io)
These are automatically imported.
Input/Output tools for SWMF
- swmfpy.io: Input/Output tools.
- swmfpy.paramin: PARAM.in editing tools.
- swmfpy.web: Internet data downloading/uploading tools.
Extra Modules
-------------
These are not automatically imported. Might have extra dependancies.
*None yet.*
## Functions
# swmfpy.web
Tools to retrieve and send data on the web.
SWMF Web Tools
==============
### Function [swmfpy.io.coarse_filtering](#swmfpy.io.coarse_filtering)
Here are a collection of tools to work with data on the internet. Thus,
this module mostly requires an internet connection.
> `def coarse_filtering(data, coarseness=3)`
## get_omni_data
```python
get_omni_data(time_from, time_to, **kwargs)
```
Retrieve omni solar wind data over http.
This will download omni data from https://spdf.gsfc.nasa.gov/pub/data/omni
and put it into a dictionary. If your data is large, then make a csv and
use swmfpy.io.read_omni_data().
Applies coarse filtering to a pandas.DataFrame
Args:
time_from (datetime.datetime): The start time of the solar wind
data that you want to receive.
time_to (datetime.datetime): The end time of the solar wind data
you want to receive.
Returns:
dict: This will be a list of *all* columns
available in the omni data set.
### Function [swmfpy.io.read_gm_log](#swmfpy.io.read_gm_log)
Examples:
```python
import datetime
import swmfpy.web
storm_start = datetime.datetime(year=2000, month=1, day=1)
storm_end = datetime.datetime(year=2000, month=2, day=15)
data = swmfpy.web.get_omni_data(time_from=storm_start,
time_to=storm_end)
```
> `def read_gm_log(filename, colnames=None, index_by_time=True)`
## download_magnetogram_adapt
```python
download_magnetogram_adapt(time, map_type='fixed', **kwargs)
```
This routine downloads GONG ADAPT magnetograms.
Downloads ADAPT magnetograms from ftp://gong2.nso.edu/adapt/maps/gong/
to a local directory. It will download all maps with the regex file
pattern: adapt4[0,1]3*yyyymmddhh
Make a pandas.DataFrame out of the Dst indeces outputted
from the GM model log.
Args:
time (datetime.datetime): Time in which you want the magnetogram.
map_type (str): (default: 'fixed')
Choose either 'fixed' or 'central' for
the map type you want.
**kwargs:
download_dir (str): (default is current dir) Relative directory
where you want the maps to be downloaded.
Returns:
str: First unzipped filename found.
###### Args
Raises:
NotADirectoryError: If the adapt maps directory
is not found on the server.
ValueError: If map_type is not recognized.
(i.e. not 'fixed' or 'central')
FileNotFoundError: If maps were not found.
**`filename`** : `str`
: The filename as a string.
Examples:
```python
import datetime as dt
# Use datetime objects for the time
time_flare = dt.datetime(2018, 2, 12, hour=10)
swmfpy.web.download_magnetogram_adapt(time=time_flare,
map_type='central',
download_dir='./mymaps/')
```
colnames (list(str)): Supply the name of the columns
**`index_by_time`** : `bool`
: Change the index to a time index
# swmfpy.io
Input/Output tools
Input/Output
============
###### Returns
Here are tools to read and write files relating to SWMF.
`pandas.DataFrame` of `the` `log` `file`
:  
TODO: Move pandas dependancy elsewhere.
###### Examples
##### To plot AL and Dst get the log files
geo = swmfpy.read_gm_log("run/GM/IO2/geoindex_e20140215-100500.log")
dst = swmfpy.read_gm_log("run/GM/IO2/log_e20140215-100500.log")
##### Then plot using pandas features
dst["dst_sm"].plot.line()
geo["AL"].plot.line()
## read_wdc_ae
```python
read_wdc_ae(wdc_filename)
```
Read an auroral electrojet (AE) indeces from Kyoto's World Data Center
text file into a dictionary of lists.
Args:
wdc_filename (str): Filename of wdc data from
http://wdc.kugi.kyoto-u.ac.jp/
Returns:
dict: {
Auroral indeces 'AL', 'AE', 'AO', 'AU' (int): {
'times' (datetime.datetime): List of datetime objects
corresponding to time in UT.
'values' (int): List of indeces.
}
## read_wdc_asy_sym
```python
read_wdc_asy_sym(wdc_filename)
```
Reads a WDC file for ASY/SYM data.
Reads an ASY/SYM file downloaded from
http://wdc.kugi.kyoto-u.ac.jp/aeasy/index.html
and puts it into a dictionary.
### Function [swmfpy.io.read_omni_csv](#swmfpy.io.read_omni_csv)
Args:
wdc_filename (str): Relative filename (or file handle no.) to read.
Returns:
dict: of values.
{'[ASY-SYM]-[D-H]': 'times': [], 'values': []}
Examples:
```
indeces = swmfpy.io.read_wdc_asy_sym('wdc.dat')
# Plot data
plt.plot(indeces['SYM-H']['times'],
indeces['SYM-H']['values'],
label='SYM-H [nT]'
)
plt.xlabel('Time [UT]')
```
> `def read_omni_csv(filename, filtering=False, **kwargs)`
Important to note if there is bad data it will be filled as None.
## read_omni_csv
```python
read_omni_csv(filename, filtering=False, **kwargs)
```
Take an OMNI csv file from cdaweb.sci.gsfc.nasa.gov
and turn it into a pandas.DataFrame.
Args:
fnames (dict): dict with filenames from omni .lst files.
The keys must be: density, temperature,
magnetic_field, velocity
filtering (bool): default=False Remove points where the value
is >sigma (default: sigma=3) from mean.
**kwargs:
coarseness (int): default=3, Number of standard deviations
above which to remove if filtering=True.
clean (bool): default=True, Clean the omni data of bad data points
###### Args
**`fnames`**
: dict with filenames from omni .lst files. The keys must be:
density, temperature, magnetic_field, velocity
**`filtering`**
: default=False Remove points where the value
is >sigma (default: sigma=3) from mean.
**`Returns`** : `pandas.DataFrame` `object` `with` `solar` `wind` `data`
:  
Returns:
pandas.DataFrame: object with solar wind data
Make sure to download the csv files with cdaweb.sci.gsfc.nasa.gov
the header seperated into a json file for safety.
This only tested with OMNI data specifically.
Other Args:
coarseness: default=3, Number of standard deviations above which to
remove if filtering=True.
clean: default=True, Clean the omni data of bad data points
### Function [swmfpy.io.read_wdc_ae](#swmfpy.io.read_wdc_ae)
> `def read_wdc_ae(wdc_filename)`
Read an auroral electrojet (AE) indeces from Kyoto's World Data Center
text file into a dictionary of lists.
###### Args
**`wdc_filename`** : `str`
: Filename of wdc data from
<http://wdc.kugi.kyoto-u.ac.jp/>
###### Returns
**`dict`**
: {"time" (datetime.datetime): list of datetime objects
corresponding to time in UT.
"AL", "AE", "AO", "AU" (int): Auroral indeces.
}
### Function [swmfpy.io.write_imf_input](#swmfpy.io.write_imf_input)
> `def write_imf_input(data, outfilename='IMF.dat', enable_rb=True, **kwargs)`
## write_imf_input
```python
write_imf_input(data, outfilename='IMF.dat', enable_rb=True, **kwargs)
```
Writes the pandas.DataFrame into an input file
that SWMF can read as input IMF (IMF.dat).
###### Args
**`data`**
: pandas.DataFrame object with solar wind data
**`outfilename`**
: The output file name for ballistic solar wind data. (default: "IMF.dat")
**`enable_rb`**
: Enables solar wind input for the radiation belt model. (default: True)
Args:
data: pandas.DataFrame object with solar wind data
outfilename: The output file name for ballistic solar wind data.
(default: "IMF.dat")
enable_rb: Enables solar wind input for the radiation belt model.
(default: True)
Other paramaters:
gse: (default=False)
Use GSE coordinate system for the file instead of GSM default.
## read_gm_log
```python
read_gm_log(filename, colnames=None, dtypes=None, index_time=True)
```
Make a dictionary out of the indeces outputted
from the GM model log.
Args:
filename (str): The relative filename as a string. (or file handle no.)
colnames ([str]): (default: None) Supply the name of the columns.
If None it will use second line
of log file.
dtypes ([types]): (default: None) Provide types for the columns, if
None then all will be float.
index_time (bool): (default: True) Make a column of dt.datetime objects
in dictionary key 'Time [UT]'.
Returns:
Dictionary of the log file
# Module [swmfpy.paramin](#swmfpy.paramin)
Tools to manipulate or create SWMF param.in files
Examples:
To plot AL and Dst get the log files
```
geo = swmfpy.io.read_gm_log('run/GM/IO2/geoindex_e20140215-100500.log')
dst = swmfpy.io.read_gm_log('run/GM/IO2/log_e20140215-100500.log')
## Functions
# Plot AL indeces
plt.plot(geo['times', geo['AL'])
```
### Function [swmfpy.paramin.replace](#swmfpy.paramin.replace)
# swmfpy.paramin
PARAM.in Tools
--------------
> `def replace(input_file, replace, output_file='PARAM.in')`
These tools are to help script the editing of PARAM.in files.
## replace_command
```python
replace_command(parameters, input_file, output_file='PARAM.in')
```
Replace values for the parameters in a PARAM.in file.
Note, if you have repeat commands this will replace all the repeats.
Args:
parameters (dict): Dictionary of strs with format
replace = {'#COMMAND': ['value', 'comments', ...]}
This is case sensitive.
input_file (str): String of PARAM.in file name.
output_file (str): (default 'PARAM.in') The output file to write to.
A value of None will not output a file.
Returns:
A list of lines of the PARAM.in file that would be outputted.
Raises:
TypeError: If a value given couldn't be converted to string.
Examples:
```
change['#SOLARWINDFILE'] = [['T', 'UseSolarWindFile'],
['new_imf.dat', 'NameSolarWindFile']]
# This will overwrite PARAM.in
swmfpy.paramin.replace('PARAM.in.template', change)
```
## read_command
```python
read_command(command, paramin_file='PARAM.in', **kwargs)
```
Get parameters of a certain command in PARAM.in file.
###### Args
**`input_file`** :&ensp;`str`
: String of PARAM.in file name.
**[`replace()`](#swmfpy.paramin.replace)** :&ensp;`dict`
: Dictionary of strs with format
replace = {"#COMMAND": ["value", "comments", ...]}
This is case sensitive.
**`output_file`** :&ensp;`str`
: (default "PARAM.in") The output file to write to.
A value of None will not output a file.
###### Returns
A list of lines of the PARAM.in file that would be outputted.
This will find the [`COMMAND`](#COMMAND) and return a list of values for the parameters.
###### Examples
Args:
command (str): This is the [`COMMAND`](#COMMAND) you're looking for.
paramin_file (str): (default: 'PARAM.in') The file in which you're
looking for the command values.
**kwargs:
num_of_values (int): (default: None) Number of values to take from
command.
```
change["#SOLARWINDFILE"] = [["T", "UseSolarWindFile"],
["new_imf.dat", "NameSolarWindFile"]]
##### This will overwrite PARAM.in
swmfpy.paramin.replace("PARAM.in.template", change)
```
Returns:
list: Values found for the [`COMMAND`](#COMMAND) in file. Index 0 is [`COMMAND`](#COMMAND) and
the values follow (1 for first argument...)
Raises:
ValueError: When the [`COMMAND`](#COMMAND) is not found.
Examples:
start_time = swmfpy.paramin.read_command('#STARTTIME')
end_time = swmfpy.paramin.read_command('#ENDTIME')
print('Starting month is ', start_time[1])
print('Ending month is ', end_time[1])
This will treat all following lines as values for the command. To suppress
this, try using the `num_of_values` keyword. This is helpful if your
PARAM.in is comment heavy.
-----
Generated by *pdoc* 0.7.5 (<https://pdoc3.github.io>).
......@@ -30,3 +30,5 @@ import swmfpy
help(swmfpy) # To see list of functions
help(swmfpy.io.read_gm_log) # To see the function documentation
```
However if you would like an auto-documented version (uses exact same text as the help() function output), go [here](DOCUMENTATION.markdown).
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: package swmfpy</title>
<meta charset="utf-8">
</head><body bgcolor="#f0f0f8">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>swmfpy</strong></big></big> (version 0.0.1)</font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/qusai/Documents/Code/swmfpy/swmfpy/__init__.py">/home/qusai/Documents/Code/swmfpy/swmfpy/__init__.py</a></font></td></tr></table>
<p><tt>SWMF&nbsp;Tools<br>
==========<br>
&nbsp;<br>
A&nbsp;collection&nbsp;of&nbsp;tools&nbsp;to&nbsp;read,&nbsp;write,&nbsp;visualize&nbsp;with&nbsp;the<br>
Space&nbsp;Weather&nbsp;Modeling&nbsp;Framework&nbsp;(SWMF).<br>
&nbsp;<br>
Modules<br>
-------<br>
&nbsp;<br>
These&nbsp;are&nbsp;automatically&nbsp;imported.<br>
&nbsp;<br>
-&nbsp;swmfpy.io:&nbsp;Input/Output&nbsp;tools.<br>
-&nbsp;swmfpy.paramin:&nbsp;PARAM.in&nbsp;editing&nbsp;tools.<br>
-&nbsp;swmfpy.web:&nbsp;Internet&nbsp;data&nbsp;downloading/uploading&nbsp;tools.<br>
&nbsp;<br>
Extra&nbsp;Modules<br>
-------------<br>
&nbsp;<br>
These&nbsp;are&nbsp;not&nbsp;automatically&nbsp;imported.&nbsp;Might&nbsp;have&nbsp;extra&nbsp;dependancies.<br>
&nbsp;<br>
*None&nbsp;yet.*</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Package Contents</strong></big></font></td></tr>
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="swmfpy.io.html">io</a><br>
</td><td width="25%" valign=top><a href="swmfpy.paramin.html">paramin</a><br>
</td><td width="25%" valign=top><a href="swmfpy.web.html">web</a><br>
</td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><strong>__author__</strong> = 'Qusai Al Shidi'<br>
<strong>__email__</strong> = 'qusai@umich.edu'<br>
<strong>__license__</strong> = 'MIT'<br>
<strong>__maintainer__</strong> = 'Qusai Al Shidi'<br>
<strong>__version__</strong> = '0.0.1'</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#7799ee">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Author</strong></big></font></td></tr>
<tr><td bgcolor="#7799ee"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%">Qusai&nbsp;Al&nbsp;Shidi</td></tr></table>
</body></html>
\ No newline at end of file
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module swmfpy.io</title>
<meta charset="utf-8">
</head><body bgcolor="#f0f0f8">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="swmfpy.html"><font color="#ffffff">swmfpy</font></a>.io</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/qusai/Documents/Code/swmfpy/swmfpy/io.py">/home/qusai/Documents/Code/swmfpy/swmfpy/io.py</a></font></td></tr></table>
<p><tt>Input/Output&nbsp;tools<br>
&nbsp;<br>
Input/Output<br>
============<br>
&nbsp;<br>
Here&nbsp;are&nbsp;tools&nbsp;to&nbsp;read&nbsp;and&nbsp;write&nbsp;files&nbsp;relating&nbsp;to&nbsp;SWMF.<br>
&nbsp;<br>
TODO:&nbsp;Move&nbsp;pandas&nbsp;dependancy&nbsp;elsewhere.</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="datetime.html">datetime</a><br>
</td><td width="25%" valign=top><a href="numpy.html">numpy</a><br>
</td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
<tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt><a name="-read_gm_log"><strong>read_gm_log</strong></a>(filename, colnames<font color="#909090">=None</font>, dtypes<font color="#909090">=None</font>, index_time<font color="#909090">=True</font>)</dt><dd><tt>Make&nbsp;a&nbsp;dictionary&nbsp;out&nbsp;of&nbsp;the&nbsp;indeces&nbsp;outputted<br>
from&nbsp;the&nbsp;GM&nbsp;model&nbsp;log.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;&nbsp;&nbsp;filename&nbsp;(str):&nbsp;The&nbsp;relative&nbsp;filename&nbsp;as&nbsp;a&nbsp;string.&nbsp;(or&nbsp;file&nbsp;handle&nbsp;no.)<br>
&nbsp;&nbsp;&nbsp;&nbsp;colnames&nbsp;([str]):&nbsp;(default:&nbsp;None)&nbsp;Supply&nbsp;the&nbsp;name&nbsp;of&nbsp;the&nbsp;columns.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If&nbsp;None&nbsp;it&nbsp;will&nbsp;use&nbsp;second&nbsp;line<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;of&nbsp;log&nbsp;file.<br>
&nbsp;&nbsp;&nbsp;&nbsp;dtypes&nbsp;([types]):&nbsp;(default:&nbsp;None)&nbsp;Provide&nbsp;types&nbsp;for&nbsp;the&nbsp;columns,&nbsp;if<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;None&nbsp;then&nbsp;all&nbsp;will&nbsp;be&nbsp;float.<br>
&nbsp;&nbsp;&nbsp;&nbsp;index_time&nbsp;(bool):&nbsp;(default:&nbsp;True)&nbsp;Make&nbsp;a&nbsp;column&nbsp;of&nbsp;dt.datetime&nbsp;objects<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;in&nbsp;dictionary&nbsp;key&nbsp;'Time&nbsp;[UT]'.<br>
&nbsp;<br>
Returns:<br>
&nbsp;&nbsp;&nbsp;&nbsp;Dictionary&nbsp;of&nbsp;the&nbsp;log&nbsp;file<br>
&nbsp;<br>
Examples:<br>
&nbsp;&nbsp;&nbsp;&nbsp;To&nbsp;plot&nbsp;AL&nbsp;and&nbsp;Dst&nbsp;get&nbsp;the&nbsp;log&nbsp;files<br>
&nbsp;&nbsp;&nbsp;&nbsp;```<br>
&nbsp;&nbsp;&nbsp;&nbsp;geo&nbsp;=&nbsp;swmfpy.io.<a href="#-read_gm_log">read_gm_log</a>('run/GM/IO2/geoindex_e20140215-100500.log')<br>
&nbsp;&nbsp;&nbsp;&nbsp;dst&nbsp;=&nbsp;swmfpy.io.<a href="#-read_gm_log">read_gm_log</a>('run/GM/IO2/log_e20140215-100500.log')<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;Plot&nbsp;AL&nbsp;indeces<br>
&nbsp;&nbsp;&nbsp;&nbsp;plt.plot(geo['times',&nbsp;geo['AL'])<br>
&nbsp;&nbsp;&nbsp;&nbsp;```</tt></dd></dl>
<dl><dt><a name="-read_omni_csv"><strong>read_omni_csv</strong></a>(filename, filtering<font color="#909090">=False</font>, **kwargs)</dt><dd><tt>Take&nbsp;an&nbsp;OMNI&nbsp;csv&nbsp;file&nbsp;from&nbsp;cdaweb.sci.gsfc.nasa.gov<br>
and&nbsp;turn&nbsp;it&nbsp;into&nbsp;a&nbsp;pandas.DataFrame.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;&nbsp;&nbsp;fnames&nbsp;(dict):&nbsp;dict&nbsp;with&nbsp;filenames&nbsp;from&nbsp;omni&nbsp;.lst&nbsp;files.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The&nbsp;keys&nbsp;must&nbsp;be:&nbsp;density,&nbsp;temperature,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;magnetic_field,&nbsp;velocity<br>
&nbsp;&nbsp;&nbsp;&nbsp;filtering&nbsp;(bool):&nbsp;default=False&nbsp;Remove&nbsp;points&nbsp;where&nbsp;the&nbsp;value<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;is&nbsp;&gt;sigma&nbsp;(default:&nbsp;sigma=3)&nbsp;from&nbsp;mean.<br>
&nbsp;&nbsp;&nbsp;&nbsp;**kwargs:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;coarseness&nbsp;(int):&nbsp;default=3,&nbsp;Number&nbsp;of&nbsp;standard&nbsp;deviations<br>