Giter Club home page Giter Club logo

effort2's People

Contributors

chaoyi-lyu avatar markusprim avatar meliache avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

effort2's Issues

Class interface: Make properites that should not be set directly private

The BtoV class contains properties like BtoV.mL are public and can be set/modified after initializing the class, e.g. BtoV.mL = ..., but should not. The reason is that mL is used to set the attributes BtoV.kinematics and subsequently BtoV.w_max, BtoV.w_min etc, and those will not get updated if you set the mL property.

I suggest using leading underscore to mark those properites that should just be set via the constructor and are otherwise internal as private by making their names have leading underscores. We could also add a property function called mL that allows to obtain the stored lepton mass, but doesn't allow for it being set. Then, optionally, we could also add a setter function of the same name, e.g. something like:

    @property
    def mL(self):
        return self._mL

    @mL.setter
    def mL(self, value):
        if value < 0:
            raise ValueError(...)
        # update value
        self._mL = value
        # update kinematics
        self.kinematics = ... 
        self.w_max = ...

I agree that we want to make this idiot prove.
If mL should be private, or a property with setter (so that it also sets it correctly in all other > classes of the composite class) is a thing to debate.

Originally posted by @MarkusPrim in #2 (comment)

Couple of minor comments

Maybe I'm doing things wrong but here are a couple of small issues I corrected locally to be able to use eFFORT2.

  1. When using BToRhoBSZ class from formFactorBtoU.py, I had to add self.q2 which is used but not declared. I just added: self. q2 = self.kinematics.q2

  2. When calculating rates from BtoV.py, I use a pandas dataframe which causes the assert ... <= ... <= ... to fail. I just commented them out but probably not the best thing to do.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.