Ejemplo n.º 1
0
def test_atom_data_two_instances_same_session(test_session):

    atom_data1 = AtomData(test_session,
                         selected_atoms="He, Be, B, N, Zn",
                         chianti_ions="He 1; N 5")
    atom_data2 = AtomData(test_session,
                         selected_atoms="He, Be, B, N, Zn",
                         chianti_ions="He 1; N 5")
    atom_data1.chianti_ions_table
    atom_data2.chianti_ions_table
Ejemplo n.º 2
0
def test_atom_data_chianti_ions_subset(memory_session):
    nist = DataSource.as_unique(memory_session, short_name="nist-asd")
    ch = DataSource.as_unique(memory_session, short_name="chianti_v8.0.2")
    ku = DataSource.as_unique(memory_session, short_name="ku_latest")
    with pytest.raises(ValueError):
        atom_data = AtomData(memory_session,
                             selected_atoms="He, Be, B, N VI",
                             chianti_ions="He 1; N 5; Si 1")
Ejemplo n.º 3
0
def test_atom_data_init(memory_session):
    nist = DataSource.as_unique(memory_session, short_name="nist-asd")
    ch = DataSource.as_unique(memory_session, short_name="chianti_v8.0.2")
    ku = DataSource.as_unique(memory_session, short_name="ku_latest")
    atom_data = AtomData(memory_session,
                         selected_atoms="He, Be, B, N",
                         chianti_ions="He 1; N 5")
    assert set(atom_data.selected_atomic_numbers) == set([2, 4, 5, 7])
    assert set(atom_data.chianti_ions) == set([(2, 1), (7, 5)])
Ejemplo n.º 4
0
def atom_data_be(test_session):
    atom_data = AtomData(test_session, selected_atoms="Be")
    return atom_data
Ejemplo n.º 5
0
def atom_data(test_session, chianti_short_name):
    atom_data = AtomData(test_session,
                         selected_atoms="He, Be, B, N, Si, Zn",
                         chianti_ions="He 1; N 5",
                         chianti_short_name=chianti_short_name)
    return atom_data
Ejemplo n.º 6
0
def atom_data(test_session):
    atom_data = AtomData(test_session,
                         selected_atoms="He, Be, B, N, Si, Zn",
                         chianti_ions="He 1; N 5")
    return atom_data