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 3ef8ce17 authored by Qusai Al Shidi's avatar Qusai Al Shidi
Browse files

More doc fixes

parent b5a80a14
......@@ -61,7 +61,6 @@ use swmfpy.io.read_omni_data().
**Examples**:
```python
import datetime
import swmfpy.web
......@@ -112,7 +111,6 @@ pattern: adapt4[0,1]3*yyyymmddhh
**Examples**:
```python
import datetime as dt
# Use datetime objects for the time
......@@ -152,8 +150,7 @@ text file into a dictionary of lists.
- `dict` - {
Auroral indeces 'AL', 'AE', 'AO', 'AU' (int): {
- `'times'` _datetime.datetime_ - List of datetime objects
corresponding to time in UT.
'times' (datetime.datetime)
- `'values'` _int_ - List of indeces.
}
......@@ -184,7 +181,6 @@ and puts it into a dictionary.
**Examples**:
```python
indeces = swmfpy.io.read_wdc_asy_sym('wdc.dat')
# Plot data
plt.plot(indeces['SYM-H']['times'],
......@@ -192,7 +188,6 @@ and puts it into a dictionary.
label='SYM-H [nT]'
)
plt.xlabel('Time [UT]')
```
Important to note if there is bad data it will be filled as None.
......@@ -214,6 +209,7 @@ and turn it into a pandas.DataFrame.
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.
......@@ -247,6 +243,9 @@ that SWMF can read as input IMF (IMF.dat).
- `enable_rb` - Enables solar wind input for the radiation belt model.
- `(default` - True)
**kwargs:
- `gse` _bool_ - (default: False) Use GSE coordinates instead of GSM.
Other paramaters:
- `gse` - (default=False)
Use GSE coordinate system for the file instead of GSM default.
......@@ -282,13 +281,11 @@ from the GM model log.
To plot AL and Dst get the log files
```python
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')
# Plot AL indeces
plt.plot(geo['times', geo['AL'])
```
<a name=".swmfpy.paramin"></a>
......@@ -329,12 +326,10 @@ Note, if you have repeat commands this will replace all the repeats.
**Examples**:
```python
change['`SOLARWINDFILE`'] = [['T', 'UseSolarWindFile'],
['new_imf.dat', 'NameSolarWindFile']]
# This will overwrite PARAM.in
swmfpy.paramin.replace('PARAM.in.template', change)
```
<a name=".swmfpy.paramin.read_command"></a>
......@@ -372,12 +367,10 @@ This will find the `COMMAND` and return a list of values for the parameters.
**Examples**:
```python
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
......
......@@ -21,9 +21,8 @@ def read_wdc_ae(wdc_filename):
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.
'times' (datetime.datetime)
'values' (int): List of indeces.
}
"""
......@@ -78,7 +77,6 @@ def read_wdc_asy_sym(wdc_filename):
Examples:
```python
indeces = swmfpy.io.read_wdc_asy_sym('wdc.dat')
# Plot data
plt.plot(indeces['SYM-H']['times'],
......@@ -86,7 +84,6 @@ def read_wdc_asy_sym(wdc_filename):
label='SYM-H [nT]'
)
plt.xlabel('Time [UT]')
```
Important to note if there is bad data it will be filled as None.
......@@ -160,10 +157,11 @@ def read_omni_csv(filename, filtering=False, **kwargs):
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
**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
Returns:
pandas.DataFrame: object with solar wind data
......@@ -222,6 +220,9 @@ def write_imf_input(data, outfilename="IMF.dat", enable_rb=True, **kwargs):
enable_rb: Enables solar wind input for the radiation belt model.
(default: True)
**kwargs:
gse (bool): (default: False) Use GSE coordinates instead of GSM.
Other paramaters:
gse: (default=False)
Use GSE coordinate system for the file instead of GSM default.
......@@ -296,13 +297,11 @@ def read_gm_log(filename, colnames=None, dtypes=None, index_time=True):
Examples:
To plot AL and Dst get the log files
```python
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')
# Plot AL indeces
plt.plot(geo['times', geo['AL'])
```
"""
......
......@@ -30,12 +30,10 @@ def replace_command(parameters, input_file, output_file='PARAM.in'):
Examples:
```python
change['#SOLARWINDFILE'] = [['T', 'UseSolarWindFile'],
['new_imf.dat', 'NameSolarWindFile']]
# This will overwrite PARAM.in
swmfpy.paramin.replace('PARAM.in.template', change)
```
"""
# Author: Qusai Al Shidi
......@@ -93,12 +91,10 @@ def read_command(command, paramin_file='PARAM.in', **kwargs):
Examples:
```python
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
......
......@@ -28,7 +28,6 @@ def get_omni_data(time_from, time_to, **kwargs):
Examples:
```python
import datetime
import swmfpy.web
......@@ -163,7 +162,6 @@ def download_magnetogram_adapt(time, map_type='fixed', **kwargs):
Examples:
```python
import datetime as dt
# Use datetime objects for the time
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment