Datasets:

Modalities:
Text
Video
Formats:
text
ArXiv:
Libraries:
Datasets
License:
JianxGao commited on
Commit
a96cb0d
1 Parent(s): 188f7da
sub-0006/raw_data/{fmap → phasediff}/sub-0006_fmap-1_phasediff.json RENAMED
File without changes
sub-0006/raw_data/{fmap → phasediff}/sub-0006_fmap-1_phasediff.nii.gz RENAMED
File without changes
sub-0006/raw_data/{fmap → phasediff}/sub-0006_fmap-2_phasediff.json RENAMED
File without changes
sub-0006/raw_data/{fmap → phasediff}/sub-0006_fmap-2_phasediff.nii.gz RENAMED
File without changes
sub-0006/raw_data/{fmap → phasediff}/sub-0006_fmap-3_phasediff.json RENAMED
File without changes
sub-0006/raw_data/{fmap → phasediff}/sub-0006_fmap-3_phasediff.nii.gz RENAMED
File without changes
sub-0006/raw_data/{fmap → phasediff}/sub-0006_fmap-4_phasediff.json RENAMED
File without changes
sub-0006/raw_data/{fmap → phasediff}/sub-0006_fmap-4_phasediff.nii.gz RENAMED
File without changes
sub-0006/raw_data/rename.ipynb DELETED
@@ -1,161 +0,0 @@
1
- {
2
- "cells": [
3
- {
4
- "cell_type": "code",
5
- "execution_count": 1,
6
- "metadata": {},
7
- "outputs": [
8
- {
9
- "data": {
10
- "text/plain": [
11
- "['sub-0006_task-shape_run-27_bold.nii.gz',\n",
12
- " 'sub-0006_task-shape_run-27_bold.json',\n",
13
- " 'sub-0006_task-shape_run-16_bold.nii.gz',\n",
14
- " 'sub-0006_task-shape_run-16_bold.json',\n",
15
- " 'sub-0006_task-shape_run-1_bold.nii.gz',\n",
16
- " 'sub-0006_task-shape_run-1_bold.json',\n",
17
- " 'sub-0006_task-shape_run-28_bold.nii.gz',\n",
18
- " 'sub-0006_task-shape_run-28_bold.json',\n",
19
- " 'sub-0006_task-shape_run-2_bold.nii.gz',\n",
20
- " 'sub-0006_task-shape_run-2_bold.json',\n",
21
- " 'sub-0006_task-shape_run-29_bold.nii.gz',\n",
22
- " 'sub-0006_task-shape_run-29_bold.json',\n",
23
- " 'sub-0006_task-shape_run-3_bold.nii.gz',\n",
24
- " 'sub-0006_task-shape_run-3_bold.json',\n",
25
- " 'sub-0006_task-shape_run-30_bold.nii.gz',\n",
26
- " 'sub-0006_task-shape_run-30_bold.json',\n",
27
- " 'sub-0006_task-shape_run-19_bold.nii.gz',\n",
28
- " 'sub-0006_task-shape_run-19_bold.json',\n",
29
- " 'sub-0006_task-shape_run-4_bold.nii.gz',\n",
30
- " 'sub-0006_task-shape_run-4_bold.json',\n",
31
- " 'sub-0006_task-shape_run-31_bold.nii.gz',\n",
32
- " 'sub-0006_task-shape_run-31_bold.json',\n",
33
- " 'sub-0006_task-shape_run-17_bold.nii.gz',\n",
34
- " 'sub-0006_task-shape_run-17_bold.json',\n",
35
- " 'sub-0006_task-shape_run-5_bold.nii.gz',\n",
36
- " 'sub-0006_task-shape_run-5_bold.json',\n",
37
- " 'sub-0006_task-shape_run-32_bold.nii.gz',\n",
38
- " 'sub-0006_task-shape_run-32_bold.json',\n",
39
- " 'sub-0006_task-shape_run-18_bold.nii.gz',\n",
40
- " 'sub-0006_task-shape_run-18_bold.json',\n",
41
- " 'sub-0006_task-shape_run-6_bold.nii.gz',\n",
42
- " 'sub-0006_task-shape_run-6_bold.json',\n",
43
- " 'sub-0006_task-shape_run-20_bold.nii.gz',\n",
44
- " 'sub-0006_task-shape_run-20_bold.json',\n",
45
- " 'sub-0006_task-shape_run-7_bold.nii.gz',\n",
46
- " 'sub-0006_task-shape_run-7_bold.json',\n",
47
- " 'sub-0006_task-shape_run-21_bold.nii.gz',\n",
48
- " 'sub-0006_task-shape_run-21_bold.json',\n",
49
- " 'sub-0006_task-shape_run-8_bold.nii.gz',\n",
50
- " 'sub-0006_task-shape_run-8_bold.json',\n",
51
- " 'sub-0006_task-shape_run-22_bold.nii.gz',\n",
52
- " 'sub-0006_task-shape_run-22_bold.json',\n",
53
- " 'sub-0006_task-shape_run-23_bold.nii.gz',\n",
54
- " 'sub-0006_task-shape_run-23_bold.json',\n",
55
- " 'sub-0006_task-shape_run-24_bold.nii.gz',\n",
56
- " 'sub-0006_task-shape_run-24_bold.json',\n",
57
- " 'sub-0006_task-shape_run-9_bold.nii.gz',\n",
58
- " 'sub-0006_task-shape_run-9_bold.json',\n",
59
- " 'sub-0006_task-shape_run-25_bold.nii.gz',\n",
60
- " 'sub-0006_task-shape_run-25_bold.json',\n",
61
- " 'sub-0006_task-shape_run-10_bold.nii.gz',\n",
62
- " 'sub-0006_task-shape_run-10_bold.json',\n",
63
- " 'sub-0006_task-shape_run-26_bold.nii.gz',\n",
64
- " 'sub-0006_task-shape_run-26_bold.json',\n",
65
- " 'sub-0006_task-shape_run-11_bold.nii.gz',\n",
66
- " 'sub-0006_task-shape_run-11_bold.json',\n",
67
- " 'sub-0006_task-shape_run-12_bold.nii.gz',\n",
68
- " 'sub-0006_task-shape_run-12_bold.json',\n",
69
- " 'sub-0006_task-shape_run-13_bold.nii.gz',\n",
70
- " 'sub-0006_task-shape_run-13_bold.json',\n",
71
- " 'sub-0006_task-shape_run-14_bold.nii.gz',\n",
72
- " 'sub-0006_task-shape_run-14_bold.json',\n",
73
- " 'sub-0006_task-shape_run-15_bold.nii.gz',\n",
74
- " 'sub-0006_task-shape_run-15_bold.json']"
75
- ]
76
- },
77
- "execution_count": 1,
78
- "metadata": {},
79
- "output_type": "execute_result"
80
- }
81
- ],
82
- "source": [
83
- "import os\n",
84
- "files = os.listdir(\"/home/ubuntu/add_disk/dcm2bids/BIDS/sub-0006/func\")\n",
85
- "files"
86
- ]
87
- },
88
- {
89
- "cell_type": "code",
90
- "execution_count": 4,
91
- "metadata": {},
92
- "outputs": [],
93
- "source": [
94
- "for i in range(32):\n",
95
- " index = i+1\n",
96
- " oldindex = i+1\n",
97
- " if index<=16:\n",
98
- " index+=16\n",
99
- " else:\n",
100
- " index-=16\n",
101
- " oldname = 'sub-0006_task-shape_run-{}_bold.json'.format(oldindex)\n",
102
- " newname = 'tmp_sub-0006_task-shape_run-{}_bold.json'.format(index)\n",
103
- " # new_name = 'sub-0006_task-shape_run-{}_bold.json'.format()\n",
104
- " os.system(\"mv func/{} func/{}\".format(oldname,newname))\n",
105
- " # print(\"mv func/{} func/{}\".format(oldname,newname))"
106
- ]
107
- },
108
- {
109
- "cell_type": "code",
110
- "execution_count": 10,
111
- "metadata": {},
112
- "outputs": [],
113
- "source": [
114
- "for i in range(4):\n",
115
- " index = i+1\n",
116
- " oldindex = i+1\n",
117
- " if index<=2:\n",
118
- " index+=2\n",
119
- " else:\n",
120
- " index-=2\n",
121
- " oldname = 'sub-0006_fmap-{}_phasediff.nii.gz'.format(oldindex)\n",
122
- " newname = 'tmp_sub-0006_fmap-{}_phasediff.nii.gz'.format(index)\n",
123
- " # new_name = 'sub-0006_task-shape_run-{}_bold.json'.format()\n",
124
- " os.system(\"mv fmap/{} fmap/{}\".format(oldname,newname))\n",
125
- " # print(\"mv fmap/{} fmap/{}\".format(oldname,newname))"
126
- ]
127
- },
128
- {
129
- "cell_type": "code",
130
- "execution_count": 13,
131
- "metadata": {},
132
- "outputs": [],
133
- "source": [
134
- "files = os.listdir(\"/home/ubuntu/add_disk/dcm2bids/BIDS/sub-0006/func\")\n",
135
- "for file in files:\n",
136
- " os.system(\"mv func/{} func/{}\".format(file, file.replace(\"tmp_\",\"\")))"
137
- ]
138
- }
139
- ],
140
- "metadata": {
141
- "kernelspec": {
142
- "display_name": "Python 3",
143
- "language": "python",
144
- "name": "python3"
145
- },
146
- "language_info": {
147
- "codemirror_mode": {
148
- "name": "ipython",
149
- "version": 3
150
- },
151
- "file_extension": ".py",
152
- "mimetype": "text/x-python",
153
- "name": "python",
154
- "nbconvert_exporter": "python",
155
- "pygments_lexer": "ipython3",
156
- "version": "3.8.19"
157
- }
158
- },
159
- "nbformat": 4,
160
- "nbformat_minor": 2
161
- }