-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bwutils tweaks #236
Bwutils tweaks #236
Conversation
|
||
Class adapted from bw2calc.multi_lca.MultiLCA to include also CONTRIBUTION ANALYSIS. | ||
Attributes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is still quite incomplete. Best introduce also the different vectors and matrices that are used for storing the LCA results (e.g. process contributions); and also the indexing dictionaries
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have just added all of the attributes of the class. It kind of feels like the comments in the init method are superfluous now.
self.technosphere_flows = dict() | ||
# Life cycle inventory (biosphere flows) by functional unit | ||
self.inventory = dict() | ||
# Inventory (biosphere flows) by activity (e.g. 2000x15000) and functional unit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for a specific functional unit and LCIA method
"""Contribution Analysis built on top of the Multi-LCA class.""" | ||
"""Contribution Analysis built on top of the Multi-LCA class. | ||
|
||
This class requires instantiated MLCA and MetaDataFrame objects. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the right name now MetaDataFrame or MetaDataStore ? I have seen both now :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops, you're right, have been using them interchangeably, will correct to MetaDataStore.
|
||
This class does not subclass the `LCA` class, and performs all calculations upon instantiation. | ||
Class adapted from bw2calc.multi_lca.MultiLCA to include also | ||
CONTRIBUTION ANALYSIS. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps write something like this "process and elementary flow contributions and other LCA results (see attributes below)"
came across this as we also implement our own contribution analysis class...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about:
This class is adapted from
bw2calc.multi_lca.MultiLCA
and includes a
number of additional attributes required to perform process- and
elementary flow contribution analysis (see classContributions
below).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with small comments. Very nice to see all of this much better documentation!!
Add numpy-style docstrings to some of the classes in the
bwutils
directory which hopefully clarify the functionality.In addition, create new methods in the MetaDataStore class to encapsulate repeated code.
Finally, altered the
inventory_df
method, which used the reservedtype
keyword to useinventory_type
instead. (which lead to small edits in code using that function).