#==================================================================================================== #==================================================================================================== #initialise lcplot = LCplot() #==================================================================================================== if __name__ == '__main__': '''tests''' from decor.profile import profile profiler = profile() @profiler.histogram def tests(**kws): #generate some data N = 250 np.random.seed(666) t = np.linspace(0, 2*np.pi, N) y = [np.sin(3*t), #np.cos(10*t), np.cos(10*np.sqrt(t))] e = np.random.randn(len(y), N) m = np.random.rand(len(y), N) > 0.8 ##try: #case 1: bare minimum fig, plots, *stuff = lcplot(y[0], **kws )
import matplotlib.pyplot as plt from matplotlib import rcParams from matplotlib.path import Path from matplotlib.ticker import Formatter, AutoMinorLocator from matplotlib.dates import AutoDateFormatter, AutoDateLocator, date2num, num2date from matplotlib.transforms import (Transform, IdentityTransform, Affine2D, blended_transform_factory as btf) from mpl_toolkits.axes_grid1.parasite_axes import SubplotHost from grafico.ticks import DegreeFormatter, TransFormatter from recipes.list import sorter #from decor.misc import persistant_memoizer from decor.profile import profile profiler = profile() #truncate_lines=50 #import json #==================================================================================================== #coordinate_cache = '/home/hannes/work/obstools/plan/.coordcache' #@persistant_memoizer(coordinate_cache) #FIXME:TypeError: <SkyCoord (ICRS): (ra, dec) in deg (223.421083, -55.36075)> #is not JSON serializable def resolver(name): '''Get the target coordinates if known''' #try extract J coordinates from name try: return Jparser(name).skycoord()