Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,25 @@ jobs:
envs: |
- linux: py312

test_database_v10:
if: |
(
github.event_name != 'pull_request' && (
github.ref_name != 'main' ||
github.event_name == 'workflow_dispatch'
)
) || (
github.event_name == 'pull_request' &&
contains(github.event.pull_request.labels.*.name, 'Run v10 tests')
)
needs: [tests]
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v2
with:
posargs: '--ascii-dbase-root ~/.chianti --ascii-dbase-url https://download.chiantidatabase.org/CHIANTI_10.1_database.tar.gz'
toxdeps: tox-pypi-filter
envs: |
- linux: py312

docs:
needs: [tests]
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v2
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
"icon": "fa-solid fa-wine-glass",
}
],
"announcement": "fiasco currently supports versions 8, 9, and 10 of the CHIANTI database.",
"announcement": "fiasco currently supports versions 8, 9, 10, and 11 of the CHIANTI database.",
}
html_context = {
"github_user": "wtbarnes",
Expand Down
2 changes: 1 addition & 1 deletion fiasco/io/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def parse(self):
# NOTE: put this here and not in __init__ as __init__ may be overwritten in a subclass
if not self.full_path.is_file():
raise MissingASCIIFileError(f'Could not find file {self.full_path}')
with self.full_path.open() as f:
with self.full_path.open(encoding='UTF-8') as f:
lines = f.readlines()
table = []
for i, line in enumerate(lines):
Expand Down
1 change: 1 addition & 0 deletions fiasco/tests/data/file_hashes_v11.0.2.json

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
750 changes: 750 additions & 0 deletions fiasco/tests/idl/data/freebound_all_ions_v11.0.2.asdf

Large diffs are not rendered by default.

Binary file not shown.
800 changes: 800 additions & 0 deletions fiasco/tests/idl/data/freefree_all_ions_v11.0.2.asdf

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added fiasco/tests/idl/data/ioneq_1_1_v11.0.2.asdf
Binary file not shown.
Binary file added fiasco/tests/idl/data/ioneq_20_2_v11.0.2.asdf
Binary file not shown.
Binary file added fiasco/tests/idl/data/ioneq_26_16_v11.0.2.asdf
Binary file not shown.
Binary file added fiasco/tests/idl/data/ioneq_26_18_v11.0.2.asdf
Binary file not shown.
Binary file added fiasco/tests/idl/data/ioneq_26_20_v11.0.2.asdf
Binary file not shown.
Binary file added fiasco/tests/idl/data/ioneq_26_27_v11.0.2.asdf
Binary file not shown.
Binary file added fiasco/tests/idl/data/ioneq_26_5_v11.0.2.asdf
Binary file not shown.
Binary file added fiasco/tests/idl/data/ioneq_6_1_v11.0.2.asdf
Binary file not shown.
Binary file added fiasco/tests/idl/data/ioneq_6_2_v11.0.2.asdf
Binary file not shown.
Binary file added fiasco/tests/idl/data/ioneq_6_3_v11.0.2.asdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
3,721 changes: 3,721 additions & 0 deletions fiasco/tests/idl/data/twophoton_all_ions_v11.0.2.asdf

Large diffs are not rendered by default.

11 changes: 8 additions & 3 deletions fiasco/tests/idl/test_idl_ioneq.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import fiasco

from fiasco.tests.idl.helpers import run_idl_script
from fiasco.tests.idl.helpers import run_idl_script, version_check
from fiasco.util import parse_ion_name


Expand Down Expand Up @@ -118,8 +118,8 @@ def test_recombination_rate_from_idl(ion_name, temperature, idl_env, dbase_versi
'O IV',
'O V',
'O VI',
pytest.param('O VII', marks=pytest.mark.xfail()),
pytest.param('O VIII', marks=pytest.mark.xfail()),
'O VII',
'O VIII',
])
def test_dielectronic_recombination_suppression_factor_from_idl(ion_name, idl_env, dbase_version, chianti_idl_version, hdf5_dbase_root):
script = """
Expand All @@ -134,6 +134,8 @@ def test_dielectronic_recombination_suppression_factor_from_idl(ion_name, idl_en
# Derived from the example suppression factor calculation shown in Fig. 2 of Nikolic et al. (2018)
temperature = 10**4.5 * u.K
ion = fiasco.Ion(ion_name, temperature, hdf5_dbase_root=hdf5_dbase_root)
# There is a bug in the calculation of the suppression factors for H- and He-like ions that was
# fixed in version 11.0.2 of the CHIANTI software
density = np.logspace(0,15,30)*u.cm**(-3)
suppression = ion._dielectronic_recombination_suppression(density, couple_density_to_temperature=False)
idl_result = run_idl_script(idl_env,
Expand All @@ -143,4 +145,7 @@ def test_dielectronic_recombination_suppression_factor_from_idl(ion_name, idl_en
f'dielectronic_recombination_suppression_factor_{ion.atomic_number}_{ion.ionization_stage}',
dbase_version,
chianti_idl_version)
if (ion.isoelectronic_sequence in ('H', 'He')) and version_check(idl_result['chianti_idl_version'], '<', '11.0.2'): # pragma: no cover
pytest.skip('Skipping dielectronic recombination suppression test for H- and He-like ions due '
'to a bug in the IDL software in versions prior to v11.0.2.')
u.allclose(idl_result['suppression'], suppression.squeeze(), rtol=0.01)
3 changes: 3 additions & 0 deletions fiasco/util/setup_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
'10.0.1',
'10.0.2',
'10.1',
'11.0',
'11.0.1',
'11.0.2',
]
LATEST_VERSION = SUPPORTED_VERSIONS[-1]

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ test_idl = [
]
docs =[
"fiasco[all]",
"aiapy>=0.10",
"aiapy<0.11,!=0.10.2",
"asdf-astropy>=0.5",
"asdf>=3.1",
"hissw>=2.3",
Expand Down
1 change: 1 addition & 0 deletions tools/generate_hash_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def build_hash_table(dbase_root):
map(lambda x: pathlib.Path('continuum') / x, catalogue['continuum_files']),
map(lambda x: pathlib.Path('dem') / x, catalogue['dem_files']),
map(lambda x: pathlib.Path('em') / x, catalogue['em_files']),
map(lambda x: pathlib.Path('ancillary_data/advanced_models') / x, catalogue['ancillary_data_advanced_models_files']),
)
filepaths = list(map(lambda x: dbase_root / x, filepaths))
return {'_'.join(f.relative_to(dbase_root).parts): _md5hash(f) for f in filepaths}
Expand Down
Loading