<commit_before><commit_msg>galpy: started on dfs that are only a function of the enery<commit_after>###############################################################################
#   Edf.py: top-level class for distribution functions that are only a 
#           function of the energy
###############################################################################
from galpy.orbit import Orbit, planarOrbitTop
class Edf:
    """Top-level class for distribution functions that are only a function of
    the energy"""
    def __init__(self):
        return None

    def __call__(self,call_in,t=None):
        """
        NAME:
           __call__
        PURPOSE:
           evaluate the DF
        INPUT:
           Either:
              a) E - the energy
              b) Some orbit instance, whose E(t) method will be called; t is an
                 optional second input
        OUTPUT:
           df(E) or df(Orbit(t))
        HISTORY:
           2010-07-12 - Written - Bovy (NYU)
        """
        if isinstance(call_in,'Orbit') or isinstance(call_in,'planarOrbitTop'):
            if not t == None:
                E= call_in.E(t)
            else:
                E= call_in()
            return self.eval(E)
        else:
            return self.eval(call_in)

{'fraction_non_alphanumeric': 0.1952941176470588, 'fraction_numerical': 0.006274509803921568, 'mean_word_length': 2.045346062052506, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5679598', 'n_tokens_mistral': 345, 'n_tokens_neox': 326, 'n_words': 107}