Skip to content

Data resampling#46

Open
jwasikpsnc wants to merge 9 commits intoiterorganization:developfrom
jwasikpsnc:data-resampling
Open

Data resampling#46
jwasikpsnc wants to merge 9 commits intoiterorganization:developfrom
jwasikpsnc:data-resampling

Conversation

@jwasikpsnc
Copy link
Collaborator

First working version of data interpolation (not release-ready)

  • ✅ added interpolate_over parameter to /data/plot_data/ endpoint
  • ✅ added core functionality
  • ✅ performed manual tests with artificial data
  • 🛑 lacks visual data-consistency confirmation
  • 🛑 lacks extensive testing with real data

Purpose of this PR is to merge functionality into develop, so the Frontend widgets can be created and integrated.

@jwasikpsnc
Copy link
Collaborator Author

@mfiaudrin-epsyl FYI

@mfiaudrin-epsyl
Copy link
Collaborator

Hi @jwasikpsnc,
I would like to test your functionnality but I am not sure how to type the parameter interpolate_over.
Can you give me an example to test it ?
Thanks !

@jwasikpsnc
Copy link
Collaborator Author

Hi @mfiaudrin-epsyl
You just put full uri to node you want to have on the same plot.
I have tested it like this:

http://127.0.0.1:40443/data/plot_data?uri=imas:hdf5?path=/home/ITER/wasikj/Desktop/work/IBEX/testdb1#equilibrium/time_slice[:]/profiles_2d[:]/psi&interpolate_over=imas:hdf5?path=/home/ITER/wasikj/Desktop/work/IBEX/testdb2#equilibrium/time_slice[:]/profiles_2d[:]/psi

(there is testdb1 and testdb2)
If you want to add another URI to the list you just have to add another &interpolate_over=<uri> AFAIR, but i didn't checked it now.
You can always use swagger to create example curl request from parameters.
🙌

@mfiaudrin-epsyl
Copy link
Collaborator

Hi @jwasikpsnc,
Thank you for the functionnality. I give you my feedback on the tests I have done from your example:

  • ✅ Interpolation is working as expected for time coordinate
  • 🛑 Coordinates order isn't preserved whereas it must be.
    (We expect [dim1, dim2, porfiles_2d, time] but we have [time, profiles_2d, dim2, dim1])
  • 🛑 Coordinates having dependencies (all except time) have an unexpected shape and incorrect values.
    (For instance, profiles_2d shape is [4,2]. It didn't change but it should be [4, 4]. Moreover, it returns an array of shape [4]. On the end, the vector looks to not be interpolated as expected because we have: A == [0, 1] ; B == [0, 1, 2, 3] ; AB == [1, 2, 3, 4] whereas it should be [0, 1, 2, 3])

My tests are done with:

  • A = /data/plot_data?uri=imas:hdf5?path=/home/ITER/wasikj/Desktop/work/IBEX/testdb1#equilibrium/time_slice[:]/profiles_2d[:]/psi
  • B = /data/plot_data?uri=imas:hdf5?path=/home/ITER/wasikj/Desktop/work/IBEX/testdb2#equilibrium/time_slice[:]/profiles_2d[:]/psi
  • AB = /data/plot_data?uri=imas:hdf5?path=/home/ITER/wasikj/Desktop/work/IBEX/testdb1#equilibrium/time_slice[:]/profiles_2d[:]/psi
    &interpolate_over=imas:hdf5?path=/home/ITER/wasikj/Desktop/work/IBEX/testdb2#equilibrium/time_slice[:]/profiles_2d[:]/psi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants