def read_csv_lightcurve(lcfile):
<EOL>if '<STR_LIT>' in os.path.basename(lcfile):<EOL><INDENT>LOGINFO('<STR_LIT>' % lcfile)<EOL>infd = gzip.open(lcfile,'<STR_LIT:rb>')<EOL><DEDENT>else:<EOL><INDENT>LOGINFO('<STR_LIT>' % lcfile)<EOL>infd = open(lcfile,'<STR_LIT:rb>')<EOL><DEDENT>lctext = infd.read().decode()<EOL>infd.close()<EOL>lcstart = lctext.index('<STR_LIT>')<EOL>lcheader = lctext[:lcstart+<NUM_LIT:12>]<EOL>lccolumns = lctext[lcstart+<NUM_LIT>:].split('<STR_LIT:\n>')<EOL>lccolumns = [x.split('<STR_LIT:U+002C>') for x in lccolumns if len(x) > <NUM_LIT:0>]<EOL>lcdict = _parse_csv_header(lcheader)<EOL>lccolumns = list(zip(*lccolumns))<EOL>for colind, col in enumerate(lcdict['<STR_LIT>']):<EOL><INDENT>lcdict[col.lower()] = np.array([COLUMNDEFS[col][<NUM_LIT:2>](x)<EOL>for x in lccolumns[colind]])<EOL><DEDENT>lcdict['<STR_LIT>'] = [x.lower() for x in lcdict['<STR_LIT>']]<EOL>return lcdict<EOL>
This reads in a K2 lightcurve in CSV format. Transparently reads gzipped
files.

Parameters
----------

lcfile : str
    The light curve file to read.

Returns
-------

dict
    Returns an lcdict.