Você está na página 1de 17

!"#$% !''()(*+,-* "-.

( /-*012-3 26
aravlew for AcceleraLor vlsuallzauon
%+*+45(6
!"#$% !''()(*+,-* "-.( /-*012-3 27
Mode||ng and Mesh|ng w|th Cub|t



araV|ew full user documenLauon aL "#$%&&'''($)*)+,-'(.*/&
$)*)+,-'&"-0$&1.234-56)7.5("640

1) araV|ew Setup
2) arav|ew 8as|cs
- SLAC Loolbar
3} Advanced Ieatures |n araV|ew

78 %+*+45(6 9(,:3
! araV|ew ls an open source, mulu-plauorm appllcauon deslgned Lo
vlsuallze daLaseLs of varylng slzes.
! araV|ew ls bullL on exLenslble archlLecLure based on open
sLandards.
! araV|ew runs on Llnux, Mac and Wlndows.
! araV|ew can run on a slngle processor, or ln parallel.
! araV|ew ls bullL on Lhe vlsuallzauon 1oolklL (v1k).
Setup
! uownload araV|ew 3.10.1
unyurl.com/CeLaravlew
(www.paravlew.org/paravlew/resources/soware.hLml)
! lnsLall araV|ew
! Lnable SLAC 1oolbar
%+*+45(6
!"#$% !''()(*+,-* "-.( /-*012-3 28
araV|ew Layout



Menu 8ar
1oolbars
lpellne
8rowser
Cb[ecL
lnspecLor
3u vlew
an
Zoom
8oLaLe
Shl Scroll
Interacnon w|th 3D W|ndow



Zoom
8oLaLe
ln plane
normal mode AlLernaLe mode
%+*+45(6
!"#$% !''()(*+,-* "-.( /-*012-3 29
;8 %+*+45(6 <+15'1
SLAC 1oo|bar Setup



1o enable Lhe SLAC 1oolbar
-1ools -> Manage luglns
SelecL SLAC1ools
Cllck Load SelecLed
Cllck Lhe + nexL Lo SLAC 1ools
- Check Lhe box nexL Lo AuLo Load so Lhls plugln wlll
always load whenever aravlew ls run.

3
4
2
1
%+*+45(6
!"#$% !''()(*+,-* "-.( /-*012-3 30
WlLh AuLo Load enabled, Lhe SLAC 1oolbar wlll load every ume
aravlew ls run.
1
2
SLAC 1oo|bar: Load|ng Data



Cllck Lhe folder lcon ln Lhe SLAC 1oolbar
ln Lhe wlndow LhaL pops up, press Lhe . buuons Lo browse
for Lhe locauons of your ACL3:
Mesh le (whlch ls requlred)
lleld eld les from ume or frequency domaln (opuonal)
arucle les (also opuonal).
aravlew wlll Lhen load Lhe daLa, consLrucL a vlsuallzauon plpellne
for you, and, lf elds are loaded, show Lhe elecLrlc eld magnlLude.
8y defaulL, only Lhe mesh surface ls loaded. ?ou may wanL Lo load
volume daLa as well.
%+*+45(6
!"#$% !''()(*+,-* "-.( /-*012-3 31
SLAC 1oo|bar: Standard V|ew



1o posluon Lhe mesh on Lhe screen ln a canonlcal Z axls polnLs Lo
Lhe rlghL orlenLauon, press Lhe [1] buuon ln Lhe Loolbar. 1hls ls
also useful for gemng un-losL when Lhe mesh has accldenLally been
moved ouL of vlew.
1
2
1o change Lhe cenLer of roLauon, cllck Lhe lck CenLer [2] buuon
ln Lhe Loolbar, Lhen cllck on Lhe mesh where Lhe new cenLer of
roLauon should be.
SLAC 1oo|bar: Draw|ng Sty|es



laln
Surface
Surface
wlLh Ldges
Wlre fronL and
Surface back
%+*+45(6
!"#$% !''()(*+,-* "-.( /-*012-3 32
SLAC 1oo|bar: I|e|d Sca||ng



1he SLAC 1oolbar provldes Lwo buuons for rescallng elds. 1hey
rescale Lhe colors based on Lhe maxlmum eld magnlLude for:
[1] all loaded umesLeps
[2] Lhe currenL umesLep only
1 2
3
1he defaulL colormap can be edlLed by hlmng [3].
lor oLher colormaps (or Lo selecL Lhe ralnbow colormap lf lL
ls noL already Lhe defaulL, press Lhe Choose preseL buuon
and cllck on Lhe deslred map.
?ou may wanL Lo press make defaulL so LhaL oLher lLers
(e.g., arrows) wlll use Lhe same map.
1o nd Lhe mlnlmum and maxlmum eld values ln Lhe daLaseL
for Lhe currenL umesLep, press 8escale Lo uaLa 8ange.
%+*+45(6
!"#$% !''()(*+,-* "-.( /-*012-3 33
An|manon



lf elds have been loaded, Lhe e and b buuons wlll swlLch Lhe
eld colorlng Lo be Lhe e or b eld.
1hls only works for Lhe poruons of Lhe poruons of Lhe vlsuallzauon
plpellne whlch were seL up by Lhe SLAC 1oolbar. AnyLhlng
manually added vla Lhe Lradluonal lnLerface (e.g., cones, sllces) wlll
be unaecLed, and musL be changed by hand.
1o anlmaLe a mode (frequency domaln) or sequence of elds (ume
domaln), and/or parucles, use Lhe vC8 conLrols.
!ump Lo beglnnlng
8ack one umesLep
lay
lorward one umesLep
!ump Lo Lnd
Loop Anlmauon
SLAC 1oo|bar: L and 8 I|e|ds



1o see a llne ploL of eld magnlLudes along Lhe Z axls (x=0, ?=0),
press [1].
1hls ploL wlll auLomaucally change beLween e and b elds ln
response Lo Lhe [2] and [3] buuon presses.
SLAC 1oo|bar: L|ne |ot

1
2 3
%+*+45(6
!"#$% !''()(*+,-* "-.( /-*012-3 34
Arrows



! SelecL Lhe correspondlng surface
or volume from Lhe plpellne
browser.
! lllLer -> Alphabeucal -> glyph
lor vecLor chose your
deslred eld
SelecL Arrow and
press Apply
! 1hls may noL asslgn Lhe rlghL
colorlng Lo Lhe arrows, so cllck
Lhe ulsplay Lab, and Lhen color
wlLh eeld or beld.
! Lxerclse cauuon, because lL ls
posslble Lo mlx e and b elds ln a
slngle vlsuallzauon, whlch can be
confuslng when unlnLended or
unexpecLed. noLe LhaL Lhe e and
b buuons ln Lhe SLAC 1oolbar wlll
noL change Lhe eld used for
Lhese arrows, Lhls musL be done
by hand.
! 1o Loggle Lhe vlslblllLy of mesh
surfaces by ld
SelecL exLernal surface ln Lhe
plpellne browser
lLers -> alphabeucal ->
exLracL block
Check/uncheck Lhe blocks
llsLed
! Cur convenuon ls Lo have surface 6 as
Lhe exLernal meLal surface.
! ress Apply each ume a new
comblnauon of blocks ls selecLed, Lo
updaLe Lhe dlsplay.
Show|ng]n|d|ng Surfaces by ID

%+*+45(6
!"#$% !''()(*+,-* "-.( /-*012-3 3S
S||ce (Cutp|ane)



! lf parucles have been loaded, you can Loggle wheLher Lhey
dlsplay by presslng Lhe [1] buuon.
! 1o show parucle Lralls, go Lo:
lLer -> alphabeucal -> parucle paLhllnes
(1hls adds aLhllnes and arucles Lo Lhe plpellne
browser)
SeL Lhe arucle lu channel Lo global or local lus.
ress Apply
1he parucles and Lralls can be colored lndependenLly by
selecung Lhem ln Lhe plpellne browser, and speclfylng color,
or momenLum, or emlsslon Lype.
! 1o see whaL lles wlLhln a sllce Lhrough your mesh volume,
selecL Lnure volume ln Lhe plpellne browser
ress [1] (noL Lo be confused wlLh [2], whlch cllps away half
Lhe mesh Lo see lnslde Lhe oLher half)
Speclfy Lhe normal vecLor for Lhe plane (e.g., for a plane
perpendlcular Lo Lhe Z axls, use (0, 0, 1))
?ou can also speclfy LhaL Lhe plane cross Lhrough some polnL
oLher Lhan Lhe orlgln.
ress Apply
SLAC 1oo|bar: arnc|es
1
2
! 1o asslgn color Lo Lhe sllce,
selecL lL ln Lhe plpellne browser (lf noL already selecLed)
lrom Lhe pulldown menu selecL eeld or beld.
! noLe: remember Lo hlde Lhe oLher surfaces whlch may occlude
Lhe new surface (l.e., Lhe new sllce may be hldden |ns|de Lhe
dlsplayed mesh surface
1
%+*+45(6
!"#$% !''()(*+,-* "-.( /-*012-3 36
;8 !.=+>'(. ?(+,:*(1 5> %+*+45(6
Un|form Gr|d of Samp|es



! Load Lhe mesh and mode as usual, maklng sure LhaL "8ead lnLernal
volume" ls enabled.
! SeL up an approprlaLe mesh vlew.
o Plde Lhe LxLernal Surface and show Lhe Lnure volume (cllck
Lhe correspondlng eye lcons).
o SeL Lnure volume drawlng sLyle Lo Surface lf lL lsn'L already
(mlghL defaulL Lo CuLllne, whlch appears as a wlreframe box)
o SeL Lhe surface Lo dlsplay a eld you are lnLeresLed ln (so you
can know LhaL you wlll orlenL Lhe sampllng plane correcLly)
o SelecL "Lnure volume" so LhaL LexL ls hlghllghLed
%+*+45(6
!"#$% !''()(*+,-* "-.( /-*012-3 37
! CreaLe Lhe sampllng lLer
o CreaLe Lhe lLer: "lllLers -> Alphabeucal -> lane Clyphs". 1hls
wlll show a wlreframe boundlng box and a red ouLllne for Lhe
plane orlenLauon.
o osluon Lhe plane where you wanL lL. 1he mosL conslsLenL and
repeaLable way Lo do Lhls ls Lo puL values ln for "CenLer" and
"normal" whlch speclfy a polnL ln Lhe plane and Lhe plane's
normal vecLor, respecuvely. Change "8esoluuon" Lo 100, and
hlL "Apply.
Un|form Gr|d of Samp|es



%+*+45(6
!"#$% !''()(*+,-* "-.( /-*012-3 38
Un|form Gr|d of Cones



! CreaLe unlform Crld of Samples (prevlous example).
! 1hen selecL Lhe lane Clyph ln Lhe lpellne 8rowser
! Apply Lhe Clyph lLer
o "lllLers -> Alphabeucal -> Clyph" (or sklp Lhe menus and [usL hlL
Lhe glyph lcon)
o SeL vecLors Lo Lhe eld you wanL Lo show (defaulLs Lo eeld)
o SeL "Cyph 1ype" Lo "Cone"
o ueselecL "Masked olnLs"
o AccepL oLher defaulLs. PlL Lhe green "Apply" buuon. noLe: cones
wlll probably be Lhe wrong scale aL Lhls polnL.
o Scale Lhe cones by checklng "LdlL", and ad[usL Lhe scale facLor
(usually down by an order of magnlLude or so).
o 8emember Lo hlL "Apply" each ume aer ad[usung Lhe scale
value.
o lf, ln Lhe lpellne 8rowser, Lhe laneClyphs was noL
auLomaucally hldden when Clyphs was creaLed, hlde lL.
%+*+45(6
!"#$% !''()(*+,-* "-.( /-*012-3 39
Un|form Gr|d of Cones



! llnlshlng Louches
o 1he cones Lend Lo look beuer when Lhey are sklnnler. 1ry
semng radlus Lo roughly 0.2
o lf Lhe vlsuallzauon resulLs are Lo be publlshed or shown Lo
oLhers, Lhe cones look much beuer aL resoluuon 12 Lo 18 or
so.
Lxpornng Samp|ed Data



! Save Lhe daLa
o Make sure LhaL only Lhe re-sample lLer ls acuve and vlslble
ln Lhe lpellne 8rowser, Lhen
o "llle -> Save uaLa", Lype ln a le name, seL "llles of 1ype" Lo
be "CSv" (Comma SeparaLed values) whlch ls readable by
spreadsheeLs and MaLlab. PlL "Ck".
o lor "Congure WrlLer", you probably don'L wanL Lo WrlLe All
1lme SLeps. And "lleld Assoclauon" should be "olnLs".
o PlL "Ck". (1he le should be wrluen Lo Lhe same dlrecLory
from whlch you orlglnally ran aravlew, unless you
navlgaLed elsewhere.)
%+*+45(6
!"#$% !''()(*+,-* "-.( /-*012-3 40
Symmetry



! Cen, Lhere ls symmeLry ln our model. 1o show Lhe whole model,
we use aravlews reecuon lLer.
! L elds reecL wlLh no dlmculLy.
! 8 elds musL be reversed (scaled by -1)
! SLarL wlLh a x model
! CreaLe a calculaLor lLer Lo creaLe a reversed b eld.
o Cllck Lhe calculaLor lcon
o SeL 8esulL array name Lo beld_neg
o ln Lhe blank expresslon box, enLer -beld
o Cllck Apply
! 1he remalnder ls easy Lo undersLand, buL Ledlous Lo seL up.
8ename your lLers as follows Lo make lL easler Lo keep Lrack of
whaLs golng on
o CalculaLor -> CuadranL 0, uslng beld
o 8eecuon x -> CuardanL 1, uslng -beld
o 8eecuon ? -> CuadranL 3, uslng -beld
o 8eecuon x and Lhen ? -> CuadranL 2 uslng beld.
! When dolng reecuons,
o uncheck Copy lnpuL,
o and always use x or ? (noL x mln or ? mln)
! Apply Lhe cone glyph lLer Lo each quadranL, one aL a ume,
maklng sure LhaL quadranLs 0 and 2 are beld, and 1 and 3 are -
beld.
%+*+45(6
!"#$% !''()(*+,-* "-.( /-*012-3 41
Sav|ng An|manons



! Savlng anlmauons ls sLralghL forward: llle -> Save Anlmauon
! 8uL Lhere are conslderauons for maklng beuer movles
o Conslder Lhe resoluuon of Lhe dlsplay on whlch your movle
wlll play
o ?ou can anu-allas by savlng overslzed frames, and Lhen down-
sampllng wlLh converL -geomeLry 30 blg_frame.png
anuallased_frame.png
o Anuallaslng resulLs ln Lhlnner subplxel llnes.
o keep overslze facLor aL 2 or 3. More Lhan LhaL resulLs llnes
Loo Lhln Lo see.
o 1esL your anlmauon frames Lo be sure Lhe vlew ls correcL.
aravlew 3.10 and earller wlll zoom ln a blL.
o lLs almosL unheard of Lo make a movle only once. use Save
SLaLe so you can come back laLer and Lweak Lhlngs.
o ln Lhe Anlmauon vlew, you can seL Lhe number of umesLeps.
o Save your lmages as .png (lossless compresslon). !pg ls nlce
for phoLographs, buL Lerrlble for compuLer generaLed lmages.
o ?our besL encodlng wlll be P.264 done wlLh Apple Culckume
ro 7. CLher lmplemenLauons are elLher noL porLable, or
lower quallLy.
o Conslder Lhe frame raLe aL whlch you wanL Lo play. 30 lS ls
nlce, buL can be a loL of daLa. 13 lS or lower can look [erky.
o Save your masLer frames ln case you need Lhem laLer for a
dlerenL resoluuon
o Conslder pyLhon scrlpung for semng up your movles.
%+*+45(6
!"#$% !''()(*+,-* "-.( /-*012-3 42
ython scr|pt S|mp|eAn|manon.py



#!/bln/pvbaLch

# bollerplaLe
Lry: paravlew.slmple
excepL: from paravlew.slmple lmporL *
paravlew.slmple._ulsablellrsL8enderCamera8eseL()

# Load Lhe mesh
mesh = SLACuaLa8eader('./mesh.ncdf')

# Load Lhe elds
lmporL glob
modelllenames = glob.glob('./Cu1u1/*.mod').sorL()
mesh.Modelllename = modelllenames

# seL up Lhe camera
vlew = CeL8endervlew()
vlew.Cameraosluon = [ 0.6781, 0.2774, -0.408]
vlew.CameralocalolnL = [-0.2166, -0.002, 0.3672]
vlew.Cameravlewup = [0.0, 1.0, 0.0]
vlew.8ackground = [1, 1, 1] # whlLe background

# SeL up color scallng
a3_eeld_lecewlseluncuon = CreaLelecewlseluncuon()
a3_eeld_vLookup1able = CeLLookup1ablelorArray( "eeld", 3 )
a3_eeld_vLookup1able.8C8olnLs = [0.0, 0.0, 0.0, 1.0, 3.e13, 1.0, 0.0, 0.0]

# selecL Lhe maln surface
surface= LxLracL8lock(mesh, 8locklndlces=[6])

# creaLe cuLaway surface
cuLaway = Cllp(Cllp1ype="lane",
Crlgln = [-0.023, 0.0, 0.701])

# creaLe daLa represenLauon (so we can see someLhlng)
u8_surface = Show(cuLaway)
u8_surface.8epresenLauon = 'Surface'
u8_surface.ColorArrayname = 'eeld'
u8_surface.Lookup1able = a3_eeld_vLookup1able
u8_surface.ScalarCpaclLyluncuon = a3_eeld_lecewlseluncuon

# save ouL movle frames for umesLeps
lf __name__ == "__maln__":
vlew.vlewSlze = [1600, 1200]

for l ln range(0, len(mesh.1lmesLepvalues)):
vlew.vlew1lme = mesh.1lmesLepvalues[l]

ouLlllename = 's.png' modelllenames[l]
WrlLelmage(ouLlllename)





%+*+45(6

Você também pode gostar