Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FourierXYCurve and FourierXYCoil classes #1504

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft

FourierXYCurve and FourierXYCoil classes #1504

wants to merge 5 commits into from

Conversation

ddudt
Copy link
Collaborator

@ddudt ddudt commented Dec 30, 2024

Adds a new parameterization for planar curves/coils. Instead of representing $r(\theta)$ as a Fourier series like the FourierPlanarCurve, this represents $X(\theta)$ and $Y(\theta)$ as Fourier series where $r = \sqrt{X^2 + Y^2}$.

There are some simple coil shapes like an ellipse that cannot be perfectly represented with the FourierPlanarCoil class (at finite resolution). This parameterization can represent more coil geometries, at the cost of more optimization parameters and the possibility of self-intersecting curves.

@ddudt ddudt added funtionality New feature or request to do things the code can't do now. coil stuff relating to coils and coil optimization P2 Medium Priority, not urgent but should be on the near-term agend labels Dec 30, 2024
@ddudt ddudt self-assigned this Dec 30, 2024
Copy link
Contributor

github-actions bot commented Dec 30, 2024

|             benchmark_name             |         dt(%)          |         dt(s)          |        t_new(s)        |        t_old(s)        | 
| -------------------------------------- | ---------------------- | ---------------------- | ---------------------- | ---------------------- |
 test_build_transform_fft_lowres         |     -4.62 +/- 3.38     | -2.65e-02 +/- 1.94e-02 |  5.47e-01 +/- 1.2e-02  |  5.73e-01 +/- 1.5e-02  |
 test_equilibrium_init_medres            |     -0.61 +/- 2.52     | -2.68e-02 +/- 1.11e-01 |  4.37e+00 +/- 8.6e-02  |  4.40e+00 +/- 7.0e-02  |
 test_equilibrium_init_highres           |     +0.21 +/- 2.00     | +1.18e-02 +/- 1.14e-01 |  5.72e+00 +/- 8.7e-02  |  5.71e+00 +/- 7.4e-02  |
 test_objective_compile_dshape_current   |     +1.18 +/- 3.59     | +4.74e-02 +/- 1.44e-01 |  4.07e+00 +/- 1.2e-01  |  4.02e+00 +/- 8.4e-02  |
 test_objective_compute_dshape_current   |     +5.31 +/- 5.91     | +2.78e-04 +/- 3.10e-04 |  5.52e-03 +/- 2.5e-04  |  5.24e-03 +/- 1.9e-04  |
 test_objective_jac_dshape_current       |     +4.78 +/- 4.66     | +2.03e-03 +/- 1.98e-03 |  4.46e-02 +/- 1.7e-03  |  4.25e-02 +/- 9.7e-04  |
 test_perturb_2                          |     +1.12 +/- 3.77     | +2.27e-01 +/- 7.67e-01 |  2.06e+01 +/- 6.7e-01  |  2.03e+01 +/- 3.7e-01  |
 test_proximal_freeb_jac                 |     -2.58 +/- 2.02     | -1.97e-01 +/- 1.55e-01 |  7.46e+00 +/- 1.1e-01  |  7.65e+00 +/- 1.1e-01  |
 test_solve_fixed_iter                   |     -1.41 +/- 3.03     | -4.73e-01 +/- 1.02e+00 |  3.31e+01 +/- 8.1e-01  |  3.36e+01 +/- 6.2e-01  |
 test_LinearConstraintProjection_build   |     +1.13 +/- 1.95     | +1.21e-01 +/- 2.08e-01 |  1.08e+01 +/- 1.5e-01  |  1.06e+01 +/- 1.4e-01  |
 test_build_transform_fft_midres         |     -3.67 +/- 2.78     | -2.39e-02 +/- 1.81e-02 |  6.26e-01 +/- 1.7e-02  |  6.50e-01 +/- 7.1e-03  |
 test_build_transform_fft_highres        |     -2.86 +/- 3.52     | -2.91e-02 +/- 3.58e-02 |  9.89e-01 +/- 3.4e-02  |  1.02e+00 +/- 9.7e-03  |
 test_equilibrium_init_lowres            |     -1.96 +/- 8.67     | -7.85e-02 +/- 3.48e-01 |  3.94e+00 +/- 1.7e-01  |  4.01e+00 +/- 3.1e-01  |
 test_objective_compile_atf              |     -2.23 +/- 3.39     | -1.86e-01 +/- 2.82e-01 |  8.15e+00 +/- 2.4e-01  |  8.34e+00 +/- 1.5e-01  |
 test_objective_compute_atf              |     -3.11 +/- 2.92     | -5.10e-04 +/- 4.79e-04 |  1.59e-02 +/- 2.4e-04  |  1.64e-02 +/- 4.1e-04  |
 test_objective_jac_atf                  |     -1.80 +/- 4.04     | -3.60e-02 +/- 8.09e-02 |  1.97e+00 +/- 7.4e-02  |  2.01e+00 +/- 3.3e-02  |
 test_perturb_1                          |     -4.64 +/- 2.27     | -7.37e-01 +/- 3.61e-01 |  1.51e+01 +/- 3.3e-01  |  1.59e+01 +/- 1.5e-01  |
 test_proximal_jac_atf                   |     -0.03 +/- 0.85     | -2.75e-03 +/- 7.08e-02 |  8.29e+00 +/- 5.7e-02  |  8.30e+00 +/- 4.2e-02  |
 test_proximal_freeb_compute             |     -1.76 +/- 0.73     | -3.53e-03 +/- 1.47e-03 |  1.97e-01 +/- 1.0e-03  |  2.01e-01 +/- 1.1e-03  |
 test_solve_fixed_iter_compiled          |     +0.07 +/- 1.71     | +1.45e-02 +/- 3.55e-01 |  2.08e+01 +/- 2.6e-01  |  2.08e+01 +/- 2.4e-01  |

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
coil stuff relating to coils and coil optimization funtionality New feature or request to do things the code can't do now. P2 Medium Priority, not urgent but should be on the near-term agend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants