-
Notifications
You must be signed in to change notification settings - Fork 3
/
animated_graph.py
53 lines (44 loc) · 2.66 KB
/
animated_graph.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import imageio
from matplotlib.pyplot import imread
ims = []
ims.append(imread("spectra/Young_Old/Thresh_400/spectra_img.png"))
ims.append(imread("spectra/Young_Old/Thresh_800/spectra_img.png"))
ims.append(imread("spectra/Young_Old/Thresh_1200/spectra_img.png"))
ims.append(imread("spectra/Young_Old/Thresh_1600/spectra_img.png"))
ims.append(imread("spectra/Young_Old/Thresh_2000/spectra_img.png"))
imageio.mimsave('spectra/Young_Old/animated.gif', ims, duration = 1)
ims = []
ims.append(imread("spectra/Coma/Parcel_90/Thresh_400/spectra_img.png"))
ims.append(imread("spectra/Coma/Parcel_90/Thresh_800/spectra_img.png"))
ims.append(imread("spectra/Coma/Parcel_90/Thresh_1200/spectra_img.png"))
ims.append(imread("spectra/Coma/Parcel_90/Thresh_1600/spectra_img.png"))
ims.append(imread("spectra/Coma/Parcel_90/Thresh_2000/spectra_img.png"))
imageio.mimsave('spectra/Coma/Parcel_90/animated.gif', ims, duration = 1)
ims = []
ims.append(imread("spectra/Coma/Parcel_417/Thresh_8663/spectra_img.png"))
ims.append(imread("spectra/Coma/Parcel_417/Thresh_17326/spectra_img.png"))
ims.append(imread("spectra/Coma/Parcel_417/Thresh_25988/spectra_img.png"))
ims.append(imread("spectra/Coma/Parcel_417/Thresh_34651/spectra_img.png"))
ims.append(imread("spectra/Coma/Parcel_417/Thresh_43314/spectra_img.png"))
imageio.mimsave('spectra/Coma/Parcel_417/animated.gif', ims, duration = 1)
ims = []
ims.append(imread("spectra/HCP/Parcel_90/Thresh_400/spectra_img.png"))
ims.append(imread("spectra/HCP/Parcel_90/Thresh_800/spectra_img.png"))
ims.append(imread("spectra/HCP/Parcel_90/Thresh_1200/spectra_img.png"))
ims.append(imread("spectra/HCP/Parcel_90/Thresh_1600/spectra_img.png"))
ims.append(imread("spectra/HCP/Parcel_90/Thresh_2000/spectra_img.png"))
imageio.mimsave('spectra/HCP/Parcel_90/animated.gif', ims, duration = 1)
ims = []
ims.append(imread("spectra/HCP/Parcel_384/Thresh_7344/spectra_img.png"))
ims.append(imread("spectra/HCP/Parcel_384/Thresh_14689/spectra_img.png"))
ims.append(imread("spectra/HCP/Parcel_384/Thresh_22033/spectra_img.png"))
ims.append(imread("spectra/HCP/Parcel_384/Thresh_29378/spectra_img.png"))
ims.append(imread("spectra/HCP/Parcel_384/Thresh_36722/spectra_img.png"))
imageio.mimsave('spectra/HCP/Parcel_384/animated.gif', ims, duration = 1)
ims = []
ims.append(imread("spectra/HCP/Parcel_459/Thresh_10498/spectra_img.png"))
ims.append(imread("spectra/HCP/Parcel_459/Thresh_20996/spectra_img.png"))
ims.append(imread("spectra/HCP/Parcel_459/Thresh_31494/spectra_img.png"))
ims.append(imread("spectra/HCP/Parcel_459/Thresh_41992/spectra_img.png"))
ims.append(imread("spectra/HCP/Parcel_459/Thresh_52490/spectra_img.png"))
imageio.mimsave('spectra/HCP/Parcel_459/animated.gif', ims, duration = 1)