Skip to content

Commit cebb770

Browse files
committed
Rename to VARIABLE_MAP
1 parent 1b04360 commit cebb770

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pvlib/iotools/psm3.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
PVLIB_PYTHON = 'pvlib python'
2323

2424
# Dictionary mapping PSM3 names to pvlib names
25-
PSM3_VARIABLE_MAP = {
25+
VARIABLE_MAP = {
2626
'GHI': 'ghi',
2727
'DHI': 'dhi',
2828
'DNI': 'dni',
@@ -83,7 +83,7 @@ def get_psm3(latitude, longitude, api_key, email, names='tmy', interval=60,
8383
optional
8484
map_variables: boolean, optional
8585
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`.
8787
timeout : int, default 30
8888
time in seconds to wait for server response before timeout
8989
@@ -160,7 +160,7 @@ def get_psm3(latitude, longitude, api_key, email, names='tmy', interval=60,
160160
# convert pvlib names in attributes to psm3 convention (reverse mapping)
161161
# unlike psm3 columns, attributes are lower case and with underscores
162162
amap = {value: key.lower().replace(' ', '_') for (key, value) in
163-
PSM3_VARIABLE_MAP.items()}
163+
VARIABLE_MAP.items()}
164164
attributes = [amap.get(a, a) for a in attributes]
165165
attributes = list(set(attributes)) # remove duplicate values
166166

@@ -217,7 +217,7 @@ def parse_psm3(fbuf, map_variables=None):
217217
File-like object containing data to read.
218218
map_variables: bool
219219
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.
221221
222222
Returns
223223
-------
@@ -338,7 +338,7 @@ def parse_psm3(fbuf, map_variables=None):
338338
'to hide this warning.', pvlibDeprecationWarning)
339339
map_variables = False
340340
if map_variables:
341-
data = data.rename(columns=PSM3_VARIABLE_MAP)
341+
data = data.rename(columns=VARIABLE_MAP)
342342
metadata['latitude'] = metadata.pop('Latitude')
343343
metadata['longitude'] = metadata.pop('Longitude')
344344
metadata['elevation'] = metadata.pop('Elevation')
@@ -362,7 +362,7 @@ def read_psm3(filename, map_variables=None):
362362
Filename of a file containing data to read.
363363
map_variables: bool
364364
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.
366366
367367
Returns
368368
-------

0 commit comments

Comments
 (0)