Skip to content

Inconsistency in applying setSuns to entire objects (modules, strings, array) #33

@bmeyers

Description

@bmeyers

Setting all modules in all strings and all modules in a given string to a single effective irradiance value works as indicated by the docstring:

Ee=0.91  # set all modules in all strings to 0.91 suns
Ee={12: 0.77}  # set all modules in string with index 12 to 0.77 suns

However, to set all cells in a single module to one irradiance value, you need to wrap the irradiance in a list: Ee={3: {8: [0.23], 7: [0.45]}}. This is inconsistent with the array and string methods, and it is not reflected in the documentation, which states that the correct form is: Ee={3: {8: 0.23, 7: 0.45}}.

In the current implementation, if one is building a autovivicated dictionary for Ee, you need to do the following for an array, string, and module, respectively:

self.Ee = Ee_shade
self.Ee[strng] = Ee_shade
self.Ee[strng][mod] = [Ee_shade]

As a reference, here's what I do to set the values for individual cells:

self.Ee[strng][mod]['cells'] = []
self.Ee[strng][mod]['Ee'] = []
self.Ee[strng][mod]['cells'].append(self.cell_pattern[ind])
self.Ee[strng][mod]['Ee'].append(Ee_shade)

or

self.Ee[strng][mod]['Ee'].append(m * a + 1)

Where,

a = cell_box.intersection(poly).area
m = Ee_shade - 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions