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

Make sure users don't use wrong period for coordinate mapping #1596

Merged
merged 1 commit into from
Feb 18, 2025

Conversation

unalmis
Copy link
Collaborator

@unalmis unalmis commented Feb 18, 2025

# this now works
rho = 0.5
alpha = np.linspace(0, 2 * np.pi, 64)
zeta = np.linspace(0, 4 * np.pi, 128)
# on master you need to pass period=(....)
grid = Grid.create_meshgrid([rho, alpha, zeta], coordinates="raz")
data = eq.compute("|B|", grid=grid)

@unalmis unalmis requested review from a team, rahulgaur104, f0uriest, ddudt, dpanici, sinaatalay and YigitElma and removed request for a team February 18, 2025 04:36
@unalmis unalmis added the skip_changelog No need to update changelog on this PR label Feb 18, 2025
@unalmis unalmis added this to the next pip release milestone Feb 18, 2025
@unalmis unalmis self-assigned this Feb 18, 2025
Copy link
Contributor

github-actions bot commented Feb 18, 2025

|             benchmark_name             |         dt(%)          |         dt(s)          |        t_new(s)        |        t_old(s)        | 
| -------------------------------------- | ---------------------- | ---------------------- | ---------------------- | ---------------------- |
 test_build_transform_fft_midres         |     -0.15 +/- 3.01     | -9.31e-04 +/- 1.93e-02 |  6.40e-01 +/- 1.6e-02  |  6.41e-01 +/- 1.1e-02  |
 test_build_transform_fft_highres        |     +0.83 +/- 4.33     | +7.67e-03 +/- 3.99e-02 |  9.29e-01 +/- 3.8e-02  |  9.21e-01 +/- 1.1e-02  |
 test_equilibrium_init_lowres            |     +0.28 +/- 1.31     | +1.12e-02 +/- 5.32e-02 |  4.08e+00 +/- 4.7e-02  |  4.06e+00 +/- 2.4e-02  |
 test_objective_compile_atf              |     +0.19 +/- 2.22     | +1.53e-02 +/- 1.83e-01 |  8.27e+00 +/- 1.3e-01  |  8.26e+00 +/- 1.3e-01  |
 test_objective_compute_atf              |     +0.47 +/- 2.57     | +7.58e-05 +/- 4.12e-04 |  1.61e-02 +/- 2.3e-04  |  1.61e-02 +/- 3.4e-04  |
 test_objective_jac_atf                  |     +0.79 +/- 1.82     | +1.52e-02 +/- 3.50e-02 |  1.94e+00 +/- 2.3e-02  |  1.93e+00 +/- 2.7e-02  |
 test_perturb_1                          |     +0.63 +/- 2.56     | +9.53e-02 +/- 3.89e-01 |  1.53e+01 +/- 2.8e-01  |  1.52e+01 +/- 2.7e-01  |
 test_proximal_jac_atf                   |     -0.36 +/- 1.25     | -2.94e-02 +/- 1.02e-01 |  8.09e+00 +/- 8.6e-02  |  8.12e+00 +/- 5.4e-02  |
 test_proximal_freeb_compute             |     +1.62 +/- 0.89     | +2.96e-03 +/- 1.63e-03 |  1.86e-01 +/- 6.4e-04  |  1.83e-01 +/- 1.5e-03  |
 test_solve_fixed_iter_compiled          |     -0.22 +/- 1.06     | -4.47e-02 +/- 2.19e-01 |  2.05e+01 +/- 1.7e-01  |  2.06e+01 +/- 1.4e-01  |
 test_objective_compute_ripple           |     -0.20 +/- 1.76     | -1.28e-03 +/- 1.14e-02 |  6.50e-01 +/- 7.8e-03  |  6.51e-01 +/- 8.4e-03  |
 test_objective_grad_ripple              |     +0.59 +/- 1.25     | +1.59e-02 +/- 3.38e-02 |  2.73e+00 +/- 1.6e-02  |  2.71e+00 +/- 3.0e-02  |
 test_build_transform_fft_lowres         |     +0.75 +/- 2.88     | +4.59e-03 +/- 1.76e-02 |  6.14e-01 +/- 1.4e-02  |  6.10e-01 +/- 1.1e-02  |
 test_equilibrium_init_medres            |     +1.12 +/- 2.81     | +4.82e-02 +/- 1.21e-01 |  4.36e+00 +/- 1.1e-01  |  4.31e+00 +/- 3.9e-02  |
 test_equilibrium_init_highres           |     +0.24 +/- 1.10     | +1.29e-02 +/- 5.84e-02 |  5.30e+00 +/- 4.4e-02  |  5.29e+00 +/- 3.9e-02  |
 test_objective_compile_dshape_current   |     +1.63 +/- 5.47     | +6.71e-02 +/- 2.26e-01 |  4.19e+00 +/- 1.6e-01  |  4.12e+00 +/- 1.5e-01  |
 test_objective_compute_dshape_current   |     -0.36 +/- 1.65     | -1.99e-05 +/- 8.97e-05 |  5.43e-03 +/- 6.1e-05  |  5.45e-03 +/- 6.6e-05  |
 test_objective_jac_dshape_current       |     +0.20 +/- 6.20     | +8.42e-05 +/- 2.65e-03 |  4.28e-02 +/- 2.0e-03  |  4.28e-02 +/- 1.8e-03  |
 test_perturb_2                          |     +1.08 +/- 1.87     | +2.19e-01 +/- 3.80e-01 |  2.05e+01 +/- 3.5e-01  |  2.03e+01 +/- 1.4e-01  |
 test_proximal_freeb_jac                 |     +0.05 +/- 1.07     | +3.67e-03 +/- 7.57e-02 |  7.06e+00 +/- 3.7e-02  |  7.05e+00 +/- 6.6e-02  |
 test_solve_fixed_iter                   |     -0.20 +/- 2.36     | -6.58e-02 +/- 7.74e-01 |  3.28e+01 +/- 5.4e-01  |  3.28e+01 +/- 5.6e-01  |
 test_LinearConstraintProjection_build   |     +0.55 +/- 2.75     | +5.83e-02 +/- 2.92e-01 |  1.07e+01 +/- 1.9e-01  |  1.06e+01 +/- 2.2e-01  |
 test_objective_compute_ripple_spline    |     -0.92 +/- 3.02     | -2.81e-03 +/- 9.26e-03 |  3.04e-01 +/- 7.1e-03  |  3.06e-01 +/- 5.9e-03  |
 test_objective_grad_ripple_spline       |     +0.75 +/- 1.40     | +1.13e-02 +/- 2.11e-02 |  1.52e+00 +/- 1.2e-02  |  1.50e+00 +/- 1.7e-02  |

Copy link

codecov bot commented Feb 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.70%. Comparing base (e07ac69) to head (1cd2caa).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1596      +/-   ##
==========================================
- Coverage   95.71%   95.70%   -0.02%     
==========================================
  Files         101      101              
  Lines       26284    26285       +1     
==========================================
- Hits        25158    25156       -2     
- Misses       1126     1129       +3     
Files with missing lines Coverage Δ
desc/grid.py 94.59% <100.00%> (+<0.01%) ⬆️

... and 2 files with indirect coverage changes

@unalmis unalmis merged commit 72dd903 into master Feb 18, 2025
27 of 28 checks passed
@unalmis unalmis deleted the grid_period branch February 18, 2025 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip_changelog No need to update changelog on this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants