Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 51 lines (39 sloc) 1.05 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
"""
Figures that show 3D views of the emissivity cubes

The images should already have been created with makemovie

"""
from PIL import Image
import pyx
import axis3d

pyx.text.set(mode="latex")
pyx.text.preamble(r"\usepackage{mathptmx}\AtBeginDocument{\sffamily}")

viewlist = (
    (310, 310),
    (350, 350),
    (50, 50),
    )

tlist = (33, 57)

modelid = "glob12-256x"
movieid = "tumble"

# size of images on page
imwidth = 10.0
imheight = imwidth/2
margin = 0.5
x, y = 0, 0

c = pyx.canvas.canvas()
for time in tlist:
    # Each time is a column
    for theta, phi in viewlist:
# Each view is a row
angid = theta/5.0
pngfile = "rgb-NHO-%(modelid)s-%(movieid)s-"\
"%(time)4.4i-%(angid)4.4i.png" % locals()
im = Image.open(pngfile)
bm = pyx.bitmap.bitmap(x, y, im, width=imwidth)
c.insert(bm)
ax = axis3d.axis3d(theta, phi, distance=200, figsize=0.5)
c.insert(ax, [pyx.trafo.translate(x + (imwidth - 2.0) - ax.ox, y + 1.0 - ax.oy)])

y += imheight + margin
    y = 0.0
    x += imwidth + margin

c.writePDFfile("paper-emview")


Something went wrong with that request. Please try again.