Coverage for python/lsst/sims/catalogs/decorators/decorators.py : 94%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
#---------------------------------------------------------------------- # Define decorators for get_* methods
# The cached decorator specifies that once the column is computed for # a given database chunk, it is cached in memory and not computed again.
"""Decorator for specifying that the computed result should be cached""" raise ValueError("@cached can only be applied to get_* methods: " "Method '%s' invalid." % f.__name__) def new_f(self, *args, **kwargs): else:
"""Specifies that a column is a "compound column", that is, it returns multiple values. This is useful in the case of, e.g. RA/DEC, or magnitudes.
For example, to return an RA and a DEC together, use, e.g.::
@compound('ra_corr', 'dec_corr') def get_point_correction(self): raJ2000 = self.column_by_name('raJ2000') decJ2000 - self.column_by_name('decJ2000') ra_corr, dec_corr = precess(raJ2000, decJ2000) return (ra_corr, dec_corr)
""" def new_f(self, *args, **kwargs):
|