def _pkl_finder_objectinfo(<EOL>objectinfo,<EOL>varinfo,<EOL>findercmap,<EOL>finderconvolve,<EOL>sigclip,<EOL>normto,<EOL>normmingap,<EOL>deredden_object=True,<EOL>custom_bandpasses=None,<EOL>lclistpkl=None,<EOL>nbrradiusarcsec=<NUM_LIT>,<EOL>maxnumneighbors=<NUM_LIT:5>,<EOL>plotdpi=<NUM_LIT:100>,<EOL>findercachedir='<STR_LIT>',<EOL>verbose=True,<EOL>gaia_submit_timeout=<NUM_LIT>,<EOL>gaia_submit_tries=<NUM_LIT:3>,<EOL>gaia_max_timeout=<NUM_LIT>,<EOL>gaia_mirror=None,<EOL>fast_mode=False,<EOL>complete_query_later=True<EOL>):
<EOL>if fast_mode is True:<EOL><INDENT>skyview_lookup = False<EOL>skyview_timeout = <NUM_LIT><EOL>skyview_retry_failed = False<EOL>dust_timeout = <NUM_LIT><EOL>gaia_submit_timeout = <NUM_LIT><EOL>gaia_max_timeout = <NUM_LIT><EOL>gaia_submit_tries = <NUM_LIT:2><EOL>complete_query_later = False<EOL>search_simbad = False<EOL><DEDENT>elif isinstance(fast_mode, (int, float)) and fast_mode > <NUM_LIT:0.0>:<EOL><INDENT>skyview_lookup = True<EOL>skyview_timeout = fast_mode<EOL>skyview_retry_failed = False<EOL>dust_timeout = fast_mode<EOL>gaia_submit_timeout = <NUM_LIT>*fast_mode<EOL>gaia_max_timeout = fast_mode<EOL>gaia_submit_tries = <NUM_LIT:2><EOL>complete_query_later = False<EOL>search_simbad = False<EOL><DEDENT>else:<EOL><INDENT>skyview_lookup = True<EOL>skyview_timeout = <NUM_LIT><EOL>skyview_retry_failed = True<EOL>dust_timeout = <NUM_LIT><EOL>search_simbad = True<EOL><DEDENT>if (isinstance(objectinfo, dict) and<EOL>('<STR_LIT>' in objectinfo or '<STR_LIT>' in objectinfo) and<EOL>'<STR_LIT>' in objectinfo and '<STR_LIT>' in objectinfo and<EOL>objectinfo['<STR_LIT>'] and objectinfo['<STR_LIT>']):<EOL><INDENT>if '<STR_LIT>' not in objectinfo:<EOL><INDENT>objectid = objectinfo['<STR_LIT>']<EOL><DEDENT>else:<EOL><INDENT>objectid = objectinfo['<STR_LIT>']<EOL><DEDENT>if verbose and skyview_lookup:<EOL><INDENT>LOGINFO('<STR_LIT>'<EOL>'<STR_LIT>' %<EOL>(objectid, objectinfo['<STR_LIT>'], objectinfo['<STR_LIT>']))<EOL><DEDENT>elif verbose and not skyview_lookup:<EOL><INDENT>LOGINFO('<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>' %<EOL>(objectid, objectinfo['<STR_LIT>'], objectinfo['<STR_LIT>']))<EOL><DEDENT>try:<EOL><INDENT>if skyview_lookup:<EOL><INDENT>try:<EOL><INDENT>finder, finderheader = skyview_stamp(<EOL>objectinfo['<STR_LIT>'],<EOL>objectinfo['<STR_LIT>'],<EOL>convolvewith=finderconvolve,<EOL>verbose=verbose,<EOL>flip=False,<EOL>cachedir=findercachedir,<EOL>timeout=skyview_timeout,<EOL>retry_failed=skyview_retry_failed,<EOL>)<EOL><DEDENT>except OSError as e:<EOL><INDENT>if not fast_mode:<EOL><INDENT>LOGERROR(<EOL>'<STR_LIT>'<EOL>)<EOL>finder, finderheader = skyview_stamp(<EOL>objectinfo['<STR_LIT>'],<EOL>objectinfo['<STR_LIT>'],<EOL>convolvewith=finderconvolve,<EOL>verbose=verbose,<EOL>flip=False,<EOL>cachedir=findercachedir,<EOL>forcefetch=True,<EOL>timeout=skyview_timeout,<EOL>retry_failed=False  <EOL>)<EOL><DEDENT><DEDENT>finderfig = plt.figure(figsize=(<NUM_LIT:3>,<NUM_LIT:3>),dpi=plotdpi)<EOL>finderwcs = WCS(finderheader)<EOL>ax = finderfig.add_subplot(<NUM_LIT>, frameon=False)<EOL>ax.imshow(finder, cmap=findercmap, origin='<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>finder, finderheader, finderfig, finderwcs = (<EOL>None, None, None, None<EOL>)<EOL><DEDENT>if (lclistpkl is not None and<EOL>nbrradiusarcsec is not None and<EOL>nbrradiusarcsec > <NUM_LIT:0.0>):<EOL><INDENT>if isinstance(lclistpkl, str) and os.path.exists(lclistpkl):<EOL><INDENT>if lclistpkl.endswith('<STR_LIT>'):<EOL><INDENT>infd = gzip.open(lclistpkl,'<STR_LIT:rb>')<EOL><DEDENT>else:<EOL><INDENT>infd = open(lclistpkl,'<STR_LIT:rb>')<EOL><DEDENT>lclist = pickle.load(infd)<EOL>infd.close()<EOL><DEDENT>elif isinstance(lclistpkl, dict):<EOL><INDENT>lclist = lclistpkl<EOL><DEDENT>else:<EOL><INDENT>LOGERROR('<STR_LIT>'<EOL>'<STR_LIT>')<EOL>lclist = dict()<EOL><DEDENT>if '<STR_LIT>' not in lclist:<EOL><INDENT>LOGERROR('<STR_LIT>'<EOL>'<STR_LIT>'<EOL>% (objectid, lclistpkl))<EOL>neighbors = None<EOL>kdt = None<EOL><DEDENT>else:<EOL><INDENT>kdt = lclist['<STR_LIT>']<EOL>obj_cosdecl = np.cos(np.radians(objectinfo['<STR_LIT>']))<EOL>obj_sindecl = np.sin(np.radians(objectinfo['<STR_LIT>']))<EOL>obj_cosra = np.cos(np.radians(objectinfo['<STR_LIT>']))<EOL>obj_sinra = np.sin(np.radians(objectinfo['<STR_LIT>']))<EOL>obj_xyz = np.column_stack((obj_cosra*obj_cosdecl,<EOL>obj_sinra*obj_cosdecl,<EOL>obj_sindecl))<EOL>match_xyzdist = (<EOL><NUM_LIT> * np.sin(np.radians(nbrradiusarcsec/<NUM_LIT>)/<NUM_LIT>)<EOL>)<EOL>matchdists, matchinds = kdt.query(<EOL>obj_xyz,<EOL>k=maxnumneighbors+<NUM_LIT:1>,  <EOL>distance_upper_bound=match_xyzdist<EOL>)<EOL>mdsorted = np.argsort(matchdists[<NUM_LIT:0>])<EOL>matchdists = matchdists[<NUM_LIT:0>][mdsorted]<EOL>matchinds = matchinds[<NUM_LIT:0>][mdsorted]<EOL>neighbors = []<EOL>nbrind = <NUM_LIT:0><EOL>for md, mi in zip(matchdists, matchinds):<EOL><INDENT>if np.isfinite(md) and md > <NUM_LIT:0.0>:<EOL><INDENT>if skyview_lookup:<EOL><INDENT>pixcoords = finderwcs.all_world2pix(<EOL>np.array([[lclist['<STR_LIT>']['<STR_LIT>'][mi],<EOL>lclist['<STR_LIT>']['<STR_LIT>'][mi]]]),<EOL><NUM_LIT:0><EOL>)<EOL>thisnbr = {<EOL>'<STR_LIT>':(<EOL>lclist['<STR_LIT>']['<STR_LIT>'][mi]<EOL>),<EOL>'<STR_LIT>':lclist['<STR_LIT>']['<STR_LIT>'][mi],<EOL>'<STR_LIT>':lclist['<STR_LIT>']['<STR_LIT>'][mi],<EOL>'<STR_LIT>':pixcoords[<NUM_LIT:0>,<NUM_LIT:0>],<EOL>'<STR_LIT>':<NUM_LIT> - pixcoords[<NUM_LIT:0>,<NUM_LIT:1>],<EOL>'<STR_LIT>':_xyzdist_to_distarcsec(md),<EOL>'<STR_LIT>': lclist['<STR_LIT>']['<STR_LIT>'][mi]<EOL>}<EOL>neighbors.append(thisnbr)<EOL>nbrind = nbrind+<NUM_LIT:1><EOL>annotatex = pixcoords[<NUM_LIT:0>,<NUM_LIT:0>]<EOL>annotatey = pixcoords[<NUM_LIT:0>,<NUM_LIT:1>]<EOL>if ((<NUM_LIT> - annotatex) > <NUM_LIT>):<EOL><INDENT>offx = annotatex + <NUM_LIT><EOL>xha = '<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>offx = annotatex - <NUM_LIT><EOL>xha = '<STR_LIT>'<EOL><DEDENT>if ((<NUM_LIT> - annotatey) > <NUM_LIT>):<EOL><INDENT>offy = annotatey - <NUM_LIT><EOL>yha = '<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>offy = annotatey + <NUM_LIT><EOL>yha = '<STR_LIT>'<EOL><DEDENT>ax.annotate('<STR_LIT>' % nbrind,<EOL>(annotatex, annotatey),<EOL>xytext=(offx, offy),<EOL>arrowprops={'<STR_LIT>':'<STR_LIT>',<EOL>'<STR_LIT>':'<STR_LIT>',<EOL>'<STR_LIT:width>':<NUM_LIT:1.0>,<EOL>'<STR_LIT>':<NUM_LIT:1.0>,<EOL>'<STR_LIT>':<NUM_LIT:0.1>,<EOL>'<STR_LIT>':<NUM_LIT:0.0>},<EOL>color='<STR_LIT>',<EOL>horizontalalignment=xha,<EOL>verticalalignment=yha)<EOL><DEDENT>else:<EOL><INDENT>thisnbr = {<EOL>'<STR_LIT>':(<EOL>lclist['<STR_LIT>']['<STR_LIT>'][mi]<EOL>),<EOL>'<STR_LIT>':lclist['<STR_LIT>']['<STR_LIT>'][mi],<EOL>'<STR_LIT>':lclist['<STR_LIT>']['<STR_LIT>'][mi],<EOL>'<STR_LIT>':<NUM_LIT:0.0>,<EOL>'<STR_LIT>':<NUM_LIT:0.0>,<EOL>'<STR_LIT>':_xyzdist_to_distarcsec(md),<EOL>'<STR_LIT>': lclist['<STR_LIT>']['<STR_LIT>'][mi]<EOL>}<EOL>neighbors.append(thisnbr)<EOL>nbrind = nbrind+<NUM_LIT:1><EOL><DEDENT><DEDENT><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>neighbors = None<EOL>kdt = None<EOL><DEDENT>if skyview_lookup:<EOL><INDENT>ax.set_xticks([])<EOL>ax.set_yticks([])<EOL>object_pixcoords = finderwcs.all_world2pix(<EOL>[[objectinfo['<STR_LIT>'],<EOL>objectinfo['<STR_LIT>']]],<EOL><NUM_LIT:0><EOL>)<EOL>ax.axvline(<EOL>x=object_pixcoords[<NUM_LIT:0>,<NUM_LIT:0>],<EOL>ymin=<NUM_LIT>,<EOL>ymax=<NUM_LIT>,<EOL>linewidth=<NUM_LIT:1>,<EOL>color='<STR_LIT:b>'<EOL>)<EOL>ax.axhline(<EOL>y=object_pixcoords[<NUM_LIT:0>,<NUM_LIT:1>],<EOL>xmin=<NUM_LIT>,<EOL>xmax=<NUM_LIT>,<EOL>linewidth=<NUM_LIT:1>,<EOL>color='<STR_LIT:b>'<EOL>)<EOL>ax.set_frame_on(False)<EOL>finderpng = StrIO()<EOL>finderfig.savefig(finderpng,<EOL>bbox_inches='<STR_LIT>',<EOL>pad_inches=<NUM_LIT:0.0>, format='<STR_LIT>')<EOL>plt.close()<EOL>finderpng.seek(<NUM_LIT:0>)<EOL>finderb64 = base64.b64encode(finderpng.read())<EOL>finderpng.close()<EOL><DEDENT>else:<EOL><INDENT>finderb64 = None<EOL><DEDENT><DEDENT>except Exception as e:<EOL><INDENT>LOGEXCEPTION('<STR_LIT>'<EOL>'<STR_LIT>' %<EOL>(objectid, objectinfo['<STR_LIT>'], objectinfo['<STR_LIT>']))<EOL>finderb64 = None<EOL>neighbors = None<EOL>kdt = None<EOL><DEDENT><DEDENT>else:<EOL><INDENT>finderb64 = None<EOL>neighbors = None<EOL>kdt = None<EOL><DEDENT>if isinstance(objectinfo, dict):<EOL><INDENT>if '<STR_LIT>' not in objectinfo and '<STR_LIT>' in objectinfo:<EOL><INDENT>objectid = objectinfo['<STR_LIT>']<EOL>objectinfo['<STR_LIT>'] = objectid<EOL><DEDENT>elif '<STR_LIT>' in objectinfo:<EOL><INDENT>objectid = objectinfo['<STR_LIT>']<EOL><DEDENT>else:<EOL><INDENT>objectid = os.urandom(<NUM_LIT:12>).hex()[:<NUM_LIT:7>]<EOL>objectinfo['<STR_LIT>'] = objectid<EOL>LOGWARNING('<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT>nbrfeat = neighbor_gaia_features(<EOL>objectinfo,<EOL>kdt,<EOL>nbrradiusarcsec,<EOL>verbose=False,<EOL>gaia_submit_timeout=gaia_submit_timeout,<EOL>gaia_submit_tries=gaia_submit_tries,<EOL>gaia_max_timeout=gaia_max_timeout,<EOL>gaia_mirror=gaia_mirror,<EOL>complete_query_later=complete_query_later,<EOL>search_simbad=search_simbad<EOL>)<EOL>objectinfo.update(nbrfeat)<EOL>if ( ('<STR_LIT>' not in objectinfo) or<EOL>( ('<STR_LIT>' in objectinfo) and<EOL>( (objectinfo['<STR_LIT>'] is None) or<EOL>(not np.isfinite(objectinfo['<STR_LIT>'])) ) ) ):<EOL><INDENT>if '<STR_LIT>' in nbrfeat['<STR_LIT>']:<EOL><INDENT>objectinfo['<STR_LIT>'] = nbrfeat['<STR_LIT>'][<NUM_LIT:0>]<EOL>objectinfo['<STR_LIT>'] = nbrfeat['<STR_LIT>'][<NUM_LIT:0>]<EOL>objectinfo['<STR_LIT>'] = '<STR_LIT>'<EOL>if verbose:<EOL><INDENT>LOGWARNING('<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>objectinfo['<STR_LIT>'] = '<STR_LIT>'<EOL><DEDENT>if ( ('<STR_LIT>' not in objectinfo) or<EOL>( ('<STR_LIT>' in objectinfo) and<EOL>( (objectinfo['<STR_LIT>'] is None) or<EOL>(not np.isfinite(objectinfo['<STR_LIT>'])) ) ) ):<EOL><INDENT>if '<STR_LIT>' in nbrfeat['<STR_LIT>']:<EOL><INDENT>objectinfo['<STR_LIT>'] = nbrfeat['<STR_LIT>'][<NUM_LIT:0>]<EOL>objectinfo['<STR_LIT>'] = nbrfeat['<STR_LIT>'][<NUM_LIT:0>]<EOL>objectinfo['<STR_LIT>'] = '<STR_LIT>'<EOL>if verbose:<EOL><INDENT>LOGWARNING('<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>objectinfo['<STR_LIT>'] = '<STR_LIT>'<EOL><DEDENT>if '<STR_LIT>' in objectinfo['<STR_LIT>']:<EOL><INDENT>objectinfo['<STR_LIT>'] = objectinfo['<STR_LIT>'][<NUM_LIT:0>]<EOL>objectinfo['<STR_LIT>'] = objectinfo['<STR_LIT>'][<NUM_LIT:0>]<EOL>objectinfo['<STR_LIT>'] = objectinfo['<STR_LIT>'][<NUM_LIT:0>]<EOL>objectinfo['<STR_LIT>'] = objectinfo['<STR_LIT>'][<NUM_LIT:0>]<EOL>objectinfo['<STR_LIT>'] = (<EOL>objectinfo['<STR_LIT>'][<NUM_LIT:0>]<EOL>)<EOL>objectinfo['<STR_LIT>'] = objectinfo['<STR_LIT>'][<NUM_LIT:0>]<EOL>objectinfo['<STR_LIT>'] = objectinfo['<STR_LIT>'][<NUM_LIT:0>]<EOL>objectinfo['<STR_LIT>'] = objectinfo['<STR_LIT>'][<NUM_LIT:0>]<EOL>objectinfo['<STR_LIT>'] = objectinfo['<STR_LIT>'][<NUM_LIT:0>]<EOL><DEDENT>else:<EOL><INDENT>objectinfo['<STR_LIT>'] = None<EOL>objectinfo['<STR_LIT>'] = np.nan<EOL>objectinfo['<STR_LIT>'] = np.nan<EOL>objectinfo['<STR_LIT>'] = np.nan<EOL>objectinfo['<STR_LIT>'] = np.nan<EOL>objectinfo['<STR_LIT>'] = np.nan<EOL>objectinfo['<STR_LIT>'] = np.nan<EOL>objectinfo['<STR_LIT>'] = np.nan<EOL>objectinfo['<STR_LIT>'] = np.nan<EOL><DEDENT>if ('<STR_LIT>' in objectinfo and<EOL>objectinfo['<STR_LIT>'] is not None and<EOL>np.isfinite(objectinfo['<STR_LIT>']) and<EOL>'<STR_LIT>' in objectinfo and<EOL>objectinfo['<STR_LIT>'] is not None and<EOL>np.isfinite(objectinfo['<STR_LIT>'])):<EOL><INDENT>try:<EOL><INDENT>ticres = tic_conesearch(objectinfo['<STR_LIT>'],<EOL>objectinfo['<STR_LIT>'],<EOL>radius_arcmin=<NUM_LIT>/<NUM_LIT>,<EOL>verbose=verbose,<EOL>timeout=gaia_max_timeout,<EOL>maxtries=gaia_submit_tries)<EOL>if ticres is not None:<EOL><INDENT>with open(ticres['<STR_LIT>'],'<STR_LIT:r>') as infd:<EOL><INDENT>ticinfo = json.load(infd)<EOL><DEDENT>if ('<STR_LIT:data>' in ticinfo and<EOL>len(ticinfo['<STR_LIT:data>']) > <NUM_LIT:0> and<EOL>isinstance(ticinfo['<STR_LIT:data>'][<NUM_LIT:0>], dict)):<EOL><INDENT>objectinfo['<STR_LIT>'] = str(ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>'])<EOL>objectinfo['<STR_LIT>'] = ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>objectinfo['<STR_LIT>'] = (<EOL>ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT:version>']<EOL>)<EOL>objectinfo['<STR_LIT>'] = (<EOL>ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>)<EOL>objectinfo['<STR_LIT>'] = (<EOL>ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>)<EOL>objectinfo['<STR_LIT>'] = (<EOL>ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>)<EOL>objectinfo['<STR_LIT>'] = (<EOL>ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>)<EOL>objectinfo['<STR_LIT>'] = (<EOL>ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>)<EOL>objectinfo['<STR_LIT>'] = (<EOL>ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>)<EOL>objectinfo['<STR_LIT>'] = (<EOL>ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>)<EOL>objectinfo['<STR_LIT>'] = (<EOL>ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>)<EOL>objectinfo['<STR_LIT>'] = (<EOL>ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>)<EOL>objectinfo['<STR_LIT>'] = (<EOL>ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>)<EOL>objectinfo['<STR_LIT>'] = (<EOL>ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>)<EOL>objectinfo['<STR_LIT>'] = (<EOL>ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>)<EOL>objectinfo['<STR_LIT>'] = (<EOL>ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>)<EOL>objectinfo['<STR_LIT>'] = (<EOL>ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>)<EOL>objectinfo['<STR_LIT>'] = (<EOL>ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>)<EOL>objectinfo['<STR_LIT>'] = (<EOL>ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>)<EOL>objectinfo['<STR_LIT>'] = (<EOL>ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>)<EOL>objectinfo['<STR_LIT>'] = (<EOL>ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>)<EOL>objectinfo['<STR_LIT>'] = (<EOL>ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT:d>']<EOL>)<EOL>objectinfo['<STR_LIT>'] = (<EOL>ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>)<EOL>if ('<STR_LIT>' not in objectinfo or<EOL>('<STR_LIT>' in objectinfo and<EOL>(objectinfo['<STR_LIT>'] is None))):<EOL><INDENT>objectinfo['<STR_LIT>'] = ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL><DEDENT>if ('<STR_LIT>' not in objectinfo or<EOL>('<STR_LIT>' in objectinfo and<EOL>(objectinfo['<STR_LIT>'] is None or<EOL>not np.isfinite(objectinfo['<STR_LIT>'])))):<EOL><INDENT>objectinfo['<STR_LIT>'] = (<EOL>ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>)<EOL>objectinfo['<STR_LIT>'] = (<EOL>ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>)<EOL><DEDENT>if ('<STR_LIT>' not in objectinfo or<EOL>('<STR_LIT>' in objectinfo and<EOL>(objectinfo['<STR_LIT>'] is None or<EOL>not np.isfinite(objectinfo['<STR_LIT>'])))):<EOL><INDENT>objectinfo['<STR_LIT>'] = (<EOL>ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>)<EOL>objectinfo['<STR_LIT>'] = (<EOL>ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>)<EOL>if (objectinfo['<STR_LIT>'] is not None and<EOL>np.isfinite(objectinfo['<STR_LIT>']) and<EOL>objectinfo['<STR_LIT>'] is not None and<EOL>np.isfinite(objectinfo['<STR_LIT>'])):<EOL><INDENT>objectinfo['<STR_LIT>'] = (<EOL>magnitudes.absolute_gaia_magnitude(<EOL>objectinfo['<STR_LIT>'],<EOL>objectinfo['<STR_LIT>']<EOL>)<EOL>)<EOL><DEDENT><DEDENT>if ('<STR_LIT>' not in objectinfo or<EOL>('<STR_LIT>' in objectinfo and<EOL>(objectinfo['<STR_LIT>'] is None or<EOL>not np.isfinite(objectinfo['<STR_LIT>'])))):<EOL><INDENT>objectinfo['<STR_LIT>'] = ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>objectinfo['<STR_LIT>'] = (<EOL>ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>)<EOL>objectinfo['<STR_LIT>'] = '<STR_LIT>'<EOL><DEDENT>if ('<STR_LIT>' not in objectinfo or<EOL>('<STR_LIT>' in objectinfo and<EOL>(objectinfo['<STR_LIT>'] is None or<EOL>not np.isfinite(objectinfo['<STR_LIT>'])))):<EOL><INDENT>objectinfo['<STR_LIT>'] = ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>objectinfo['<STR_LIT>'] = (<EOL>ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>)<EOL>objectinfo['<STR_LIT>'] = '<STR_LIT>'<EOL><DEDENT>if ('<STR_LIT>' not in objectinfo or<EOL>('<STR_LIT>' in objectinfo and<EOL>(objectinfo['<STR_LIT>'] is None or<EOL>not np.isfinite(objectinfo['<STR_LIT>'])))):<EOL><INDENT>objectinfo['<STR_LIT>'] = ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>objectinfo['<STR_LIT>'] = (<EOL>ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>)<EOL><DEDENT>if ('<STR_LIT>' not in objectinfo or<EOL>('<STR_LIT>' in objectinfo and<EOL>(objectinfo['<STR_LIT>'] is None or<EOL>not np.isfinite(objectinfo['<STR_LIT>'])))):<EOL><INDENT>objectinfo['<STR_LIT>'] = ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>objectinfo['<STR_LIT>'] = (<EOL>ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>)<EOL><DEDENT>if ('<STR_LIT>' not in objectinfo or<EOL>('<STR_LIT>' in objectinfo and<EOL>(objectinfo['<STR_LIT>'] is None or<EOL>not np.isfinite(objectinfo['<STR_LIT>'])))):<EOL><INDENT>objectinfo['<STR_LIT>'] = ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>objectinfo['<STR_LIT>'] = (<EOL>ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>)<EOL><DEDENT>if ('<STR_LIT>' not in objectinfo or<EOL>('<STR_LIT>' in objectinfo and<EOL>(objectinfo['<STR_LIT>'] is None or<EOL>not np.isfinite(objectinfo['<STR_LIT>'])))):<EOL><INDENT>objectinfo['<STR_LIT>'] = ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>objectinfo['<STR_LIT>'] = (<EOL>ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>)<EOL><DEDENT>if ('<STR_LIT>' not in objectinfo or<EOL>('<STR_LIT>' in objectinfo and<EOL>(objectinfo['<STR_LIT>'] is None or<EOL>not np.isfinite(objectinfo['<STR_LIT>'])))):<EOL><INDENT>objectinfo['<STR_LIT>'] = ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>objectinfo['<STR_LIT>'] = (<EOL>ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>)<EOL><DEDENT>if ('<STR_LIT>' not in objectinfo or<EOL>('<STR_LIT>' in objectinfo and<EOL>(objectinfo['<STR_LIT>'] is None or<EOL>not np.isfinite(objectinfo['<STR_LIT>'])))):<EOL><INDENT>objectinfo['<STR_LIT>'] = ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>objectinfo['<STR_LIT>'] = (<EOL>ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>)<EOL><DEDENT>if ('<STR_LIT>' not in objectinfo or<EOL>('<STR_LIT>' in objectinfo and<EOL>(objectinfo['<STR_LIT>'] is None or<EOL>not np.isfinite(objectinfo['<STR_LIT>'])))):<EOL><INDENT>objectinfo['<STR_LIT>'] = ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>objectinfo['<STR_LIT>'] = (<EOL>ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>)<EOL><DEDENT>if ('<STR_LIT>' not in objectinfo or<EOL>('<STR_LIT>' in objectinfo and<EOL>(objectinfo['<STR_LIT>'] is None or<EOL>not np.isfinite(objectinfo['<STR_LIT>'])))):<EOL><INDENT>objectinfo['<STR_LIT>'] = ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>objectinfo['<STR_LIT>'] = (<EOL>ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>)<EOL><DEDENT>if ('<STR_LIT>' not in objectinfo or<EOL>('<STR_LIT>' in objectinfo and<EOL>(objectinfo['<STR_LIT>'] is None or<EOL>not np.isfinite(objectinfo['<STR_LIT>'])))):<EOL><INDENT>objectinfo['<STR_LIT>'] = ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>objectinfo['<STR_LIT>'] = (<EOL>ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>)<EOL><DEDENT>if ('<STR_LIT>' not in objectinfo or<EOL>('<STR_LIT>' in objectinfo and<EOL>(objectinfo['<STR_LIT>'] is None or<EOL>not np.isfinite(objectinfo['<STR_LIT>'])))):<EOL><INDENT>objectinfo['<STR_LIT>'] = ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>objectinfo['<STR_LIT>'] = (<EOL>ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>)<EOL><DEDENT>if ('<STR_LIT>' not in objectinfo or<EOL>('<STR_LIT>' in objectinfo and<EOL>(objectinfo['<STR_LIT>'] is None or<EOL>not np.isfinite(objectinfo['<STR_LIT>'])))):<EOL><INDENT>objectinfo['<STR_LIT>'] = ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>objectinfo['<STR_LIT>'] = (<EOL>ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>)<EOL><DEDENT>if ('<STR_LIT>' not in objectinfo or<EOL>('<STR_LIT>' in objectinfo and<EOL>(objectinfo['<STR_LIT>'] is None or<EOL>not np.isfinite(objectinfo['<STR_LIT>'])))):<EOL><INDENT>objectinfo['<STR_LIT>'] = ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>objectinfo['<STR_LIT>'] = (<EOL>ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>)<EOL><DEDENT>if ('<STR_LIT>' not in objectinfo or<EOL>('<STR_LIT>' in objectinfo and<EOL>(objectinfo['<STR_LIT>'] is None or<EOL>not np.isfinite(objectinfo['<STR_LIT>'])))):<EOL><INDENT>objectinfo['<STR_LIT>'] = ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>objectinfo['<STR_LIT>'] = (<EOL>ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>)<EOL><DEDENT>if ('<STR_LIT>' not in objectinfo or<EOL>('<STR_LIT>' in objectinfo and<EOL>(objectinfo['<STR_LIT>'] is None or<EOL>not np.isfinite(objectinfo['<STR_LIT>'])))):<EOL><INDENT>objectinfo['<STR_LIT>'] = ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>objectinfo['<STR_LIT>'] = (<EOL>ticinfo['<STR_LIT:data>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>)<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>LOGERROR('<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>' %<EOL>(objectinfo['<STR_LIT>'],<EOL>objectinfo['<STR_LIT>'],<EOL>objectinfo['<STR_LIT>']))<EOL><DEDENT><DEDENT>except Exception as e:<EOL><INDENT>LOGEXCEPTION('<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>' %<EOL>(objectinfo['<STR_LIT>'],<EOL>objectinfo['<STR_LIT>'],<EOL>objectinfo['<STR_LIT>']))<EOL><DEDENT><DEDENT>coordfeat = coord_features(objectinfo)<EOL>colorfeat = color_features(objectinfo,<EOL>deredden=deredden_object,<EOL>custom_bandpasses=custom_bandpasses,<EOL>dust_timeout=dust_timeout)<EOL>colorclass = color_classification(colorfeat, coordfeat)<EOL>objectinfo.update(colorfeat)<EOL>objectinfo.update(coordfeat)<EOL>objectinfo.update(colorclass)<EOL>checkplotdict = {'<STR_LIT>':objectid,<EOL>'<STR_LIT>':neighbors,<EOL>'<STR_LIT>':objectinfo,<EOL>'<STR_LIT>':finderb64,<EOL>'<STR_LIT>':sigclip,<EOL>'<STR_LIT>':normto,<EOL>'<STR_LIT>':normmingap}<EOL>checkplotdict['<STR_LIT>']['<STR_LIT>'] = None<EOL><DEDENT>else:<EOL><INDENT>checkplotdict = {'<STR_LIT>':None,<EOL>'<STR_LIT>':None,<EOL>'<STR_LIT>':{<EOL>'<STR_LIT>':[],<EOL>'<STR_LIT>':[],<EOL>'<STR_LIT>':[],<EOL>'<STR_LIT>':[],<EOL>'<STR_LIT>':[],<EOL>'<STR_LIT>':[],<EOL>'<STR_LIT>':None,<EOL>'<STR_LIT>':None,<EOL>'<STR_LIT>':None,<EOL>'<STR_LIT>':None,<EOL>'<STR_LIT>':None,<EOL>'<STR_LIT>':None,<EOL>'<STR_LIT>':None,<EOL>'<STR_LIT>':None,<EOL>'<STR_LIT>':None,<EOL>'<STR_LIT>':None,<EOL>'<STR_LIT>':None,<EOL>'<STR_LIT>':None,<EOL>'<STR_LIT>':None,<EOL>'<STR_LIT>':None,<EOL>'<STR_LIT>':None,<EOL>'<STR_LIT>':None,<EOL>'<STR_LIT>':None,<EOL>'<STR_LIT>':None,<EOL>'<STR_LIT>':None,<EOL>'<STR_LIT>':None,<EOL>'<STR_LIT>':None,<EOL>'<STR_LIT>':None,<EOL>'<STR_LIT>':None,<EOL>'<STR_LIT>':None,<EOL>'<STR_LIT>':None,<EOL>'<STR_LIT>':None<EOL>},<EOL>'<STR_LIT>':None,<EOL>'<STR_LIT>':sigclip,<EOL>'<STR_LIT>':normto,<EOL>'<STR_LIT>':normmingap}<EOL><DEDENT>if isinstance(varinfo, dict):<EOL><INDENT>checkplotdict['<STR_LIT>'] = varinfo<EOL><DEDENT>else:<EOL><INDENT>checkplotdict['<STR_LIT>'] = {<EOL>'<STR_LIT>':None,<EOL>'<STR_LIT>':None,<EOL>'<STR_LIT>':None,<EOL>'<STR_LIT>':None,<EOL>'<STR_LIT>':None,<EOL>}<EOL><DEDENT>return checkplotdict<EOL>
This returns the finder chart and object information as a dict.

    Parameters
    ----------

    objectinfo : dict or None
        If provided, this is a dict containing information on the object whose
        light curve is being processed. This function will then be able to look
        up and download a finder chart for this object and write that to the
        output checkplotdict. External services such as GAIA, SIMBAD, TIC@MAST,
        etc. will also be used to look up this object by its coordinates, and
        will add in information available from those services.

        The `objectinfo` dict must be of the form and contain at least the keys
        described below::

            {'objectid': the name of the object,
             'ra': the right ascension of the object in decimal degrees,
             'decl': the declination of the object in decimal degrees,
             'ndet': the number of observations of this object}

        You can also provide magnitudes and proper motions of the object using
        the following keys and the appropriate values in the `objectinfo`
        dict. These will be used to calculate colors, total and reduced proper
        motion, etc. and display these in the output checkplot PNG::

            'pmra' -> the proper motion in mas/yr in right ascension,
            'pmdecl' -> the proper motion in mas/yr in declination,
            'umag'  -> U mag		 -> colors: U-B, U-V, U-g
            'bmag'  -> B mag		 -> colors: U-B, B-V
            'vmag'  -> V mag		 -> colors: U-V, B-V, V-R, V-I, V-K
            'rmag'  -> R mag		 -> colors: V-R, R-I
            'imag'  -> I mag		 -> colors: g-I, V-I, R-I, B-I
            'jmag'  -> 2MASS J mag	 -> colors: J-H, J-K, g-J, i-J
            'hmag'  -> 2MASS H mag	 -> colors: J-H, H-K
            'kmag'  -> 2MASS Ks mag	 -> colors: g-Ks, H-Ks, J-Ks, V-Ks
            'sdssu' -> SDSS u mag	 -> colors: u-g, u-V
            'sdssg' -> SDSS g mag	 -> colors: g-r, g-i, g-K, u-g, U-g, g-J
            'sdssr' -> SDSS r mag	 -> colors: r-i, g-r
            'sdssi' -> SDSS i mag	 -> colors: r-i, i-z, g-i, i-J, i-W1
            'sdssz' -> SDSS z mag	 -> colors: i-z, z-W2, g-z
            'ujmag' -> UKIRT J mag	 -> colors: J-H, H-K, J-K, g-J, i-J
            'uhmag' -> UKIRT H mag	 -> colors: J-H, H-K
            'ukmag' -> UKIRT K mag	 -> colors: g-K, H-K, J-K, V-K
            'irac1' -> Spitzer IRAC1 mag -> colors: i-I1, I1-I2
            'irac2' -> Spitzer IRAC2 mag -> colors: I1-I2, I2-I3
            'irac3' -> Spitzer IRAC3 mag -> colors: I2-I3
            'irac4' -> Spitzer IRAC4 mag -> colors: I3-I4
            'wise1' -> WISE W1 mag	 -> colors: i-W1, W1-W2
            'wise2' -> WISE W2 mag	 -> colors: W1-W2, W2-W3
            'wise3' -> WISE W3 mag	 -> colors: W2-W3
            'wise4' -> WISE W4 mag	 -> colors: W3-W4

        If you have magnitude measurements in other bands, use the
        `custom_bandpasses` kwarg to pass these in.

        If this is None, no object information will be incorporated into the
        checkplot (kind of making it effectively useless for anything other than
        glancing at the phased light curves at various 'best' periods from the
        period-finder results).

    varinfo : dict or None
        If this is None, a blank dict of the form below will be added to the
        checkplotdict::

            {'objectisvar': None -> variability flag (None indicates unset),
             'vartags': CSV str containing variability type tags from review,
             'varisperiodic': None -> periodic variability flag (None -> unset),
             'varperiod': the period associated with the periodic variability,
             'varepoch': the epoch associated with the periodic variability}

        If you provide a dict matching this format in this kwarg, this will be
        passed unchanged to the output checkplotdict produced.

    findercmap : str or matplotlib.cm.ColorMap object
        The Colormap object to use for the finder chart image.

    finderconvolve : astropy.convolution.Kernel object or None
        If not None, the Kernel object to use for convolving the finder image.

    sigclip : float or int or sequence of two floats/ints or None
        If a single float or int, a symmetric sigma-clip will be performed using
        the number provided as the sigma-multiplier to cut out from the input
        time-series.

        If a list of two ints/floats is provided, the function will perform an
        'asymmetric' sigma-clip. The first element in this list is the sigma
        value to use for fainter flux/mag values; the second element in this
        list is the sigma value to use for brighter flux/mag values. For
        example, `sigclip=[10., 3.]`, will sigclip out greater than 10-sigma
        dimmings and greater than 3-sigma brightenings. Here the meaning of
        "dimming" and "brightening" is set by *physics* (not the magnitude
        system), which is why the `magsarefluxes` kwarg must be correctly set.

        If `sigclip` is None, no sigma-clipping will be performed, and the
        time-series (with non-finite elems removed) will be passed through to
        the output.

    normto : {'globalmedian', 'zero'} or a float
        This is specified as below::

            'globalmedian' -> norms each mag to global median of the LC column
            'zero'         -> norms each mag to zero
            a float        -> norms each mag to this specified float value.

    normmingap : float
        This defines how much the difference between consecutive measurements is
        allowed to be to consider them as parts of different timegroups. By
        default it is set to 4.0 days.

    deredden_object : bool
        If this is True, will use the 2MASS DUST service to get extinction
        coefficients in various bands, and then try to deredden the magnitudes
        and colors of the object already present in the checkplot's objectinfo
        dict.

    custom_bandpasses : dict
        This is a dict used to provide custom bandpass definitions for any
        magnitude measurements in the objectinfo dict that are not automatically
        recognized by :py:func:`astrobase.varclass.starfeatures.color_features`.

    lclistpkl : dict or str
        If this is provided, must be a dict resulting from reading a catalog
        produced by the `lcproc.catalogs.make_lclist` function or a str path
        pointing to the pickle file produced by that function. This catalog is
        used to find neighbors of the current object in the current light curve
        collection. Looking at neighbors of the object within the radius
        specified by `nbrradiusarcsec` is useful for light curves produced by
        instruments that have a large pixel scale, so are susceptible to
        blending of variability and potential confusion of neighbor variability
        with that of the actual object being looked at. If this is None, no
        neighbor lookups will be performed.

    nbrradiusarcsec : float
        The radius in arcseconds to use for a search conducted around the
        coordinates of this object to look for any potential confusion and
        blending of variability amplitude caused by their proximity.

    maxnumneighbors : int
        The maximum number of neighbors that will have their light curves and
        magnitudes noted in this checkplot as potential blends with the target
        object.

    plotdpi : int
        The resolution in DPI of the plots to generate in this function
        (e.g. the finder chart, etc.)

    findercachedir : str
        The path to the astrobase cache directory for finder chart downloads
        from the NASA SkyView service.

    verbose : bool
        If True, will indicate progress and warn about potential problems.

    gaia_submit_timeout : float
        Sets the timeout in seconds to use when submitting a request to look up
        the object's information to the GAIA service. Note that if `fast_mode`
        is set, this is ignored.

    gaia_submit_tries : int
        Sets the maximum number of times the GAIA services will be contacted to
        obtain this object's information. If `fast_mode` is set, this is
        ignored, and the services will be contacted only once (meaning that a
        failure to respond will be silently ignored and no GAIA data will be
        added to the checkplot's objectinfo dict).

    gaia_max_timeout : float
        Sets the timeout in seconds to use when waiting for the GAIA service to
        respond to our request for the object's information. Note that if
        `fast_mode` is set, this is ignored.

    gaia_mirror : str
        This sets the GAIA mirror to use. This is a key in the
        `services.gaia.GAIA_URLS` dict which defines the URLs to hit for each
        mirror.

    fast_mode : bool or float
        This runs the external catalog operations in a "fast" mode, with short
        timeouts and not trying to hit external catalogs that take a long time
        to respond.

        If this is set to True, the default settings for the external requests
        will then become::

            skyview_lookup = False
            skyview_timeout = 10.0
            skyview_retry_failed = False
            dust_timeout = 10.0
            gaia_submit_timeout = 7.0
            gaia_max_timeout = 10.0
            gaia_submit_tries = 2
            complete_query_later = False
            search_simbad = False

        If this is a float, will run in "fast" mode with the provided timeout
        value in seconds and the following settings::

            skyview_lookup = True
            skyview_timeout = fast_mode
            skyview_retry_failed = False
            dust_timeout = fast_mode
            gaia_submit_timeout = 0.66*fast_mode
            gaia_max_timeout = fast_mode
            gaia_submit_tries = 2
            complete_query_later = False
            search_simbad = False

    complete_query_later : bool
        If this is True, saves the state of GAIA queries that are not yet
        complete when `gaia_max_timeout` is reached while waiting for the GAIA
        service to respond to our request. A later call for GAIA info on the
        same object will attempt to pick up the results from the existing query
        if it's completed. If `fast_mode` is True, this is ignored.

    Returns
    -------

    dict
        A checkplotdict is returned containing the objectinfo and varinfo dicts,
        ready to use with the functions below to add in light curve plots,
        phased LC plots, xmatch info, etc.