Update test4.ipynb
This commit is contained in:
@ -87,12 +87,9 @@
|
||||
"traitement = savgol_filter(pre_traitement, window_length=50, polyorder=5)\n",
|
||||
"\n",
|
||||
"volume = traitement[:, ::10, :]\n",
|
||||
"#volume = np.load('Dataset/3D_Dataset_All_Wave_PY_Data/3D_Dataset_shear_Wave_Rot00.npy')\n",
|
||||
"r, c = volume[0].shape\n",
|
||||
"# Define the number of frames based on the depth of the 3D volume\n",
|
||||
"nb_frames = volume.shape[0]\n",
|
||||
"\n",
|
||||
"# Define the z-scale based on the number of frames\n",
|
||||
"z_scale = 6.7 / nb_frames\n",
|
||||
"\n",
|
||||
"#custom_colorscale = [(0, 'blue'), (0.5, 'cyan'), (1, 'red')]\n",
|
||||
@ -103,7 +100,7 @@
|
||||
" cmin=0, cmax=20000,\n",
|
||||
" colorscale='Jet'\n",
|
||||
" ),\n",
|
||||
" name=str(k) # you need to name the frame for the animation to behave properly\n",
|
||||
" name=str(k) \n",
|
||||
" )\n",
|
||||
" for k in range(nb_frames)])"
|
||||
]
|
||||
@ -114,7 +111,7 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# Add data to be displayed before animation starts\n",
|
||||
|
||||
"fig.add_trace(go.Surface(\n",
|
||||
" z=z_scale * nb_frames * np.ones((r, c)),\n",
|
||||
" surfacecolor=np.flipud(volume[nb_frames - 1]),\n",
|
||||
|
Reference in New Issue
Block a user