22
22
PVLIB_PYTHON = 'pvlib python'
23
23
24
24
# Dictionary mapping PSM3 names to pvlib names
25
- PSM3_VARIABLE_MAP = {
25
+ VARIABLE_MAP = {
26
26
'GHI' : 'ghi' ,
27
27
'DHI' : 'dhi' ,
28
28
'DNI' : 'dni' ,
@@ -83,7 +83,7 @@ def get_psm3(latitude, longitude, api_key, email, names='tmy', interval=60,
83
83
optional
84
84
map_variables: boolean, optional
85
85
When true, renames columns of the Dataframe to pvlib variable names
86
- where applicable. See variable :const:`PSM3_VARIABLE_MAP `.
86
+ where applicable. See variable :const:`VARIABLE_MAP `.
87
87
timeout : int, default 30
88
88
time in seconds to wait for server response before timeout
89
89
@@ -160,7 +160,7 @@ def get_psm3(latitude, longitude, api_key, email, names='tmy', interval=60,
160
160
# convert pvlib names in attributes to psm3 convention (reverse mapping)
161
161
# unlike psm3 columns, attributes are lower case and with underscores
162
162
amap = {value : key .lower ().replace (' ' , '_' ) for (key , value ) in
163
- PSM3_VARIABLE_MAP .items ()}
163
+ VARIABLE_MAP .items ()}
164
164
attributes = [amap .get (a , a ) for a in attributes ]
165
165
attributes = list (set (attributes )) # remove duplicate values
166
166
@@ -217,7 +217,7 @@ def parse_psm3(fbuf, map_variables=None):
217
217
File-like object containing data to read.
218
218
map_variables: bool
219
219
When true, renames columns of the Dataframe to pvlib variable names
220
- where applicable. See variable PSM3_VARIABLE_MAP .
220
+ where applicable. See variable VARIABLE_MAP .
221
221
222
222
Returns
223
223
-------
@@ -338,7 +338,7 @@ def parse_psm3(fbuf, map_variables=None):
338
338
'to hide this warning.' , pvlibDeprecationWarning )
339
339
map_variables = False
340
340
if map_variables :
341
- data = data .rename (columns = PSM3_VARIABLE_MAP )
341
+ data = data .rename (columns = VARIABLE_MAP )
342
342
metadata ['latitude' ] = metadata .pop ('Latitude' )
343
343
metadata ['longitude' ] = metadata .pop ('Longitude' )
344
344
metadata ['elevation' ] = metadata .pop ('Elevation' )
@@ -362,7 +362,7 @@ def read_psm3(filename, map_variables=None):
362
362
Filename of a file containing data to read.
363
363
map_variables: bool
364
364
When true, renames columns of the Dataframe to pvlib variable names
365
- where applicable. See variable PSM3_VARIABLE_MAP .
365
+ where applicable. See variable VARIABLE_MAP .
366
366
367
367
Returns
368
368
-------
0 commit comments