ALMA selection dropboxes now supported (band, polarization)
@@ -776,7 +776,9 @@ class AlmaClass(QueryWithLogin):
help_list = self._get_help_page(cache=cache)
- print("Valid ALMA keywords:")
+ print("Valid ALMA keywords. Left column is the description, right "
+ "column is the name of the keyword to pass to astroquery.alma"
+ " queries. In some cases, no valid keyword is available:")
for title, section in help_list:
print()
@@ -792,6 +794,12 @@ class AlmaClass(QueryWithLogin):
# value))
elif len(row) == 4: # radio button or checkbox
name, payload_keyword, checkbox, value = row
+ if isinstance(checkbox, list):
+ checkbox_str = ", ".join(["{0}={1}".format(x,y)
+ for x,y in zip(checkbox, value)])
+ print(" {0:33s}: {1:20s} -> {2}"
+ .format(name, payload_keyword, checkbox_str))
+ else:
print(" {2} {0:29s}: {1:20s} = {3:15s}"
.format(name, payload_keyword, checkbox, value))
else:
@@ -851,16 +859,17 @@ class AlmaClass(QueryWithLogin):
checkbox, value))
select = inp.find('select')
if select is not None:
- options = [(filter_printable(option.text),
+ options = [("".join(filter_printable(option.text)),
option.attrs['value'])
for option in select.findAll('option')]
if sp is not None:
name = whitespace.sub(" ", sp.text)
else:
name = select.attrs['name']
- option_str = " , ".join(["{0} = {1}".format(o[0], o[1])
- for o in options])
- help_section[1].append((name, option_str))
+ checkbox = [o[0] for o in options]
+ value = [o[1] for o in options]
+ option_str = select.attrs['name']
+ help_section[1].append((name, option_str, checkbox, value))
help_list.append(help_section)
self._help_list = help_list
