cherab / core

The core source repository for the Cherab project.
https://www.cherab.info
Other
44 stars 24 forks source link

Improve parsing of the ADF15 metadata for H-like ions. #425

Closed vsnever closed 9 months ago

vsnever commented 9 months ago

This PR addresses the issue raised in #424. Some ADAS ADF15 (PEC) data files for hydrogen-like ions actually have "hydrogen" and not "hydrogen-like" format of the metadata.

While the user can specify the header format in install_adf15() and parse_adf15(), the parse_adf15() can also try to parse the metadata in "hydrogen" format, if parsing in "hydrogen-like" format fails and the header_format is not specified by the user.

Also, if parsing of the ADF15 metadata fails, parse_adf15() does not raise an error and install_adf15() runs silently without updating the repository. This behaviour is confusing to the user and should be fixed, which is done in this PR.