LCOGT Util Package

LCOGT Util is a Python package of two LCOGT APIs. It contains two Classes - LCOGT for scheduling and managing observation requests and LCOGT_archive for archive search and data download.

The definitions for class method are listed below

LCOGT class

This class is for putting us observation request and managing requests

Initializing class

from lcogt_util import LCOGT

Scheduling observation

LCOGT.Request(name, ra, dec, tstart, tend, cadence=None, jitter=None, Filt='B,V,g,r,i', Exp='90,60',
             request_title=None, tel_class='1m0', ipp_value=1.05, max_airmass=1.6, min_lunar_distance=30, PropID=None)

Querying active/old requests

#This returns request IDs
LCOGT.GetRequestIdsByNames(names=None, state=None, user=None, proposal=None)

Canceling existing requests


LCOGT_archive class

This class is for querying LCOGT archive and download data. Note that the API keys for LCOGT and LCOGT_archive are different.

Get API key

This function has to be executed in an interactive console, and is for one time usage only, to retrieve LCOGT archive API key. It will ask for LCOGT portal's login username and password.

>>> from lcogt_util import LCOGT_archive
>>> LCOGT_archive.GetApiKey()
Enter Username: [email protected]
{u'token': u'8ec9d4c53bc7390a548bc8585167064ffea48462'}

Initializing class

from lcogt_util import LCOGT_archive

Query observation in data archive

LCOGT_archive.GetFrameList(ra=None, dec=None, period=None, name=None, rlevel='reduced', proposal=None, obstype='EXPOSE', telclass=None, limit=None, public=True):

Download the data

LCOGT_archive.DownloadFrames(savepath, unpack=False, threads=3, dryrun=False)