You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
``pvdeg.geospatial.analysis`` implements autotemplating. No need to specify a template for common ``pvdeg`` functions during analysis. Manually creating and providing templates is still an option. Docstrings updated with examples.
Generates a xarray template for output data. Output variables and
248
259
associated dimensions need to be specified via the shapes dictionary.
249
260
The dimension length are derived from the input data. Additonal output
250
261
dimensions can be defined with the add_dims argument.
251
262
263
+
Examples
264
+
--------
265
+
Providing the shapes dictionary can be confusing. Here is what the `shapes` dictionary should look like for `pvdeg.standards.standoff`.
266
+
Refer to the docstring, the function will have one result per location so the only dimension for each return value is "gid", a geospatial ID number.
267
+
268
+
.. code-block:: python
269
+
shapes = {
270
+
"x": ("gid",),
271
+
"T98_inf": ("gid",),
272
+
"T98_0": ("gid",),
273
+
}
274
+
275
+
**Note: The dimensions are stored in a tuple, this this why all of the parenthesis have commas after the single string, otherwise python will interpret the value as a string.**
276
+
277
+
This is what the shapes dictinoary should look like for `pvdeg.humidity.module`. Refering to the docstring,
278
+
we can see that the function will return a timeseries result for each location. This means we need dimensions of "gid" and "time".
279
+
280
+
.. code-block:: python
281
+
shapes = {
282
+
"RH_surface_outside": ("gid", "time"),
283
+
"RH_front_encap": ("gid", "time"),
284
+
"RH_back_encap": ("gid", "time"),
285
+
"RH_backsheet": ("gid", "time"),
286
+
}
287
+
252
288
Parameters
253
289
----------
254
290
ds_gids : xarray.Dataset
@@ -290,9 +326,8 @@ def output_template(
290
326
returnoutput_template
291
327
292
328
293
-
# we should be able to get rid of this with the new autotemplating function and decorator
294
-
# this is helpful for users so we should move it to a section in the documenation,
295
-
# discuss with group
329
+
# This has been replaced with pvdeg.geospatial.auto_templates inside of pvdeg.geospatial.analysis.
0 commit comments