effort2's People
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.
-
When using
BToRhoBSZ
class fromformFactorBtoU.py
, I had to addself.q2
which is used but not declared. I just added:self. q2 = self.kinematics.q2
-
When calculating rates from
BtoV.py
, I use a pandas dataframe which causes theassert ... <= ... <= ...
to fail. I just commented them out but probably not the best thing to do.
Variable number of BCL parameters
Put N as a parameter in BCL.py for different expansions.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.