@@ -63,8 +63,8 @@ def _args_to_payload(self, *args, **kwargs):
63
63
The lower wavelength for the spectrum in appropriate units.
64
64
maxwav : `astropy.units.Quantity` object
65
65
The upper wavelength for the spectrum in appropriate units.
66
- linename : str, optional
67
- The spectrum to fetch. Defaults to "H I"
66
+ linename : str or list , optional
67
+ The spectrum/spectra to fetch. Defaults to "H I"
68
68
energy_level_unit : str, optional
69
69
The energy level units must be one of the following:
70
70
'R', 'Rydberg', 'rydberg', 'cm', 'cm-1', 'EV', 'eV',
@@ -85,7 +85,13 @@ def _args_to_payload(self, *args, **kwargs):
85
85
86
86
"""
87
87
request_payload = {}
88
- request_payload ["spectra" ] = kwargs ['linename' ]
88
+ linename = kwargs ["linename" ]
89
+ if isinstance (linename , str ):
90
+ request_payload ["spectra" ] = linename
91
+ elif isinstance (linename , list ):
92
+ request_payload ["spectra" ] = " " .join (linename )
93
+ else :
94
+ raise TypeError ("linename must str or list" )
89
95
(min_wav , max_wav , wav_unit ) = _parse_wavelength (args [0 ], args [1 ])
90
96
request_payload ["low_wl" ] = min_wav
91
97
request_payload ["upp_wl" ] = max_wav
0 commit comments