gme.ind.symasy

Module: gme.ind.symasy

Classes:
Functions:
gme.ind.symasy.mapSymAsyMongo(sYear, eYear=None)[source]

This function reads sym/asy 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
Returns:
  • Nothing.
Example:
gme.ind.mapSymAsyMongo(2001)

written by AJ, 20130123

gme.ind.symasy.readSymAsy(sTime=None, eTime=None, symh=None, symd=None, asyh=None, asyd=None)[source]

This function reads sym/asy data from the mongodb.

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
  • [symh] (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 symh values in the range [a,b] will be returned. default = None
  • [symd] (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 symd values in the range [a,b] will be returned. default = None
  • [asyh] (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 asyh values in the range [a,b] will be returned. default = None
  • [asyd] (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 asyd values in the range [a,b] will be returned. default = None
Returns:
  • symList (list or None): if data is found, a list of gme.ind.symasy.symAsyRec objects matching the input parameters is returned. If no data is found, None is returned.
Example:
import datetime as dt
symList = gme.ind.readSymAsy(sTime=dt.datetime(2011,1,1),eTime=dt.datetime(2011,6,1),symh=[5,50],asyd=[-10,0])

written by AJ, 20130131

gme.ind.symasy.readSymAsyWeb(sTime, eTime=None)[source]

This function reads sym/asy data from the WDC kyoto website

Warning

You should not use this. Use the general function gme.ind.symasy.readSymAsy() 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 1 day after sTime. This must not be more than 366 days after sTime. default = None
Example:
import datetime as dt
symList = gme.ind.readSymAsyWeb(dt.datetime(2011,1,1),eTime=dt.datetime(2011,1,5))

written by AJ, 20130131

class gme.ind.symasy.symAsyRec(webLine=None, dbDict=None)[source]

a class to represent a record of sym/asy data. Extends gme.base.gmeBase.gmeData. Note that sym/asym data is available from 1980-present day (or whatever the latest WDC has uploaded is). The data are 1-minute values. More info on sym/asy can be found here

Members:
  • time (datetime): an object identifying which time these data are for
  • dataSet (str): a string indicating 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.
  • symh (float): the symh value
  • symd (float): the symd value
  • asyh (float): the asyh value
  • asyd (float): the asyd value

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:
emptySymAsyObj = gme.ind.symAsyRec()

written by AJ, 20130131

parseWeb(line)[source]

This method is used to convert a line of sym/asy data from the WDC to a symAsyRec object

Note

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

Belongs to: gme.ind.symasy.symAsyRec

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

written by AJ, 20130131

gme.ind.symasy

alias of gme.ind.symasy

Previous topic

gme.ind

Next topic

gme.ind.ae

This Page