pydarn.sdio.sdDataRead

Module: pydarn.sdio.sdDataRead

Functions:
pydarn.sdio.sdDataRead.sdDataOpen(sTime, hemi='north', eTime=None, fileType='grdex', src=None, fileName=None, custType='grdex', noCache=False)[source]

A function to establish a pipeline through which we can read radar data. first it tries the mongodb, then it tries to find local files, and lastly it sftp’s over to the VT data server.

Args:
  • sTime (datetime): the beginning time for which you want data
  • [hemi] (str): the hemisphere for which you want data, ‘north’ or ‘south’. default = ‘north’
  • [eTime] (datetime): the last time that you want data for. if this is set to None, it will be set to 1 day after sTime. default = None
  • [fileType] (str): The type of data you want to read. valid inputs are: ‘grd’,’grdex’,’map’,’mapex’. If you choose a file format and the specified one isn’t found, we will search for one of the others (eg mapex instead of map). default = ‘grdex’.
  • [src] (str): the source of the data. valid inputs are ‘local’ ‘sftp’. if this is set to None, it will try all possibilites sequentially. default = None
  • [fileName] (str): the name of a specific file which you want to open. If this is set, we will not look for cached files. default=None
  • [custType] (str): if fileName is specified, the filetype of the file. default = ‘grdex’
  • [noCache] (boolean): flag to indicate that you do not want to check first for cached files. default = False.
Returns:
  • myPtr (pydarn.sdio.sdDataTypes.sdDataPtr): a sdDataPtr object which contains a link to the data to be read. this can then be passed to sdDataReadRec in order to actually read the data.
Example:
import datetime as dt
myPtr = sdDataOpen(dt.datetime(2011,1,1),hemi='north'):

Written by AJ 20130607

pydarn.sdio.sdDataRead.sdDataReadAll(myPtr)[source]

A function to read a large amount (to the end of the request) of radar data into a list from a pydarn.sdio.sdDataTypes.sdDataPtr object

Note

to use this, you must first create a pydarn.sdio.sdDataTypes.sdDataPtr object with sdDataOpen()

Args:
Returns:
Example:
import datetime as dt
myPtr = sdDataOpen(dt.datetime(2011,1,1),'bks',eTime=dt.datetime(2011,1,1,2),channel='a', bmnum=7,cp=153,fileType='fitex',filtered=False, src=None):
myList = sdDataReadAll(myPtr)

Written by AJ 20130606

pydarn.sdio.sdDataRead.sdDataReadRec(myPtr)[source]

A function to read a single record of radar data from a pydarn.sdio.sdDataTypes.sdDataPtr object

Note

to use this, you must first create a pydarn.sdio.sdDataTypes.sdDataPtr object with sdDataOpen()

Args:
Returns:
Example:
import datetime as dt
myPtr = sdDataOpen(dt.datetime(2011,1,1),'south'):
myData = sdDataReadRec(myPtr)

Written by AJ 20130610

pydarn.sdio.sdDataRead

alias of pydarn.sdio.sdDataRead

Previous topic

pydarn.sdio.radDataRead

Next topic

pydarn.sdio.radDataTypes

This Page