Set the astrometry configuration according to the astrometry_net_data being used
The menu is a dict mapping the astrometry_net_data version to a dict of configuration
values to apply. The menu key may also be a glob. For example:
menu = { "ps1*": {}, # No changes
"ps1-without-y": { "solver.filterMap": {"y": "z"} }, # No y-band in this specific version
"sdss*": { "solver.filterMap": {"y": "z"} }, # No y-band, use z instead
"2mass*": { "solver.filterMap": {"y": "J"} }, # No y-band, use J instead
}
Definition at line 23 of file setConfigFromEups.py.
24 """Set the astrometry configuration according to the astrometry_net_data being used 26 The menu is a dict mapping the astrometry_net_data version to a dict of configuration 27 values to apply. The menu key may also be a glob. For example: 28 menu = { "ps1*": {}, # No changes 29 "ps1-without-y": { "solver.filterMap": {"y": "z"} }, # No y-band in this specific version 30 "sdss*": { "solver.filterMap": {"y": "z"} }, # No y-band, use z instead 31 "2mass*": { "solver.filterMap": {"y": "J"} }, # No y-band, use J instead 37 selected = menu[version]
40 matchList = [key
for key
in menu
if fnmatch(version, key)]
41 if len(matchList) > 1:
42 raise RuntimeError(
"Multiple menu keys match astrometry_net_data version %s: %s" %
44 if len(matchList) == 0:
45 raise RuntimeError(
"No menu key matches astrometry_net_data version %s" % version)
46 selected = menu[matchList.pop()]
47 for name, value
in selected.items():
def setAstrometryConfigFromEups(config, menu)
def setDottedAttr(item, name, value)