Completed
Push — master ( 9821e6...398a65 )
by Jasper
8s
created

inheritFrom()   A

Complexity

Conditions 3

Size

Total Lines 21

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 3
c 1
b 0
f 0
dl 0
loc 21
rs 9.3142
1
2
3
def inheritFrom(provenance, parentProvenance):
4
    inheritableFields = [
5
    'acquired',
6
    'subject',
7
    'protocol',
8
    'technique',
9
    'repetition-time',
10
    'epi-factor',
11
    'magnetization-transfer-contrast',
12
    'diffusion',
13
    'echo-time',
14
    'flip-angle',
15
    'inversion-time',
16
    'duration',
17
    'subject-position',
18
    'water-fat-shift',
19
    ]
20
    for field in inheritableFields:
21
        if field in parentProvenance:
22
            provenance[field] = parentProvenance[field]
23
    return provenance
24