File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -558,6 +558,19 @@ def test_slice_times(self):
558558 assert_equal (hdr ['slice_end' ], 5 )
559559 assert_array_almost_equal (hdr ['slice_duration' ], 0.1 )
560560
561+ # Ambiguous case
562+ hdr2 = self .header_class ()
563+ hdr2 .set_dim_info (slice = 2 )
564+ hdr2 .set_slice_duration (0.1 )
565+ hdr2 .set_data_shape ((1 , 1 , 2 ))
566+ hdr2 .set_slice_times ([0.1 , 0 ]) # will generate warning that multiple match
567+ # but always must be choosing sequential one first
568+ assert_equal (hdr2 .get_value_label ('slice_code' ), 'sequential decreasing' )
569+ # and the other direction
570+ hdr2 .set_slice_times ([0 , 0.1 ])
571+ assert_equal (hdr2 .get_value_label ('slice_code' ), 'sequential increasing' )
572+
573+
561574 def test_intents (self ):
562575 ehdr = self .header_class ()
563576 ehdr .set_intent ('t test' , (10 ,), name = 'some score' )
You can’t perform that action at this time.
0 commit comments