1

I have a list of characterization factors in the following format:

[(('biosphere3', key), characterization_factor)] 

Here is a quick excerpt:

my_cfs = [(('biosphere3', 'e259263c-d1f1-449f-bb9b-73c6d0a32a00'), 1.0),
          (('biosphere3', '16eeda8a-1ea2-408e-ab37-2648495058dd'), 1.0),
          (('biosphere3', 'aa7cac3a-3625-41d4-bc54-33e2cf11ec46'), 1.0)
         ]

How do I save my_cfs to my Brightway Methods?

MPa
  • 1,086
  • 1
  • 10
  • 25

1 Answers1

3

The procedure should be very similar to writing a new Database, as they share a lot of code.

Create and register a new Method:

my_method = Method(("some", "name"))
my_metadata = {"unit": "some unit", "something else": "goes here"}
my_method.register(**my_metadata)

Then write the data (list of CFs):

my_method.write(my_cfs)
Chris Mutel
  • 2,549
  • 1
  • 14
  • 9