You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello together!
First of all: great software and many thanks for your work.
I use DICe for the evaluation of high-speed videos, so my result files are very large. Therefore I have to work directly with the exodus files, which I manipulate and plot in a Jupyter notebook. Unfortunately it's quite messy to work with the xarray, since the dimensions and coordinates written by DICe are sub-optimal and can't be changed easily. (E.g. num_nodes is a dimension, but the coordinates x and y are not...)
With this import routine plotting was possible using: dataset.sel(time_step=16937).plot.scatter(x="coordx", y='coordy', hue=DISPLACEMENT_Y, cmap='viridis', marker='s', robust=True, ax=ax1, s= 50)
It seems like the new xarray release and their modification to the .scatterplot() function broke my work-around, now it seems to be impossible to make 2D plots using xarray, if the dimensions are not set correctly.
I have two questions, maybe someone encountered the same problem and found a solution:
Is there any documentation about the structure of the netCDF4 dataset that DICe saves? E.g. What is the difference between INITAL_COORDINATES_X, MODEL_COORDINATS_X, COORDINATE_X and coordx?
Does someone have advice on how to change the dimensions of the xarray (num_nodes to x and y) or knows a good way to make plots from the xarray? Converting data to Pandas/NumPy is not an option unfortunately.
Thanks alot!
The text was updated successfully, but these errors were encountered:
Regarding your question 1: The INITIAL_COORDINATES_X field is the location (in image pixels) of the centroids of the subsets as defined in the input deck. This field does not change throughout the analysis. The MODEL_COORDIATES_X field is the physical coordinates of the subset in model space. These coordinates change as the analysis progresses. They are computed by triangulating the location of the subset in the left and right image. The COORDINATE_X and coordx fileds are artifacts of how the exodus output files work. Exodus needs a coordinate field to be defined so we use this field. If the analysis is 2D, the COORDINATE_X field is the same as the INITIAL_COORDINATE_X field, for stereo, the field is the same as the MODEL_COORDINATES field since for stereo the user is more interested in the physical location of the point rather than the image location in pixels.
I don't have any good ideas for question 2. Hopefully someone else has some good ideas.
Hey, thanks for the fast reply, this helps alot!
So the displacement fields are basically just the difference between INITIAL_COORDINATES and MODEL_COORDINATES.
If someone has any ideas about the dimensions this would be really appreciated. :)
Hello together!
First of all: great software and many thanks for your work.
I use DICe for the evaluation of high-speed videos, so my result files are very large. Therefore I have to work directly with the exodus files, which I manipulate and plot in a Jupyter notebook. Unfortunately it's quite messy to work with the xarray, since the dimensions and coordinates written by DICe are sub-optimal and can't be changed easily. (E.g. num_nodes is a dimension, but the coordinates x and y are not...)
With this import routine plotting was possible using:
dataset.sel(time_step=16937).plot.scatter(x="coordx", y='coordy', hue=DISPLACEMENT_Y, cmap='viridis', marker='s', robust=True, ax=ax1, s= 50)
It seems like the new xarray release and their modification to the .scatterplot() function broke my work-around, now it seems to be impossible to make 2D plots using xarray, if the dimensions are not set correctly.
I have two questions, maybe someone encountered the same problem and found a solution:
Thanks alot!
The text was updated successfully, but these errors were encountered: