~christopher-hunt08/maus/maus_integrated_kalman

« back to all changes in this revision

Viewing changes to src/common_py/geometry/xsltScripts/ParentFileTranslation.xsl

  • Committer: Christopher Hunt
  • Date: 2015-06-18 14:48:59 UTC
  • mfrom: (697.69.1 merge)
  • mto: (697.69.2 merge_hunt)
  • mto: This revision was merged to the branch mainline in revision 708.
  • Revision ID: christopher.hunt08@imperial.ac.uk-20150618144859-rki5ma1lv8722w41
Merged in latest trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
96
96
 
97
97
                            </xsl:text></xsl:when></xsl:choose>
98
98
                            </xsl:for-each></xsl:when><xsl:otherwise> </xsl:otherwise></xsl:choose>
99
 
                <xsl:for-each select="MICE_Information/Configuration_Information/coolingchannel/magnets/magnet">
 
99
                <xsl:for-each select="MICE_Information/Configuration_Information/coolingchannel/magnet">
100
100
                    <xsl:choose>
101
101
                        <xsl:when test="contains(@name, 'SSU')">
102
102
                            <xsl:for-each select="coil">
103
103
                                <xsl:choose>
104
 
                                    <xsl:when test="contains(@name, 'SSU-T2')">Substitution $SSUT2 <xsl:value-of select="@iset"/>
105
 
                                        Substitution $SSUT2Polarity <xsl:value-of select="../@polarity"/><xsl:text>
106
 
                            
107
 
                        </xsl:text></xsl:when>
108
 
                                    <xsl:when test="contains(@name, 'SSU-T1')">Substitution $SSUT1 <xsl:value-of select="@iset"/>
109
 
                                        Substitution $SSUT2Polarity <xsl:value-of select="../@polarity"/><xsl:text>
110
 
                            
111
 
                        </xsl:text></xsl:when>
112
 
                                    <xsl:when test="contains(@name, 'SSU-C')">Substitution $SSUC <xsl:value-of select="@iset"/>
 
104
                                    <xsl:when test="contains(@name, 'SSU-T2')">Substitution $SSUT2Current <xsl:value-of select="@iset"/>
 
105
                                        Substitution $SSUT2Polarity <xsl:value-of select="../@polarity"/><xsl:text>
 
106
                            
 
107
                        </xsl:text></xsl:when>
 
108
                                    <xsl:when test="contains(@name, 'SSU-T1')">Substitution $SSUT1Current <xsl:value-of select="@iset"/>
 
109
                                        Substitution $SSUT1Polarity <xsl:value-of select="../@polarity"/><xsl:text>
 
110
                            
 
111
                        </xsl:text></xsl:when>
 
112
                                    <xsl:when test="contains(@name, 'SSU-C')">Substitution $SSUCCurrent <xsl:value-of select="@iset"/>
113
113
                                        Substitution $SSUCPolarity <xsl:value-of select="../@polarity"/><xsl:text> 
114
114
                        
115
115
                        </xsl:text></xsl:when>
116
 
                                    <xsl:when test="contains(@name, 'SSU-M1')">Substitution $SSUM1 <xsl:value-of select="@iset"/>
 
116
                                    <xsl:when test="contains(@name, 'SSU-M1')">Substitution $SSUM1Current <xsl:value-of select="@iset"/>
117
117
                                        Substitution $SSUM1Polarity <xsl:value-of select="../@polarity"/><xsl:text>
118
118
                            
119
119
                        </xsl:text></xsl:when>
120
 
                                    <xsl:when test="contains(@name, 'SSU-M2')">Substitution $SSUM2 <xsl:value-of select="@iset"/>
 
120
                                    <xsl:when test="contains(@name, 'SSU-M2')">Substitution $SSUM2Current <xsl:value-of select="@iset"/>
121
121
                                        Substitution $SSUM2Polarity <xsl:value-of select="../@polarity"/><xsl:text>
122
122
                            
123
123
                        </xsl:text></xsl:when>            
124
124
                                </xsl:choose>
125
125
                            </xsl:for-each>
126
126
                        </xsl:when>
127
 
                        <xsl:when test="contains(@name, 'FCM') and contains(@mode, 'Solenoid')">
 
127
                        <xsl:when test="contains(@name, 'FCM') and ( contains(@mode, 'Solenoid') or contains(@mode, 'solenoid') )">
128
128
                            Substitution $FCMMode +1<xsl:text>
129
129
                                        
130
130
                        </xsl:text>
131
131
                            <xsl:for-each select="coil">
132
132
                                <xsl:choose>
133
 
                                    <xsl:when test="contains(@name, 'FCM-U')">Substitution $FCMU <xsl:value-of select="@iset"/>
 
133
                                    <xsl:when test="contains(@name, 'FCM-U')">Substitution $FCMUCurrent <xsl:value-of select="@iset"/>
134
134
                                        Substitution $FCMUPolarity <xsl:value-of select="../@polarity"/><xsl:text>
135
135
                                        
136
136
                        </xsl:text>
137
137
                                    </xsl:when>
138
 
                                    <xsl:when test="contains(@name, 'FCM-D')">Substitution $FCMD <xsl:value-of select="@iset"/>
 
138
                                    <xsl:when test="contains(@name, 'FCM-D')">Substitution $FCMDCurrent <xsl:value-of select="@iset"/>
139
139
                                        Substitution $FCMDPolarity <xsl:value-of select="../@polarity"/><xsl:text>
140
140
                            
141
141
                        </xsl:text></xsl:when>                   
142
142
                                </xsl:choose>
143
143
                            </xsl:for-each>
144
144
                        </xsl:when>
145
 
                        <xsl:when test="contains(@name, 'FCM') and contains(@mode, 'Flip')">
146
 
                            Substitution $FCMMode +1<xsl:text>
 
145
                        <xsl:when test="contains(@name, 'FCM') and ( contains(@mode, 'Flip') or contains(@mode, 'flip') )">
 
146
                            Substitution $FCMMode -1<xsl:text>
147
147
                                        
148
148
                        </xsl:text>
149
149
                            <xsl:for-each select="coil">
150
150
                                <xsl:choose>
151
 
                                    <xsl:when test="contains(@name, 'FCM-U')">Substitution $FCMU <xsl:value-of select="@iset"/>
 
151
                                    <xsl:when test="contains(@name, 'FCM-U')">Substitution $FCMUCurrent <xsl:value-of select="@iset"/>
152
152
                                        Substitution $FCMUPolarity <xsl:value-of select="../@polarity"/><xsl:text>
153
153
                                        
154
154
                        </xsl:text></xsl:when>
155
 
                                    <xsl:when test="contains(@name, 'FCM-D')">Substitution $FCMD <xsl:value-of select="@iset"/>
 
155
                                    <xsl:when test="contains(@name, 'FCM-D')">Substitution $FCMDCurrent <xsl:value-of select="@iset"/>
156
156
                                        Substitution $FCMDPolarity <xsl:value-of select="../@polarity"/><xsl:text>
157
157
                            
158
158
                        </xsl:text></xsl:when>    
162
162
                        <xsl:when test="contains(@name, 'SSD')">
163
163
                            <xsl:for-each select="coil">
164
164
                                <xsl:choose>
165
 
                                    <xsl:when test="contains(@name, 'SSD-T2')">Substitution $SSDT2 <xsl:value-of select="@iset"/>
166
 
                                        Substitution $SSDT2Polarity <xsl:value-of select="../@polarity"/><xsl:text>
167
 
                            
168
 
                        </xsl:text></xsl:when>
169
 
                                    <xsl:when test="contains(@name, 'SSD-T1')">Substitution $SSDT1 <xsl:value-of select="@iset"/>
170
 
                                        Substitution $SSDT2Polarity <xsl:value-of select="../@polarity"/><xsl:text>
171
 
                            
172
 
                        </xsl:text></xsl:when>
173
 
                                    <xsl:when test="contains(@name, 'SSD-C')">Substitution $SSDC <xsl:value-of select="@iset"/>
 
165
                                    <xsl:when test="contains(@name, 'SSD-T2')">Substitution $SSDT2Current <xsl:value-of select="@iset"/>
 
166
                                        Substitution $SSDT2Polarity <xsl:value-of select="../@polarity"/><xsl:text>
 
167
                            
 
168
                        </xsl:text></xsl:when>
 
169
                                    <xsl:when test="contains(@name, 'SSD-T1')">Substitution $SSDT1Current <xsl:value-of select="@iset"/>
 
170
                                        Substitution $SSDT1Polarity <xsl:value-of select="../@polarity"/><xsl:text>
 
171
                            
 
172
                        </xsl:text></xsl:when>
 
173
                                    <xsl:when test="contains(@name, 'SSD-C')">Substitution $SSDCCurrent <xsl:value-of select="@iset"/>
174
174
                                        Substitution $SSDCPolarity <xsl:value-of select="../@polarity"/><xsl:text> 
175
175
                        
176
176
                        </xsl:text></xsl:when>
177
 
                                    <xsl:when test="contains(@name, 'SSD-M1')">Substitution $SSDM1 <xsl:value-of select="@iset"/>
 
177
                                    <xsl:when test="contains(@name, 'SSD-M1')">Substitution $SSDM1Current <xsl:value-of select="@iset"/>
178
178
                                        Substitution $SSDM1Polarity <xsl:value-of select="../@polarity"/><xsl:text>
179
179
                            
180
180
                        </xsl:text></xsl:when>
181
 
                                    <xsl:when test="contains(@name, 'SSD-M2')">Substitution $SSDM2 <xsl:value-of select="@iset"/>
 
181
                                    <xsl:when test="contains(@name, 'SSD-M2')">Substitution $SSDM2Current <xsl:value-of select="@iset"/>
182
182
                                        Substitution $SSDM2Polarity <xsl:value-of select="../@polarity"/><xsl:text>
183
183
                            
184
184
                        </xsl:text></xsl:when>    
311
311
                            PropertyDouble Thickness <xsl:value-of select="Thickness/@value"/>
312
312
                            PropertyDouble InnerRadius <xsl:value-of select="InnerRadius/@value"/>
313
313
                            ScaleFactor <xsl:choose>
314
 
                            <xsl:when test="contains(FieldName/@name, 'MatchCoil1_0') and boolean($mcmode)">$SSUM1Polarity * $SSUM1</xsl:when>
315
 
                            <xsl:when test="contains(FieldName/@name, 'MatchCoil2_0') and boolean($mcmode)">$SSUM2Polarity * $SSUM2</xsl:when>
316
 
                            <xsl:when test="contains(FieldName/@name, 'CenterCoil_0') and boolean($mcmode)">$SSUCPolarity * $SSUC</xsl:when>
317
 
                            <xsl:when test="contains(FieldName/@name, 'EndCoil1_0') and boolean($mcmode)">$SSUT1Polarity * $SSUT1</xsl:when>
318
 
                            <xsl:when test="contains(FieldName/@name, 'EndCoil2_0') and boolean($mcmode)">$SSUT2Polarity * $SSUT2</xsl:when>
319
 
                            <xsl:when test="contains(FieldName/@name, 'FCoil_0') and boolean($mcmode)">$FCMUPolarity * $FCMU</xsl:when>
320
 
                            <xsl:when test="contains(FieldName/@name, 'FCoil_1') and boolean($mcmode)">$FCMUPolarity * $FCMMode * $FCMD</xsl:when>
321
 
                            <xsl:when test="contains(FieldName/@name, 'MatchCoil1_1') and boolean($mcmode)">$SSDM1Polarity * $FCMMode * $SSDM1</xsl:when>
322
 
                            <xsl:when test="contains(FieldName/@name, 'MatchCoil2_1') and boolean($mcmode)">$SSDM2Polarity * $FCMMode * $SSDM2</xsl:when>
323
 
                            <xsl:when test="contains(FieldName/@name, 'CenterCoil_1') and boolean($mcmode)">$SSDCPolarity * $FCMMode * $SSDC</xsl:when>
324
 
                            <xsl:when test="contains(FieldName/@name, 'EndCoil1_1') and boolean($mcmode)">$SSDT1Polarity * $FCMMode * $SSDT1</xsl:when>
325
 
                            <xsl:when test="contains(FieldName/@name, 'EndCoil2_1') and boolean($mcmode)">$SSDT2Polarity * $FCMMode * $SSDT2</xsl:when>
 
314
                            <xsl:when test="contains(FieldName/@name, 'MatchCoil1_0') and boolean($mcmode)">$SSUM1Polarity*$SSUM1Current</xsl:when>
 
315
                            <xsl:when test="contains(FieldName/@name, 'MatchCoil2_0') and boolean($mcmode)">$SSUM2Polarity*$SSUM2Current</xsl:when>
 
316
                            <xsl:when test="contains(FieldName/@name, 'CenterCoil_0') and boolean($mcmode)">$SSUCPolarity*$SSUCCurrent</xsl:when>
 
317
                            <xsl:when test="contains(FieldName/@name, 'EndCoil1_0') and boolean($mcmode)">$SSUT1Polarity*$SSUT1Current</xsl:when>
 
318
                            <xsl:when test="contains(FieldName/@name, 'EndCoil2_0') and boolean($mcmode)">$SSUT2Polarity*$SSUT2Current</xsl:when>
 
319
                            <xsl:when test="contains(FieldName/@name, 'FCoil_0') and boolean($mcmode)">$FCMUPolarity*$FCMUCurrent</xsl:when>
 
320
                            <xsl:when test="contains(FieldName/@name, 'FCoil_1') and boolean($mcmode)">$FCMUPolarity*$FCMMode*$FCMDCurrent</xsl:when>
 
321
                            <xsl:when test="contains(FieldName/@name, 'MatchCoil1_1') and boolean($mcmode)">$SSDM1Polarity*$FCMMode*$SSDM1Current</xsl:when>
 
322
                            <xsl:when test="contains(FieldName/@name, 'MatchCoil2_1') and boolean($mcmode)">$SSDM2Polarity*$FCMMode*$SSDM2Current</xsl:when>
 
323
                            <xsl:when test="contains(FieldName/@name, 'CenterCoil_1') and boolean($mcmode)">$SSDCPolarity*$FCMMode*$SSDCCurrent</xsl:when>
 
324
                            <xsl:when test="contains(FieldName/@name, 'EndCoil1_1') and boolean($mcmode)">$SSDT1Polarity*$FCMMode*$SSDT1Current</xsl:when>
 
325
                            <xsl:when test="contains(FieldName/@name, 'EndCoil2_1') and boolean($mcmode)">$SSDT2Polarity*$FCMMode*$SSDT2Current</xsl:when>
326
326
                            <xsl:otherwise><xsl:value-of select="ScaleFactor/@value"/></xsl:otherwise>
327
327
                            </xsl:choose>
328
328
                            }