Commit 1c9851df authored by Knieps, Alexander's avatar Knieps, Alexander

Fixed bug in loaded_coils (now does not assume 5x symmetry)

parent 2ae0f935
Pipeline #18216 passed with stage
in 35 seconds
This diff is collapsed.
......@@ -97,6 +97,12 @@ cylindrical_grid = inputs.CylindricalGrid(
n_sym = 5, n_phi = 96
);
nonsym_grid = inputs.CylindricalGrid(
r_min = 4.05, r_max = 6.75, n_r = 181,
z_min = -1.35, z_max = 1.35, n_z = 181,
n_sym = 1, n_phi = 96
);
@stable_api()
def base_coils(name, coils, i_12345 = [0] * 5, i_ab = [0] * 2, desc = None, grid = cylindrical_grid, convention = '1-AA-R0004.5'):
if desc is None:
......@@ -147,7 +153,7 @@ def cad_coils(i_12345 = [0] * 5, i_ab = [0] * 2, name = 'CAD coils', desc = None
return result
@unstable_api()
def loaded_coils_standard(i_12345 = [0] * 5, i_ab = [0] * 2, name = 'Loaded coils standard', desc = 'Loaded coils standard', grid = cylindrical_grid, convention = '1-AA-R0004.5'):
def loaded_coils_standard(i_12345 = [0] * 5, i_ab = [0] * 2, name = 'Loaded coils standard', desc = 'Loaded coils standard', grid = nonsym_grid, convention = '1-AA-R0004.5'):
assert len(i_12345) == 5;
assert len(i_ab) == 2;
......@@ -171,7 +177,7 @@ def loaded_coils_standard(i_12345 = [0] * 5, i_ab = [0] * 2, name = 'Loaded coil
return result;
@unstable_api()
def loaded_coils_high_iota(i_12345 = [0] * 5, i_ab = [0] * 2, name = 'Loaded coils high-iota', desc = 'Loaded coils high-iota', grid = cylindrical_grid, convention = '1-AA-R0004.5'):
def loaded_coils_high_iota(i_12345 = [0] * 5, i_ab = [0] * 2, name = 'Loaded coils high-iota', desc = 'Loaded coils high-iota', grid = nonsym_grid, convention = '1-AA-R0004.5'):
assert len(i_12345) == 5;
assert len(i_ab) == 2;
......@@ -181,7 +187,8 @@ def loaded_coils_high_iota(i_12345 = [0] * 5, i_ab = [0] * 2, name = 'Loaded coi
coils,
i_12345 = i_12345,
i_ab = i_ab,
desc = '{} ({:.1f})T'.format(desc, b)
desc = '{} ({:.1f})T'.format(desc, b),
grid = grid
)
config_grid = {
......@@ -207,7 +214,7 @@ def loaded_coils_high_iota(i_12345 = [0] * 5, i_ab = [0] * 2, name = 'Loaded coi
return result;
@unstable_api()
def loaded_coils_high_mirror(i_12345 = [0] * 5, i_ab = [0] * 2, name = 'Loaded coils high-mirror', desc = 'Loaded coils high-mirror', grid = cylindrical_grid, convention = '1-AA-R0004.5'):
def loaded_coils_high_mirror(i_12345 = [0] * 5, i_ab = [0] * 2, name = 'Loaded coils high-mirror', desc = 'Loaded coils high-mirror', grid = nonsym_grid, convention = '1-AA-R0004.5'):
assert len(i_12345) == 5;
assert len(i_ab) == 2;
......@@ -217,7 +224,8 @@ def loaded_coils_high_mirror(i_12345 = [0] * 5, i_ab = [0] * 2, name = 'Loaded c
coils,
i_12345 = i_12345,
i_ab = i_ab,
desc = '{} ({:.1f})T'.format(desc, b)
desc = '{} ({:.1f})T'.format(desc, b),
grid = grid
)
config_grid = {
......@@ -376,7 +384,7 @@ def control_coils(
);
@unstable_api()
def config_from_program(program_id, coil_pack = None, iota_correct = False, plasma_current = False):
def config_from_program(program_id, coil_pack = None, iota_correct = False, plasma_current = False, **kwargs):
if plasma_current:
warnings.warn('Currently plasma_current = True uses the average plasma current, which makes little sense. Consider adding the wanted axis current manually')
......@@ -412,6 +420,7 @@ def config_from_program(program_id, coil_pack = None, iota_correct = False, plas
]
base_config = coil_pack(i_12345, i_ab) + trim_coils(i_trim) + control_coils(i_control)
print(base_config.grid.n_sym)
if plasma_current:
base_config += client.axis_current(base_config, currents['I plasma'])
......
import osa
import urllib.request
import json
import numpy
......
......@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
setup(
name = 'fzj-ipp-webservices',
version = '1.0b0',
version = '1.0b1',
author = 'Alexander Knieps',
author_email = 'a.knieps@fz-juelich.de',
description = 'Python Frontend for selected IPP webservices',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment