@@ -245,12 +245,15 @@ def get_orientation(strategy, **kwargs):
245
245
return surface_tilt , surface_azimuth
246
246
247
247
248
+ # Type for fields that vary between arrays
249
+ T = TypeVar ('T' )
250
+
251
+
252
+ PerArray = Union [T , Tuple [T , ...]]
253
+
254
+
248
255
@dataclass
249
256
class ModelChainResult :
250
- _T = TypeVar ('T' )
251
- PerArray = Union [_T , Tuple [_T , ...]]
252
- """Type for fields that vary between arrays"""
253
-
254
257
# these attributes are used in __setattr__ to determine the correct type.
255
258
_singleton_tuples : bool = field (default = False )
256
259
_per_array_fields = {'total_irrad' , 'aoi' , 'aoi_modifier' ,
@@ -260,27 +263,99 @@ class ModelChainResult:
260
263
261
264
# system-level information
262
265
solar_position : Optional [pd .DataFrame ] = field (default = None )
266
+ """Solar position in a DataFrame containing columns ``'apparent_zenith'``,
267
+ ``'zenith'``, ``'apparent_elevation'``, ``'elevation'``, ``'azimuth'``
268
+ (all in degrees), with possibly other columns depending on the solar
269
+ position method; see :py:func:`~pvlib.solarposition.get_solarposition`
270
+ for details."""
271
+
263
272
airmass : Optional [pd .DataFrame ] = field (default = None )
273
+ """Air mass in a DataFrame containing columns ``'airmass_relative'``,
274
+ ``'airmass_absolute'`` (unitless); see
275
+ :py:meth:`~pvlib.location.Location.get_airmass` for details."""
276
+
264
277
ac : Optional [pd .Series ] = field (default = None )
278
+ """AC power from the PV system, in a Series [W]"""
279
+
265
280
tracking : Optional [pd .DataFrame ] = field (default = None )
281
+ """Orientation of modules on a single axis tracker, in a DataFrame with
282
+ columns ``'surface_tilt'``, ``'surface_azimuth'``, ``'aoi'``; see
283
+ :py:func:`~pvlib.tracking.singleaxis` for details.
284
+ """
285
+
286
+ losses : Optional [Union [pd .Series , float ]] = field (default = None )
287
+ """Series containing DC loss as a fraction of total DC power, as
288
+ calculated by ``ModelChain.losses_model``.
289
+ """
266
290
267
291
# per DC array information
268
292
total_irrad : Optional [PerArray [pd .DataFrame ]] = field (default = None )
293
+ """ DataFrame (or tuple of DataFrame, one for each array) containing
294
+ columns ``'poa_global'``, ``'poa_direct'`` ``'poa_diffuse'``,
295
+ ``poa_sky_diffuse'``, ``'poa_ground_diffuse'`` (W/m2); see
296
+ :py:func:`~pvlib.irradiance.get_total_irradiance` for details.
297
+ """
298
+
269
299
aoi : Optional [PerArray [pd .Series ]] = field (default = None )
300
+ """
301
+ Series (or tuple of Series, one for each array) containing angle of
302
+ incidence (degrees); see :py:func:`~pvlib.irradiance.aoi` for details.
303
+ """
304
+
270
305
aoi_modifier : Optional [PerArray [Union [pd .Series , float ]]] = \
271
306
field (default = None )
307
+ """Series (or tuple of Series, one for each array) containing angle of
308
+ incidence modifier (unitless) calculated by ``ModelChain.aoi_model``,
309
+ which reduces direct irradiance for reflections;
310
+ see :py:meth:`~pvlib.pvsystem.PVSystem.get_iam` for details.
311
+ """
312
+
272
313
spectral_modifier : Optional [PerArray [Union [pd .Series , float ]]] = \
273
314
field (default = None )
315
+ """Series (or tuple of Series, one for each array) containing spectral
316
+ modifier (unitless) calculated by ``ModelChain.spectral_model``, which
317
+ adjusts broadband plane-of-array irradiance for spectral content.
318
+ """
319
+
274
320
cell_temperature : Optional [PerArray [pd .Series ]] = field (default = None )
321
+ """Series (or tuple of Series, one for each array) containing cell
322
+ temperature (C).
323
+ """
324
+
275
325
effective_irradiance : Optional [PerArray [pd .Series ]] = field (default = None )
326
+ """Series (or tuple of Series, one for each array) containing effective
327
+ irradiance (W/m2) which is total plane-of-array irradiance adjusted for
328
+ reflections and spectral content.
329
+ """
330
+
276
331
dc : Optional [PerArray [Union [pd .Series , pd .DataFrame ]]] = \
277
332
field (default = None )
333
+ """Series or DataFrame (or tuple of Series or DataFrame, one for
334
+ each array) containing DC power (W) for each array, calculated by
335
+ ``ModelChain.dc_model``.
336
+ """
337
+
278
338
diode_params : Optional [PerArray [pd .DataFrame ]] = field (default = None )
339
+ """DataFrame (or tuple of DataFrame, one for each array) containing diode
340
+ equation parameters (columns ``'I_L'``, ``'I_o'``, ``'R_s'``, ``'R_sh'``,
341
+ ``'nNsVth'``, present when ModelChain.dc_model is a single diode model;
342
+ see :py:func:`~pvlib.pvsystem.singlediode` for details.
343
+ """
344
+
279
345
dc_ohmic_losses : Optional [PerArray [pd .Series ]] = field (default = None )
280
- losses : Optional [Union [pd .Series , float ]] = field (default = None )
346
+ """Series (or tuple of Series, one for each array) containing DC ohmic
347
+ loss (W) calculated by ``ModelChain.dc_ohmic_model``.
348
+ """
281
349
350
+ # copies of input data, for user convenience
282
351
weather : Optional [PerArray [pd .DataFrame ]] = None
352
+ """DataFrame (or tuple of DataFrame, one for each array) contains a
353
+ copy of the input weather data.
354
+ """
355
+
283
356
times : Optional [pd .DatetimeIndex ] = None
357
+ """DatetimeIndex containing a copy of the index of the input weather data.
358
+ """
284
359
285
360
def _result_type (self , value ):
286
361
"""Coerce `value` to the correct type according to
0 commit comments