gme.ind.ae

Module: gme.ind.ae

Classes:
Functions:
class gme.ind.ae.aeRec(webLine=None, dbDict=None, res=None)[source]

a class to represent a record of ae data. Extends gme.base.gmeBase.gmeData . Note that Ae data is available from 1990-present day (or whatever the latest WDC has uploaded is). We have 1 hour and 1 minute values. Information about dst can be found here

Members:
  • time (datetime): an object identifying which time these data are for
  • dataSet (gme.ind.dst.dstRec)): a string dicating the dataset this is from
  • info (str): information about where the data come from. Please be courteous and give credit to data providers when credit is due.
  • ae (float): auroral electrojet
  • au (float): auroral upper
  • ae (float): auroral lower
  • ao (float): mean of al and au
  • res (int): the time resolution of the data in minutes

Note

If any of the members have a value of None, this means that they could not be read for that specific time

Methods:
  • parseWeb()
Example:
emptyAeObj = gme.ind.aeRec()

written by AJ, 20130131

parseWeb(line)[source]

This method is used to convert a line of ae data from the WDC to a aeRec object

Note

In general, users will not need to worry about this.

Belongs to: gme.ind.ae.aeRec

Args:
  • line (str): the ASCII line from the WDC data file
Returns:
  • Nothing.
Example:
myAeObj.parseWeb(webLine)

written by AJ, 20130131

gme.ind.ae.mapAeMongo(sYear, eYear=None, res=60)[source]

This function reads ae data from wdc and puts it in mongodb

Warning

In general, nobody except the database admins will need to use this function

Args:
  • sYear (int): the year to begin mapping data
  • [eYear] (int or None): the end year for mapping data. if this is None, eYear will be sYear
  • [res] (int): the time resolution desired. either 1 or 60 minutes. default=60.
Returns:
  • Nothing.
Example:
gme.ind.mapAeMongo(1997)

written by AJ, 20130123

gme.ind.ae.readAe(sTime=None, eTime=None, res=60, ae=None, al=None, au=None, ao=None)[source]

This function reads ae data from the mongodb. The data are 1-minute values

Args:
  • [sTime] (datetime or None): the earliest time you want data for, default=None
  • [eTime] (datetime or None): the latest time you want data for. if this is None, end Time will be 1 day after sTime. default = None
  • [res] (int): the time resolution desired in minutes. Valid inputs are 1 and 60. default = 60
  • [ae] (list or None): if this is not None, it must be a 2-element list of numbers, [a,b]. In this case, only data with ae values in the range [a,b] will be returned. default = None
  • [al] (list or None): if this is not None, it must be a 2-element list of numbers, [a,b]. In this case, only data with al values in the range [a,b] will be returned. default = None
  • [au] (list or None): if this is not None, it must be a 2-element list of numbers, [a,b]. In this case, only data with au values in the range [a,b] will be returned. default = None
  • [ao] (list or None): if this is not None, it must be a 2-element list of numbers, [a,b]. In this case, only data with ao values in the range [a,b] will be returned. default = None
Returns:
  • aeList (list or None): if data is found, a list of gme.ind.ae.aeRec objects matching the input parameters is returned. If no data is found, None is returned.
Example:
import datetime as dt
aeList = gme.ind.readAe(sTime=dt.datetime(2011,1,1),eTime=dt.datetime(2011,6,1),res=60,ao=[-50,50])

written by AJ, 20130131

gme.ind.ae.readAeWeb(sTime, eTime=None, res=60)[source]

This function reads ae data from the WDC kyoto website

Warning

You should not use this. Use the general function gme.ind.ae.readAe() instead.

Args:
  • sTime (datetime): the earliest time you want data for
  • [eTime] (datetime or None): the latest time you want data for. if this is None, eTime will be equal to sTime. eTime must not be more than 366 days after sTime. default = None
  • [res] (int): the time resolution desired, either 1 or 60 minutes. default=60
Example:
import datetime as dt
aeList = gme.ind.readAeWeb(dt.datetime(2011,1,1,1,50),eTime=dt.datetime(2011,1,1,10,0))

written by AJ, 20130131

gme.ind.ae

alias of gme.ind.ae

Previous topic

gme.ind.symasy

Next topic

gme.ind.kp

This Page