Skip to content

Commit 21dfb1b

Browse files
committed
merged conflict with master
two tests were inserted at the same location
2 parents dbe29c2 + 1885c95 commit 21dfb1b

File tree

4 files changed

+42
-8
lines changed

4 files changed

+42
-8
lines changed

Packages/vcs/Lib/configurator.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ def setup_animation(self):
553553
def get_frame():
554554
return self.canvas.animate.frame_num
555555
anim_toolbar.add_slider_button(get_frame, 0, self.canvas.animate.number_of_frames(), "Time Slider", update=self.set_animation_frame)
556-
anim_toolbar.add_slider_button(self.animation_speed, 1, 30, "Frames Per Second", update=self.set_animation_speed)
556+
anim_toolbar.add_slider_button(self.animation_speed, 1, 100, "Speed (Step Delay)", update=self.set_animation_speed)
557557
self.save_anim_button = anim_toolbar.add_button(["Save Animation", "Cancel Save"], action=self.save_animation_press)
558558
self.initialized = True
559559

@@ -582,7 +582,7 @@ def save_animation_press(self, state):
582582

583583
def save_animation(self):
584584
# Save the animation
585-
self.canvas.animate.fps(self.animation_speed)
585+
self.canvas.animate.fps(int(1000.0 / self.animation_speed))
586586

587587
data_titles = {}
588588
name_to_type = {}
@@ -625,10 +625,10 @@ def save_tick(self, obj, event):
625625

626626
def set_animation_speed(self, value):
627627
v = int(value)
628-
self.animation_speed = v
628+
self.animation_speed = 10 * v
629629
if self.animation_timer is not None:
630630
self.interactor.DestroyTimer(self.animation_timer)
631-
self.animation_timer = self.interactor.CreateRepeatingTimer(int(1000.0 / self.animation_speed))
631+
self.animation_timer = self.interactor.CreateRepeatingTimer(self.animation_speed)
632632
return v
633633

634634
def animate(self, obj, event):
@@ -638,7 +638,7 @@ def animate(self, obj, event):
638638

639639
def start_animating(self):
640640
if self.animation_timer is None:
641-
self.animation_timer = self.interactor.CreateRepeatingTimer(int(1000.0 / self.animation_speed))
641+
self.animation_timer = self.interactor.CreateRepeatingTimer(self.animation_speed)
642642

643643
def stop_animating(self):
644644
if self.animation_timer is not None:

Packages/vcs/Lib/template.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -912,7 +912,7 @@ def drawTicks(self,slab,gm,x,axis,number,vp,wc,bg=0,X=None,Y=None,**kargs):
912912
for t in loc.keys():
913913
loc[t]=''
914914
if isinstance(loc,str):
915-
loc = vcs.elements["list"].get(loc,{})
915+
loc = copy.copy(vcs.elements["list"].get(loc,{}))
916916
# Make sure the label passed are not outside the world coordinates
917917
dw1=1.E20
918918
dw2=1.E20

testing/vcs/CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ cdat_add_test(vcs_test_taylor_2_quads
247247
cdat_add_test(vcs_test_1d_marker_not_shown_if_xaxis_flipped
248248
"${PYTHON_EXECUTABLE}"
249249
${cdat_SOURCE_DIR}/testing/vcs/test_1d_marker_not_shown_if_xaxis_flipped.py
250-
${BASELINE_DIR}/test_1d_marker_not_shown_if_xaxis_flipped.png
250+
"${BASELINE_DIR}/test_1d_marker_not_shown_if_xaxis_flipped.png"
251251
)
252252

253253

@@ -258,10 +258,15 @@ cdat_add_test(vcs_test_taylor_2_quads
258258
${cdat_SOURCE_DIR}/testing/vcs/test_vcs_auto_time_labels.py
259259
"${BASELINE_DIR}/test_vcs_auto_time_labels.png"
260260
)
261+
cdat_add_test(test_vcs_lon_axes_freak_out
262+
"${PYTHON_EXECUTABLE}"
263+
${cdat_SOURCE_DIR}/testing/vcs/test_lon_axes_freak_out.py
264+
"${BASELINE_DIR}/test_lon_axes_freak_out.png"
265+
)
261266
cdat_add_test(test_vcs_isofill_mask_cell_shift
262267
"${PYTHON_EXECUTABLE}"
263268
${cdat_SOURCE_DIR}/testing/vcs/test_vcs_isofill_mask_cell_shift.py
264-
${BASELINE_DIR}/test_vcs_isofill_mask_cell_shift.png
269+
"${BASELINE_DIR}/test_vcs_isofill_mask_cell_shift.png"
265270
)
266271
cdat_add_test(vcs_test_bad_time_units
267272
"${PYTHON_EXECUTABLE}"
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import os,sys,vcs,cdms2
2+
src=sys.argv[1]
3+
pth = os.path.join(os.path.dirname(__file__),"..")
4+
sys.path.append(pth)
5+
import checkimage
6+
7+
8+
f=cdms2.open(os.path.join(vcs.prefix,"sample_data","clt.nc"))
9+
s=f("clt")
10+
s3=f("clt",longitude=(0,360))
11+
12+
print s.shape,s3.shape
13+
14+
15+
x=vcs.init()
16+
x.drawlogooff()
17+
x.setbgoutputdimensions(1200,1091,units="pixels")
18+
19+
x.plot(s,bg=1)
20+
x.clear()
21+
x.plot(s3,bg=1)
22+
23+
fnm = "test_lon_axes_freak_out.png"
24+
25+
x.png(fnm)
26+
print "fnm:",fnm
27+
print "src:",src
28+
ret = checkimage.check_result_image(fnm,src,checkimage.defaultThreshold)
29+
sys.exit(ret)

0 commit comments

Comments
 (0)