diff --git a/Doc/PhysRef/fig/drawing/detector1.pdf b/Doc/PhysRef/fig/drawing/detector1.pdf new file mode 100644 index 0000000000000000000000000000000000000000..2a4df7ca028e80fadb961fb78a4c31615bd37342 Binary files /dev/null and b/Doc/PhysRef/fig/drawing/detector1.pdf differ diff --git a/Doc/PhysRef/fig/drawing/detector1.ps b/Doc/PhysRef/fig/drawing/detector1.ps new file mode 100644 index 0000000000000000000000000000000000000000..6f9fe9b8ee548e67ee29e95ecbfcf718b65f4288 --- /dev/null +++ b/Doc/PhysRef/fig/drawing/detector1.ps @@ -0,0 +1,1795 @@ +%!PS-Adobe-1.0 EPSF-1.0 +%%BoundingBox: 2 362 593 839 +%%Comment: Bounding box extracted by bboxx +%%+: A program by Dov Grobgeld 2003 + +newpath +2 362 moveto +593 362 lineto +593 839 lineto +2 839 lineto +closepath +1 1 1 setrgbcolor % Set color to white +fill % Fill the path with white color + +%%Comment: Bounding box extracted by bboxx +%%+: A program by Dov Grobgeld 2003 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% FRIDA: fast reliable interactive data analysis %% +%% wups11a.ps: graphic macros %% +%% (C) Joachim Wuttke 1990-2011 %% +%% http://www.messen-und-deuten.de/frida %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%% Sections: +% - Programming, Page Formatting, Coordinate Transforms +% - Colors +% - Fonts and Text Blocks +% - Coordinate Frame +% - Data Plotting (Symbols and Curves) +% - Lists +% - Macro Collection + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Programming, Page Formatting, Coordinate Transforms %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + +%% Framework: + +% For interleaving applications, isolate what follows in a dictionary +/WuGdict11a 400 dict def +WuGdict11a begin + + +%% Shortcuts: + +/np { newpath } bind def +/mv { moveto } bind def +/rm { rmoveto } bind def +/rl { rlineto } bind def +/li { lineto } bind def +/cp { closepath } bind def +/st { stroke } bind def +/x { exch } bind def + +/black { 0 setgray } bind def +/white { 1 setgray } bind def + +/F false def +/T true def + + +%% Constants: + +/pt { .018567 mul} bind def % for line widths and font sizes, reason unclear +/cm {28.346456 mul} bind def % typographic_point -> cm + +/twopi { 6.2831853072 } def + + +%% Math operators: + +/rnd { rand cvr 1 30 bitshift div 2 div 0 max 1 min } def % -> between 0 and 1 + +/min { 2 copy gt { x } if pop } def +/max { 2 copy lt { x } if pop } def + +/tan { dup sin x cos div } def +/cot { dup cos x sin div } def +/pol2xy{ 2 copy cos mul 3 1 roll sin mul } def % r phi | x y + +/eexp { 2.71828 x exp } def % "exp" is x^y, eexp is e^x +/tanh { 2.71828 x 2 copy exp 3 1 roll neg exp + 2 copy sub 3 1 roll add div } def + + +%% Page layout and global figure size: + +% shift origin +% The PostScript coordinate system starts in the lower left corner +% of the page, whereas we want our figures to be justified in the +% upper left corner. Therefore we need a vertical translation, +% depending on the paper size. A4 is 210x297 mm^2. By this occasion, +% we also provide a border of 7 mm. +/cmtranslate { % x y cmtranslate | - + cm x cm x translate } bind def +/originUpperLeft_A4{ .7 28.3 cmtranslate } bind def +/goffsetA4 { ungscale originUpperLeft_A4 gscale } def +/EdgeLeftDIN{ originUpperLeft_A4 } bind def % OBSOLETE since 11a + +% set absolute global scale and relative symbol size +/defsiz { % size(cm) symbolsize(rel) | - + /ftot x def + /gsiz x cm 10 div def + gscale % within 'size', coordinates run from 0 to 10 + } def +/gscale { + gsiz dup scale +} def +/ungscale { + 1 gsiz div dup scale +} def + +% symbol (and label?) size as sublinear function of figure size +/autolabel { % size(cm) | symbolsize(rel) + dup 7 div 2 add 4 mul % the simplest sublinear increase + x div % anticipate overall rescaling + } def + + +%% Frame size and shape, frame coordinates: + +% aspect ratios +/gyld {0.447214 mul} bind def /Gyld {0.447214 div} bind def % sqrt(5) +/guld {0.547723 mul} bind def /Guld {0.547723 div} bind def % sqrt(3) +/gold {0.618034 mul} bind def /Gold {0.618034 div} bind def % goldener Schnitt +/gild {0.707107 mul} bind def /Gild {0.707107 div} bind def % sqrt(2) : DIN +/geld {0.759836 mul} bind def /Geld {0.759836 div} bind def % sqrt(sqrt(3)) +/gald {0.817765 mul} bind def /Gald {0.817765 div} bind def % sqrt sqrt sqrt 5 + +% define frame coordinates +/defred { % x_reduction y_reduction label_reduction | - + /fmm x ftot mul def + /ymm x def + /xmm x def + + % conversion frame_coordinate -> global_coord + /xm {xmm mul} bind def + /ym {ymm mul} bind def + /fm {fmm mul} bind def + /xym {ym x xm x} bind def + + % prefer rescaling over explicit conversion (make more use of this !) + /mmscale { xmm ymm scale } bind def + /mmunscale { 1 xmm div 1 ymm div scale } bind def + + % graphic commands in frame coordinates + /offset { xym translate } bind def + /currentxy { currentpoint ymm div x xmm div x } bind def + /setline { pt fm setlinewidth [] 0 setdash } bind def + } def + +/stdred { % x_reduction y_reduction | - + 2 copy mul sqrt defred + } def + +%% World (= user application) coordinates: + +% user must declare x and y range +/xSetCoord { % log min max | - + /wxmax x def + /wxmin x def + /wxlog x 0 eq not def + % prepare conversion world coord -> frame coord + /wxdel wxmax wxmin wxlog { div log } { sub } ifelse def + /wxd { % dx(world) | dx(frame) + wxlog { log } if wxdel div 10 mul + } bind def + /wx { % x(world) | x(frame) + wxmin wxlog { div } { sub } ifelse + wxd + } bind def + } def +/ySetCoord { % log min max | - + /wymax x def + /wymin x def + /wylog x 0 eq not def + /wydel wymax wymin wylog { div log } { sub } ifelse def + /wyd { % dy(world) | dy(frame) + wylog { log } if wydel div 10 mul + } bind def + /wy { % y(world) | y(frame) + wymin wylog { div } { sub } ifelse + wyd + } bind def + } def + +% pair conversion +/wxy { % x,y(world) -> x,y(frame) + wy x wx x + } def + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Colors %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + +%% Color operators: + +/setRGBcolor { + 3 { 255 div 3 1 roll } repeat setrgbcolor + } def + +/colormix { % weight(0..1) col1(R|G|B) col2(R|G|B) | col(R|G|B) + 7 -1 roll dup /weightA x def /weightB x 1 x sub def + 4 -1 roll weightA mul x weightB mul add 5 1 roll + 3 -1 roll weightA mul x weightB mul add 4 1 roll + 2 -1 roll weightA mul x weightB mul add 3 1 roll + } def + +/relcol { % i_col n_col | rel(0..1) : for one-dimensional choices + 1 sub div 0 max 1 min + } def + + +%% Named colors: + +/siemensorange { 255 153 0 setRGBcolor } bind def +/siemensblue { 0 102 153 setRGBcolor } bind def +/siemenstext { 0 51 102 setRGBcolor } bind def +/siemensred { 165 0 33 setRGBcolor } bind def +/siemenspink { 221 102 102 setRGBcolor } bind def +/siemensgrey { 221 221 221 setRGBcolor } bind def +/siemensdark { 102 102 102 setRGBcolor } bind def +/siemensgreen { 33 153 102 setRGBcolor } bind def +/siemensyellow { 255 221 0 setRGBcolor } bind def + +/red { 255 0 0 setRGBcolor } bind def + + +%% One-dimensional linear color choices: + +/iCol1 { % i i_max | - : default -2010, round the circle, RGBR + relcol dup 1 x % rel 1 rel + 360 mul 255 add cos 1 add dup mul neg .053 mul 1 add % modulate saturation + sethsbcolor + } def +/iCol2 { % i i_max | - : cyan - yellow - magenta + relcol 3 mul + dup 1 le { + dup 1 sub neg 0 3 2 roll } { + dup 2 le { + 1 sub dup 1 sub neg 0 3 1 roll } { + 2 sub dup 1 sub neg 0 3 0 roll } ifelse + } ifelse + 0 setcmykcolor + } def +/iCol3 { % i i_max | - : siemens + div /icnow x def + 165 1 icnow sub mul + 102 icnow mul + 33 120 icnow mul add setRGBcolor + } def +/iCol4 { % i i_max | - : red to blue (subsequence of old scheme iCol1) + relcol + 3 x sub 3 div 1 iCol1 + } def + + +%% One-dimensional color choice from given array: + +/iColA { % i i_max arr | - + /aCol x def + relcol + aCol length 1 sub mul % position within array + dup cvi dup 3 1 roll % idx pos idx + sub x % offset idx + 0 max aCol length 1 sub min % offset safe_idx + dup 1 add aCol length 1 sub min % offset i i+1 + aCol x get exec + 4 3 roll aCol x get exec colormix setRGBcolor + } def + + +%% Color arrays for non-linear one-dimensional choices: + +/aCol1 [ % red-blue + { 255 0 0 } % 1 + { 240 10 10 } % 2 + { 220 40 40 } % 3 + { 205 65 90 } % 4 + { 195 80 130 } % 5 + { 180 110 180 } % 6 + { 165 120 185 } % 7 + { 150 130 190 } % 8 + { 130 150 210 } % 9 + { 110 125 220 } % 10 + { 85 105 230 } % 11 + { 70 90 255 } % 12 + { 0 0 255 } % 13 + ] def +/aCol2 [ % orange-red-blue-darkblue + { 255 180 0 } % 1 + { 255 160 0 } % 1 + { 255 120 0 } % 2 + { 255 70 0 } % 3 + { 255 0 0 } % 4 + { 220 30 30 } % 5 + { 220 70 60 } % 6 + { 220 100 110 } % 7 + { 200 130 130 } % 8 + { 200 130 160 } % 9 + { 180 110 180 } % 10 + { 165 110 185 } % 11 + { 150 130 190 } % 12 + { 130 150 210 } % 13 + { 100 120 220 } % 14 + { 85 105 230 } % 15 + { 70 90 255 } % 16 + { 0 0 255 } % 17 + { 0 0 180 } % 18 + { 10 10 150 } % 19 + { 30 30 130 } % 20 + ] def +/aCol3 [ % siemenscolors + { 165 0 33 } % siemensred + { 33 153 102 } % siemensgreen + { 0 102 153 } % siemensblue + { 0 51 102 } % siemenstext + { 255 153 0 } % siemensorange + { 102 102 102 } % siemensdark + { 255 221 0 } % siemensyellow + { 221 221 221 } % siemensgrey + { 221 102 102 } % siemenspink + ] def +/aCol4 [ % green-blue-brown + { 120 160 60 } + { 90 185 40 } + { 50 215 20 } + { 0 245 0 } + { 10 235 112 } + { 20 235 143 } + { 30 230 173 } + { 40 225 194 } + { 50 205 215 } + { 40 153 204 } + { 40 102 153 } + { 40 82 122 } + { 90 74 101 } + { 140 68 80 } + { 170 59 60 } + { 190 50 40 } + { 180 65 40 } + { 160 80 40 } + { 140 100 40 } + { 120 80 30 } + { 100 60 20 } + ] def +/aCol5 [ % gnuplot default (see man gnuplot and rgb.txt) + { 255 0 0 } % red + { 0 255 0 } % green + { 0 0 255 } % blue + { 255 0 255 } % magenta + { 0 255 255 } % cyan + { 160 82 45 } % sienna + { 255 165 0 } % orange + { 255 127 80 } % coral + ] def + + +%% Specialized ifelse, depending on pcol / ccol - OBSOLETE since 11a: + +/ifpcol { % proc1 proc2 | - + pcol 0 eq { pop exec } { exec pop} ifelse % 3 1 roll ifelse + } def +/ifccol { % proc1 proc2 | - + ccol 0 eq { pop exec } { exec pop} ifelse % 3 1 roll ifelse + } def + + +%% old-style colors round the circle - OBSOLETE since 10a: + +% global preset +/pColSet { % col ncol | - + /npcol x def % # different colours + /pcol x def % colours off/on + } def +/cColSet { % col ncol | - + /nccol x def % # different colours + /ccol x def % colours off/on + } def +% default setting +0 3 pColSet % default setting +0 3 cColSet % default setting +% now defined locally in g3.ps +/ipCol { 100 iCol1 } def +/icCol { 100 iCol1 } def + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Fonts and Text Blocks %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + +%% Prepare standard fonts: + +% extend font encoding +/ReEncode { % OldFont NewFont Encoding | - + /MyEncoding x def + x findfont % select OldFont + dup length dict begin + {def} forall + /Encoding MyEncoding def + currentdict + end + definefont % define as NewFont + } def + +% we assume that image scripts are Latin1 encoded +/Helvetica /MyFont ISOLatin1Encoding ReEncode + + +%% Preset standard styles: + +% scale and set font; define fontsize, fontheight +/setfontandsize { % font size | - + dup 0 le { pop 100 } if % fontsize <= 0 not allowed ! + /fontnonnil true def + pt fm dup /fontsize x def + x findfont + x scalefont + setfont + gsave % determine fontheight - from the cookbook : + np 0 0 mv (1) true charpath flattenpath + pathbbox % low_left_x, low_left_y, up_right_x, up_right_y + x pop x pop x pop + /fontheight x def + grestore + } def + +% standard settings for labelling axes +/setnum { /MyFont 24 setfontandsize } def +/setlab { /MyFont 24 setfontandsize } def + +% user commands (free choice of fontsize, but fixed font family) +/setown { /MyFont x setfontandsize } def + + +%% String treatment: + +/showif { % string | - : increment xwidth or plot string + prepare + { stringwidth pop xwidth add /xwidth x def } + { show } + ifelse + } def +/script { % matrix relpos_y | - + /yoffset x fontheight mul def + currentfont x makefont setfont + .04 yoffset rm % patched ! + } def +/scred .71 def +/subsc { + showif + [scred 0 0 scred 0 0] -.2 script + } def +/supsc { + showif + [scred 0 0 scred 0 0] .6 script + } def +/endsc { + showif + regularfont setfont + 0 yoffset neg rm + } def +/grec { + showif + /Symbol findfont fontsize scalefont setfont + } def +/endgr { + showif + regularfont setfont + } def +/endall { + showif + regularfont setfont + } def +/build { % string xrel yrel obj | - : plot obj above/below string + /obj x def /yrelbui x def /xrelbui x def + dup showif + prepare + { pop } + { stringwidth pop xrelbui neg mul fontheight yrelbui mul % relpos for obj + currentpoint 4 2 roll % save position after string + rm obj pop % obj must end with () that will be pop'ed + mv % back to saved position + } + ifelse + } def +/gbuild { % string xrel yrel obj | - : plot obj above/below string + /obj x def /yrelbui x def /xrelbui x def + /Symbol findfont fontsize scalefont setfont + dup showif + prepare + { pop regularfont setfont } + { stringwidth pop xrelbui neg mul fontheight yrelbui mul % relpos for obj + currentpoint 4 2 roll % save position after string + regularfont setfont + rm obj pop % obj must end with () that will be pop'ed + mv % back to saved position + } + ifelse + } def +/hut { % ..) (<Char>) hut (.. %%% MISERABEL PROGRAMMIERT + x showif + 1.4 .6 {(\136) show ()} build + } def +/ghut { % ..) (<grec-Char>) ghut (.. %%% BREITE PASST NUR FUER Phi(t) + x showif + .8 .65 {(\136) show ()} gbuild + } def +/tilde { + x showif + 1. .6 {(~) show ()} build + } def +/gtilde { + x showif + 1. .6 {(~) show ()} gbuild + } def +/spce { % string n spce - ; insert n times ( ) + {showif ( )} repeat + } def + +% the following macros use the symbol/curve plotting mechanism +/pins { % string symins - ; symbol must be selected by pset + showif + ( ) showif ( ) .5 .5 { currentxy 0 p black ()} build ( ) showif + } def +/clenins { % string len clenins - ; curve must be selected by cset + x showif % I suppose that pins is preceeded by 8 spaces + dup ( ) stringwidth pop mul 2 add /xstrich x xmm div def + % length of inserted curve : + % -1 space : curve begins and ends in middle of ( ) + % +3 spaces: pins requires 3 times ( ) + ( ) 0 .5 { currentxy currentxy 0 ci x xstrich add x 0 cf () } build + 2 add {( ) showif} repeat + } def +/cins { % string symins - ; curve must be selected by cset + showif 8 % I suppose that pins is preceeded by 8 spaces + dup ( ) stringwidth pop mul 2 add /xstrich x xmm div 10 div def + % nov03, ohne zu verstehen, "10 div" eingefuegt + % length of inserted curve : + % -1 space : curve begins and ends in middle of ( ) + % +3 spaces: pins requires 3 times ( ) + ( ) 0 .5 { currentxy currentxy 0 ci x xstrich add x 0 cf () } build + 2 add {( ) showif} repeat + } def + +/block { % x y ob xrel yrel | - + /yrel x def /xrel x def /blabla x def + /ypos x ym def /xpos x xm def + /regularfont currentfont def /yoffset 0 def % initialize for security + /prepare true def /xwidth 0 def 0 0 mv % to prevent empty-path-error + blabla endall % first pass : determine xwidth + boxif { /boxwidth xwidth (M) stringwidth pop boxxr mul 2 mul add def + /boxheight fontheight 1 boxyr 2 mul add mul def + np xpos xwidth xrel mul sub boxwidth xwidth sub 2 div sub + ypos fontheight .5 boxyr add mul sub mv + boxwidth 0 rl 0 boxheight rl boxwidth neg 0 rl cp + boxproc + } if + xpos xwidth xrel mul sub ypos fontheight yrel mul sub mv + /prepare false def + blabla endall % second pass : plot + /boxif false def + } def +/rblock { % x y ang ob proc rblock - + 5 3 roll + gsave + xym translate + 3 2 roll rotate + 0 0 4 2 roll exec + grestore + } def + +/Box { % x y {exe} + /boxif true def + /boxproc x def /boxyr x def /boxxr x def + } def +/nBox { .6 .6 3 2 roll Box } def +/boxif false def +/textW { % obj | length : calculate only length. + /blabla x def + /regularfont currentfont def /yoffset 0 def % initialize for security + /prepare true def /xwidth 0 def 0 0 mv % to prevent empty-path-error + blabla endall + xwidth % has been determined + } def +/textw { % obj textW y : dito, in 0..10-units + textW xmm div + } def + +% horizontal text: x y ob | - +/textLB { 0. 0. block } bind def +/textCB { .5 0. block } bind def +/textRB { 1. 0. block } bind def +/textLM { 0. .5 block } bind def +/textCM { .5 .5 block } bind def +/textRM { 1. .5 block } bind def +/textLT { 0. 1. block } bind def +/textCT { .5 1. block } bind def +/textRT { 1. 1. block } bind def + +% rotated text: x y ang ob | - +/rtextLB { {textLB} rblock } bind def +/rtextLM { {textLM} rblock } bind def +/rtextRB { {textRB} rblock } bind def +/rtextRM { {textRM} rblock } bind def +/rtextCM { {textCM} rblock } bind def + + +%% Language selection: + +% preset +/language { % choose_this of_so_many | - % select current language + /langMax x def + /langChc x def + } def +1 1 language % default +% choose text from sequence +/langSel { % text_1 .. text_M | text_C : choose text, M=langMax, C=langChc + langMax dup langChc sub 1 add roll + langMax 1 sub { pop } repeat + } def + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Coordinate Frame %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + +%% Layout presets: + +/xyTicLen {0.10 fm} def +/xyTacLen {0.20 fm} def +/txllen {0.20 fm} def +/tyllen {0.20 fm} def +/linsetAxx {black 0.7 setline} def +/linsetTic {black 0.7 setline} def +/linsetTac {black 0.7 setline} def +/linsetGri {black 0.4 setline} def + +%% Start-up commands: + +/Resets { + /yNumLengthL 0 def /yNumLengthH 0 def + /xNumHeightL .3 def /xNumHeightH 0 def + /xNumHeightRel 2.4 def + /aMean 5 def + /xPlotFrame {} def + /yPlotFrame {} def + /zPlotFrame {} def + black + } def +/BoxBackground { + 0 0 10 10 boxit gsave setboxbackgroundcolor fill grestore +} def +/setboxbackgroundcolor { white } def + + +%% Some more presets for g3.ps: + +/iFrame 0 def + +/setnewpage { % xoff yoff + /yoffnewpage x def + /xoffnewpage x def +} def +/newpage { + goffsetA4 + xoffnewpage yoffnewpage offset +} def +/setpagegrid { % ncol nrow xoffnewframe yoffnewframe + /yoffnewframe x def + /xoffnewframe x def + /nrowpage x def + /ncolpage x def +} def +/nextFrame { + /iFrame iFrame 1 add def + iFrame nrowpage ncolpage mul mod 0 eq { + showpage gscale newpage + } { + iFrame ncolpage mod 0 eq { + xoffnewframe ncolpage 1 sub neg mul yoffnewframe offset + } { + xoffnewframe 0 offset + } ifelse + } ifelse +} def + + +/zValues { pop pop } def +/plotafter {} def +/whiteframe { 1 0 0 10 10 graybox } def +/plotframes { xPlotFrame yPlotFrame } def +/plotbefore { plotframes } def + +/abc {abclab setown abcx abcy 3 2 roll textCM} def % usage ((a)) abc +/abcset { % x y siz abcset - : preset for abc + /abclab x def /abcy x def /abcx x def + } def + + +%% Ticks: + +% set tick array - internal macros +/tiputs { % rel_pos_of_tick | pos_of_tick : innermost routine for /taproc + tastep mul taloop add + } def +/taproclin { % (#tick/tack) | - : define /taproc for use in SetVec + 1 x div /tistep x def + /taproc { 0 tistep .999 { tiputs } for } def + } def +/taproclog { % (#ticks/tacks) | - : define /taproc for use in SetVec + dup 3 gt { pop /taproc { 1 1 9 { log tiputs } for } def + }{ dup 1 gt { pop /taproc { 0 tiputs 2 log tiputs 5 log tiputs } def + }{ dup 0 gt { pop /taproc { 0 tiputs } def + }{ neg taproclin + } ifelse } ifelse } ifelse + } def +/SetVec { % tafro tatoo nta /vector | - : set /vector + 4 1 roll + /nta x def /tatoo x def /tafro x def + /tastep tatoo tafro sub nta 1 sub div def + [ + 0 1 nta { + tastep mul tafro add /taloop x def + taproc exec + } for + ] def + } def +% set tick array - user commands +/SetTicVecLin { taproclin /TicVec SetVec } def +/SetTicVecLog { taproclog /TicVec SetVec } def + +% set tack-and-number array +/SetTacVec { % [ pos {label} pos {label} ... ] | - + /TacVec x def + } def + +% define axes + % note on angles : 0 = x-axis, 90 = y-axis +/OneAxx { % fro to xpos ypos aang tang | - : presets for Axx, Tic, Tac, Num + % store arguments + /tAng x def /aAng x def + /yPos x def /xPos x def + /aTo x def /aFro x def + % set constants + /xTicLen tAng cos xyTicLen mul def /yTicLen tAng sin xyTicLen mul def + /xTacLen tAng cos xyTacLen mul def /yTacLen tAng sin xyTacLen mul def + /xAng aAng cos def /yAng aAng sin def + /aMean aFro aTo add 2 div def + /aArr false def + } def +/ArrAxx { % label <args of OneAxx> | - : axis with arrow + OneAxx + /aLab x def + /aArr true def + } def + +% draw axis (with parameters preset by OneAxx or ArrAxx) +/Axx { % - | - + linsetAxx + gsave + xPos yPos offset + mmscale + aAng rotate + % draw a line + aFro 0 np mv + aTo 0 li st + % draw an arrow and a label, if requested + aArr { + gsave + aTo 0 offset + aAng neg rotate + mmunscale + aAng rotate + 0 0 0 .3 pfeilspitze % draw an arrow + .3 0 offset + aAng neg rotate + setlab + aAng 45 le + { 0 -.8 xNumHeightL sub aLab textRT } + { 0 .2 aLab textCB } + ifelse + grestore + } if + grestore + } def + +% draw ticks (positions given by SetTicVec, parameters preset by OneAxx/..) +/Tic { % - | - : draw tick as defined in TicProc + linsetTic + TicVec { + dup dup aFro lt x aTo gt or {pop} {TicProc} ifelse + } forall + } def +/TicProc { % aPos | - : default procedure to plot one tick + np + xPos yPos xym mv + dup xAng mul x yAng mul xym rm % eat argument, go to start pos. + xTicLen yTicLen rl st + } def +/xGric { % yFro yTo | - : draw a grid line (instead of an x tick) + linsetGri + TicVec { + 3 copy dup 5 -1 roll aFro lt x aTo gt or {pop pop pop} { + dup % y1 y2 x x + 4 -1 roll xym np mv % y2 x + x xym li st + } ifelse + } forall + pop pop + } def +/yGric { % xFro xTo | - : draw a grid line (instead of an y tick) + linsetGri + TicVec { + 3 copy dup 5 -1 roll aFro lt x aTo gt or {pop pop pop} { + dup % x1 x2 y y + 4 -1 roll x xym np mv % x2 y + xym li st + } ifelse + } forall + pop pop + } def + +% draw tacks (positions given by SetTacVec, parameters preset by OneAxx/..) +/TacExe { % Proc | - % Execute Proc for all pairs of elements of TacVec + % (but only if inside aFro..aTo) + /TacProc x def + /ispair true def % toggle: take pos, take label, take pos, take label ... + TacVec { + ispair + { + /aPos x def + /ispair false def + } { + aPos dup aFro lt x aTo gt or + {pop} {TacProc} ifelse + /ispair true def + } ifelse + } forall + } def +/Tac { + linsetTac + { pop xPos yPos xym mv + aPos dup xAng mul x yAng mul xym rm + xTacLen yTacLen rl st + } TacExe + } def +% unnecessary optimisation by specialisation: OBSOLETE since 11a +/xTacL { Tac } def +/xTacH { Tac } def +/yTacL { Tac } def +/yTacH { Tac } def +% special tack routines, only for rectangular axes +/xTacC { % : centered tack on x axis + linsetTac + { pop aPos xm yPos ym txllen 2 div sub np mv 0 txllen rl st } TacExe + } def +/xGrid { % : rule instead of tack on x axis + linsetTac + { pop aPos xm np yPos ym mv 0 10 xym rl st } TacExe + } def +/yTacC { % : centered tack on y axis + linsetTac + { pop xPos xm tyllen 2 div sub aPos ym np mv tyllen 0 rl st } TacExe + } def +/yGrid { % : rule instead of tack on low y axis + linsetTac + { pop aPos ym np xPos xm x mv 10 0 xym rl st } TacExe + } def + +% draw numbers (pos-txt pairs given by SetTacVec) +/Num { % Generic but useless. Adjust for your application. + setnum + fontheight ymm div yDisRel mul tAng sin mul /yDist x def + { dup textW xDisRel mul tAng cos mul /xDist x def + xPos aPos xAng mul add xDist sub + yPos aPos yAng mul add yDist sub 3 2 roll textCM } TacExe + } def +/setnumDisRel { % xDisRel yDisRel | - : adjust just a little bit + /yDisRel x def /xDisRel x def + } def +1.2 1.2 setnumDisRel % default setting +% explicit Num routines for rectangular case +/xNumL { % : numbers on low x axis + setnum + { fontheight ymm div % conversion -> user_scale + dup /xNumHeightL x def + -.6 mul yPos add aPos x 3 2 roll textCT } TacExe + } def +/xNumH { % : numbers on high x axis + setnum + { fontheight ymm div % conversion -> user_scale + dup /xNumHeightH x def + .6 mul yPos add aPos x 3 2 roll textCB } TacExe + } def +/yNumL { % : numbers on low y axis + setnum + { fontsize -.3 mul xmm div xPos add aPos 3 2 roll textRM + xwidth dup yNumLengthL gt {/yNumLengthL x def} {pop} ifelse + } TacExe + } def +/yNumLD { % : calculate only yNumLength (used for adjustement) + setnum + { textW dup yNumLengthL gt {/yNumLengthL x def} {pop} ifelse + } TacExe + } def +/yDumL { % {(..)} yDumL : compare yNumLength with one arg (used for adjustement) + setnum + textW dup yNumLengthL gt {/yNumLengthL x def} {pop} ifelse + } def +/yNumH { % : numbers on high y axis + setnum + { fontsize .3 mul xmm div xPos add aPos 3 2 roll textLM + xwidth dup yNumLengthH gt {/yNumLengthH x def} {pop} ifelse + } TacExe + } def +/yNumHD { % : calculate only yNumLength (used for adjustement) + setnum + {textW dup yNumLengthH gt {/yNumLengthH x def} {pop} ifelse + } TacExe + } def +/yDumH { % {(..)} yDumH : compare yNumLength with one arg (used for adjustement) + setnum + textW dup yNumLengthH gt {/yNumLengthH x def} {pop} ifelse + } def + +% draw labels +/xCL { % xlabel | - ; plots coordinate name below the x-axis. + setlab + aMean xNumHeightL xNumHeightRel neg mul + 3 -1 roll textCT + } def +/xCH { % xlabel | - ; plots coordinate name above the x-axis. + setlab + aMean xNumHeightH xNumHeightRel mul 10 add + 3 -1 roll textCB + } def +/yCL { % ylabel | - ; plots coordinate name to the left of the y-axis. + gsave + setlab + yNumLengthL neg fontsize -.85 mul add % yNumLengthL calculated in yN + aMean ym translate + 0 0 mv + 90 rotate + 0 x 0 x textCB + grestore + } def +/yCH { % ylabel | - ; plots coordinate name to the right of the y-axis. + gsave + setlab + yNumLengthH fontsize .85 mul add 10 xm add + aMean ym translate + 0 0 mv + 90 rotate + 0 x 0 x textCT + grestore + } def +/yCF { % ylabel | - ; plots coordinate name *falling* right of the y-axis. + gsave + setlab + yNumLengthH fontsize .85 mul add 10 xm add + aMEan ym translate + 0 0 mv + -90 rotate + 0 x 0 x textCB + grestore + } def + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Data Plotting (Symbols and Curves) %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + +%% Initializations: + +% asymmetric error bars? +/err_asy false def % overwrite this if data are quadruples x y d- d+ + + +%% Presets: + +% global preset [wups11a: exchanged rad<->lin to conform with pset] +/SymGSet { % sradglo slinglo serrglo | - + /serrglo x def % plot error bars? 0=never, 1=always, 2=as_given_in_pset + /slinglo x def % symbol linewidth multiplier + /sradglo x def % symbol size multiplier + } def + + +%% Retrieve presets from style array: + +/pstyle { pStyles setstyle } def +/cstyle { cStyles setstyle } def +/setstyle { % chosen_number array | - : set p or c as predefined in array. + dup length % i A n + 3 2 roll % A n i + dup 0 le { + pop pop pop ostyle % chosen_number<=0 means: don't plot + } { + 1 sub x % A i-1 n + mod get % A(i-1) + exec + } ifelse + } def + + +%% Set plot symbol: + +/pset { % styp sfill serr srad slin | - + % arg -> symbol linewidth + /slin x slinglo mul def + % arg -> symbol size + /srad x fm 0.16 mul sradglo mul def + % arg -> plot error bar? + 2 serrglo ne { pop serrglo } if % if (serrglo=2) use serr else use serrglo + /plot_errorbar x 1 eq { { errorbar } } { { pop pop pop pop } } ifelse def + % arg -> fill the symbol? (0=open, 1=full, 2=colored_with_black_border) + /sfill x def + % adjust srad: it's the _outer_ radius + % TROUBLE sfill 1 ne {/srad srad slin fm pt sub def} if + % arg -> symbol type + /ps {ps_nil} def % default: don't plot (maybe we only want an error bar) + dup 1 eq {/ps {ps_square} def} if + dup 2 eq {/ps {ps_diamond} def} if + dup 3 eq {/ps {ps_circle} def} if + dup 4 eq {/ps {ps_triangle} def} if + dup 5 eq {/ps {ps_cedez} def} if + dup 6 eq {/ps {ps_eieruhr} def} if + dup 7 eq {/ps {ps_valve} def} if + dup 8 eq {/ps {ps_tfwd} def} if + dup 9 eq {/ps {ps_tbwd} def} if + dup 10 eq {/ps {ps_pentagram} def} if + dup 11 eq {/ps {ps_plus} def} if + dup 12 eq {/ps {ps_cross} def} if + dup 13 eq {/ps {ps_star} def} if + dup 14 eq {/ps {ps_pentagon} def} if + pop + % + /t { % x y d[- d+] | - : plot a symbol and eventually an error bar. + err_asy not { dup } if + 4 copy pop pop plot_symbol + plot_errorbar + } bind def + /ti { t } bind def + /tf { t black } bind def + } def + + +%% Set curve: + +/lset { % lwidth dashes | - + 0 setdash + dup 0 gt { + pt fm setlinewidth + % pop error bar and convert frame coord -> paper coord + /txy { err_asy { pop } if pop xym } def % x y d[- d+] | x' y' + % commands to plot points (can be overwritten by nopoints): + /ti { np txy mv } def % x y d[- d+] | - : start curve + /t { txy li } def % x y d[- d+] | - : continue curve + /tf { txy li st } def % x y d[- d+] | - : terminate and plot curve + } { + ostyle + } ifelse + } def + + +%% Plot nothing: + +/ostyle { % - | - + /ti { nopoint } def + /t { nopoint } def + /tf { nopoint } def +} def +/nopoint { % x y d[- d+] | - + pop pop pop err_asy { pop } if +} def + + +%% Plot an asymmetric vertical error bar: + +/errorbar { % x y d- d+ | - + 3 copy pop pop + dup 0 gt x 10 lt and { + 4 copy + x pop add 10. 2 copy gt { x } if pop ym x xm x + 2 copy x .05 sub x np mv .1 0 rl st + np mv + pop sub 0. 2 copy lt { x } if pop ym x xm x + 2 copy lineto st + x .05 sub x np mv .1 0 rl st + } { + pop pop pop pop + } ifelse + } def + + +%% Plot a data symbol: + +/plot_symbol { % x y | - + gsave + offset + srad dup scale + slin srad div setline % Faktor 1/div unverstanden, aber noetig + ps % the actual plot symbol, defined by 'pset' + grestore + } def + +/fill_symbol { + sfill dup + 0 eq { + pop st + } { + 1 eq { + fill + } { + gsave fill grestore + gsave black st grestore + } ifelse + } ifelse + } def + + +%% The different symbols, designed for unit area (no arguments): + +/ps_nil { + } bind def + +/ps_square { + .5 .5 np mv + 0 -1 rl + -1 0 rl + 0 1 rl cp fill_symbol + } bind def + +/ps_diamond { + gsave 45 rotate ps_square grestore + } bind def + +/ps_circle { + 0 0 np .564 0 360 arc cp fill_symbol + } bind def + +/ps_triangle { + .77 dup dup 90 pol2xy np mv + 210 pol2xy li + 330 pol2xy li cp fill_symbol + } bind def + +/ps_cedez { + gsave 180 rotate ps_triangle grestore + } bind def + +/ps_tfwd { + gsave 30 rotate ps_triangle grestore + } bind def + +/ps_tbwd { + gsave 210 rotate ps_triangle grestore + } bind def + +/ps_eieruhr { + -.7 -.7 np mv + .7 -.7 li + -.7 .7 li + .7 .7 li cp fill_symbol + } bind def + +/ps_valve { + gsave 90 rotate ps_eieruhr grestore + } bind def + +/ps_pentagram { + .8 dup dup dup dup + 90 pol2xy np mv + 234 pol2xy li + 18 pol2xy li + 162 pol2xy li + 306 pol2xy li cp fill_symbol + } bind def + +/ps_pentagon { + .8 dup dup dup dup + 18 pol2xy np mv + 90 pol2xy li + 162 pol2xy li + 234 pol2xy li + 306 pol2xy li cp fill_symbol + } bind def + +/ps_plus { + gsave 45 rotate ps_cross grestore + } bind def + +/ps_cross { + .5 .5 np mv + -1 -1 rl st + -.5 .5 np mv + 1 -1 rl st + } bind def + +/ps_star { + .7 dup 0 pol2xy np mv 180 pol2xy li st + .7 dup 120 pol2xy np mv 300 pol2xy li st + .7 dup 240 pol2xy np mv 60 pol2xy li st + } bind def + + +%% Set column plotting (use this instead of pset) - BROKEN in 11a or earlier + +/setcolumn{ % shift width exec | % + % usage: 0 .2 { gsave { .5 setgray fill } grestore cp } setcolumn + /colexec x def % what's this ? + /colwidth x def + /colshift x def + /t { % broken - may need rewrite + np x colshift add x xym 2 copy mv pop + colwidth xm 0 rl + colwidth xm add 0 wy ym li + colwidth neg xm 0 rl + cp colexec + } def + /ti { t } bind def + /tf { t black } bind def +} def + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% List %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + +/NewList { % xins yins size advance NewList - + /nl_advance x def setown /nl_yins x def /nl_xins x def + /nl_xshift fontsize xmm div .9 mul def + /nl_xrline 0.33 def + /nl_ystep fontheight ymm div nl_advance mul def + /newline { + /nl_yins nl_yins nl_ystep sub def + } def + /fracline { % frac | - + fontheight ymm div nl_advance mul mul /nl_yins x nl_yins x sub def + } def + } def +/newlist { 1.65 NewList } def +/TxLine { % text TxLine - + nl_xins nl_yins 3 -1 roll textLM newline + } bind def +/TxCLine { % text TxLine - + nl_xins nl_yins 3 -1 roll textCM newline + } bind def +/infline{ % Obsolete since Frida2.1.5 + oooinfo 1 eq { TxLine } { pop } ifelse + } bind def +/PtTxLine { % pstyle text | - + x pstyle + nl_xins nl_xshift .5 mul add nl_yins 0 t + black nl_xins nl_xshift 1.5 mul add nl_yins 3 2 roll textLM + newline + } bind def +/PtPtCvTxLine { % pstyle pstyle cstyle text | - + 4 3 roll pstyle nl_xins nl_yins 0 t + 3 2 roll pstyle nl_xins nl_xshift add nl_yins 0 t + x cstyle + nl_xins nl_xshift 2 mul add + dup dup nl_xshift nl_xrline mul sub nl_yins 0 ti + nl_xshift nl_xrline mul add nl_yins 0 tf + nl_xshift add nl_yins 3 2 roll black textLM + newline + } bind def +/PtCvTxLine { % pstyle cstyle text | - + 3 2 roll pstyle nl_xins nl_yins 0 t + x cstyle + nl_xins nl_xshift 1 mul add + dup dup nl_xshift -.33 mul add nl_yins 0 ti + nl_xshift 0.33 mul add nl_yins 0 tf + nl_xshift add nl_yins 3 2 roll black textLM + newline + } bind def +/PtPtTxLine { % pstyle pstyle text | - + 3 2 roll pstyle nl_xins nl_yins 0 t + x pstyle nl_xins nl_xshift add nl_yins 0 t + black nl_xins nl_xshift 2 mul add nl_yins 3 2 roll textLM + newline + } bind def +/CvTxLine { % cstyle text | - + x cstyle + nl_xins fontsize xmm div nl_xrline mul 0 mul sub nl_yins 0 ti + nl_xins fontsize xmm div nl_xrline mul 3 mul add nl_yins 0 tf + black nl_xins nl_xshift 1.5 mul add nl_yins 3 2 roll textLM + newline + } bind def +/Cv2TxLine { % cstyle text | - + x cstyle + nl_xins fontsize xmm div nl_xrline mul sub nl_yins 0 ti + nl_xins fontsize xmm div nl_xrline mul add nl_xshift add nl_yins 0 tf + black nl_xins nl_xshift 2 mul add nl_yins 3 2 roll textLM + newline + } bind def +/PCTxLine { % pstyle(with plset) text | - + x pstyle + nl_xins fontsize xmm div nl_xrline 2 mul mul sub nl_yins 0 ci + nl_xins fontsize xmm div nl_xrline 2 mul mul add nl_yins 0 cf + nl_xins yins 0 t + black nl_xins + fontsize xmm div 1.9 mul % instead of xshift + add nl_yins 3 2 roll textLM + newline + } bind def +/showfilename { % xins yins size | - + setown + ooofnam 1 eq { filename textRB } { pop pop } ifelse + } def +/InfSet { % ooofnam oooinfo | - : set on(1) or off(0) + /oooinfo x def /ooofnam x def + } def +0 0 InfSet % default setting + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Macro Collection %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + +%% gray areas (mainly applied with grayval=1 for blank areas) [longtime grey..] + +/graybox { % grayval x_L y_B dx dy | - %%% OBSOLETE + boxit + cp gsave setgray fill grestore + } def +/boxit { % x_L y_B dx dy | - %%% OBSOLETE + 4 2 roll + np ym x xm x mv % corner Left Bottom + ym dup 0 x rl % line up + x xm 0 rl % line right + neg 0 x rl % line down + } def +/boxLLHH { % xl yl xh yh | - %%% INCOMPATIBLE with boxit, contains cp + 4 copy 8 copy + pop pop np mv + 3 1 roll pop pop li + li pop pop + 4 1 roll exch li pop pop + cp + } def +/execOval { % xl yl dx dy dr { proc } | - % works only in quadratic grid + x 6 2 roll + 4 2 roll % proc dr dx dy xl yl + gsave + xym translate + gsave + xym scale % BAD: now dr is scale dependent + dup neg 0 np mv + 0 1 rl + dup 0 1 3 2 roll 180 90 arcn + 1 0 rl + dup 1 1 3 2 roll 90 0 arcn + 0 -1 rl + dup 1 0 3 2 roll 0 -90 arcn + -1 0 rl + dup 0 0 3 2 roll -90 -180 arcn + pop + exec + grestore + grestore + } def +/execRectangle { % xl xh yl yh (all in user coords) {proc} | - + 5 1 roll + gsave + wy /qqyh x def + wy /qqyl x def + wx /qqxh x def + wx /qqxl x def + np + qqxl xm qqyl ym mv + qqxh xm qqyl ym li + qqxh xm qqyh ym li + qqxl xm qqyh ym li + cp exec grestore + } def +/execHexagon { % xl xh yl yh (all in user coords) {proc} | - + 5 1 roll + gsave + wy /qqyh x def + wy /qqyl x def + wx /qqxh x def + wx /qqxl x def + /qqdr qqyh qqyl sub 2 div def + np + qqxl qqdr add qqyl xym mv + qqxh qqdr sub qqyl xym li + qqxh qqyl qqdr add xym li + qqxh qqdr sub qqyh xym li + qqxl qqdr add qqyh xym li + qqxl qqyl qqdr add xym li + cp exec grestore + } def +/execTrueOval { % xl xh yl yh dr {proc} | - + 6 1 roll + gsave + /qqdr x def + /qqyh x def + /qqyl x def + /qqxh x def + /qqxl x def + np + qqxl qqdr add qqyl xym mv + qqxh qqdr sub qqyl xym li + qqxh qqdr sub qqyl qqdr add qqdr -90 0 arc + qqxh qqyh qqdr sub xym li + qqxh qqdr sub qqyh qqdr sub qqdr 0 90 arc + qqxl qqdr add qqyh xym li + qqxl qqdr add qqyh qqdr sub qqdr 90 180 arc + qqxl qqyl qqdr add xym li + qqxl qqdr add qqyl qqdr add qqdr 180 270 arc + cp exec grestore + } def +/coordRectangle { % xl xh yl yh (all in plot coords) {proc} | - + 5 1 roll + gsave + /qqyh x def + /qqyl x def + /qqxh x def + /qqxl x def + np + qqxl xm qqyl ym mv + qqxh xm qqyl ym li + qqxh xm qqyh ym li + qqxl xm qqyh ym li + cp exec grestore + } def + + +%% special objects + +/pfeilspitze { % x[local] y[local] rot siz + % draw with current linestyle, as set e.g. by linsetAxx + x 4 2 roll % siz rot x y + gsave + xym translate 180 add rotate dup dup dup + [] 0 setdash + .8 mul x .6 mul np mv 0 0 li .8 mul x -.6 mul li st + grestore + } def +/pfeiL { % (arrow anchored at base) x y rot siz len + gsave + dup xm x ym mul sqrt % (scale len) + 5 3 roll + xym translate % (origin at base) rot siz len + 3 2 roll + rotate % (draw rightwards) siz len + dup 0 translate % (origin at head) siz len + x 0 0 0 4 3 roll pfeilspitze % len + 0 0 np mv neg 0 li st + grestore + } def +/Pfeil { % (arrow anchored at head) x y rot siz len + dup xm x ym mul sqrt 5 copy + pop pfeilspitze + x pop + x 4 2 roll % len rot x y + gsave + xym translate 180 add rotate + 0 0 np mv 0 li st + grestore + } def +/pfeil { % (OBSOLETE) x[local] y[local] rot siz len[global] + fm 5 copy % not working well + pop pfeilspitze + x pop + x 4 2 roll % len rot x y + gsave + xym translate 180 add rotate + 0 0 np mv 0 li st + grestore + } def +/pfeil_arcn { % x_cent y_cent radius ang_from ang_to siz + gsave + 6 -2 roll offset + 4 copy pop 0 0 5 2 roll + np arcn st + % radius ang_from ang_to siz + 4 1 roll + gsave + rotate + pop + % siz radius + 0 -90 4 3 roll + pfeilspitze + grestore + grestore +} def + +/knautschy { % x0 y0 y_knau y_tot knautschy - : insert an S in dived y-axis + % the total height of the generated object is y_tot + % of which y_knau(.le. y_tot) is for the real knautsch, + % the remainder is for vertical prolongations. + x ym 4 div dup /tmpy x def 5 sqrt mul /tmpx x def + /tmpa x ym tmpy 4 mul sub 2 div def + np ym x xm x mv 0 tmpa rl tmpx tmpy rl tmpx -2 mul tmpy 2 mul rl + tmpx tmpy rl 0 tmpa rl st + } def +/separy { % x0 y0 sep lng ang lin - : insert an // in dived y-axis + setline + /spang x def + /splng x def + /spsep x def + 2 copy spsep sub gsave offset spang rotate + splng -.5 mul fm 0 np mv splng fm 0 rl st grestore + spsep add gsave offset spang rotate + splng -.5 mul fm 0 np mv splng fm 0 rl st grestore + } def + +% broken: +/setBemasz { % textsize textspace arrowsize arrowthick | - + /bmszTH x def + /bmszSZ x def + /bmszSP x def + /bmszOW x def + } def +18 .2 .5 .01 setBemasz +/Bemasz { % x y dx ang text_ang text | - + gsave + 6 4 roll offset % consumes x and y + 3 2 roll rotate % consumes ang | dx text_ang text + bmszOW setown + x /bmszRT x def + x 2 div x 2 copy % dx/2 text dx/2 text + textw 2 div bmszSP add % dx/2 text dx/2 halflabelwidth + % ACHTUNG: fuer bmszRT <> 0 ist textw NOCH FALSCH + 4 1 roll 0 3 2 roll bmszRT x rtextCM % hlw dx/2 + dup 2 mul 3 1 roll x sub dup % dx len len + 0 0 180 4 -1 roll bmszSZ bmszTH arrow % dx len + x 0 0 4 -1 roll bmszSZ bmszTH arrow + grestore + } def + + +%% Text composition shortcuts: + +/g { x grec endgr} bind def +/sb { x subsc endsc} bind def +/sp { x supsc endsc} bind def +/sbgr { x grec () subsc endsc () endgr} bind def +/spgr { x grec () supsc endsc () endgr} bind def + + +%% Text macros for neutron scattering: + +/hbar { + showif + (h) 1.2 .66 { + currentpoint fontheight .11 mul setline np mv + fontheight dup .8 mul x .3 mul rl + st () + } build + } bind def +/hbarw { hbar () grec (w) endgr } bind def +/wbar { grec (w) endgr ( / 2) grec (p) endgr } bind def +/taumean { () (\341t\361) g } bind def +/Sqw { showif (S\(q,) grec (w) endgr (\)) showif } bind def +/Sqn { showif (S\(q,) grec (n) endgr (\)) showif } bind def +/SQw { showif (S\(Q,) grec (w) endgr (\)) showif } bind def +/Sttw { showif (S\(2) grec (q) endgr (,) grec (w) endgr (\)) showif } bind def +/Sttn { showif (S\(2) grec (q) endgr (,) grec (n) endgr (\)) showif } bind def +/Xqw { grec (c) endgr (''\(q,) grec (w) endgr (\)) showif } bind def +/Xqn { grec (c) endgr (''\(q,) grec (n) endgr (\)) showif } bind def +/ueV{ grec (m) endgr (eV) showif} bind def +/inueV { showif (\() grec (m) endgr (eV\)) showif } bind def +/inmeVr { showif (\(meV) supsc (-1) endsc (\)) showif } bind def +/inueVr { showif (\() grec (m) endgr (eV) + supsc (-1) endsc (\)) showif } bind def +/inGHzr { showif (\(GHz) (-1) sp (\)) showif } def + +%% home-made Angstr is obsolete; use \375 or Ã… +/Angstr { + showif + (A) .5 1.23 { + currentpoint fontheight .1 mul setline np + fontheight .14 mul 0 360 arc st () + } build +} bind def +/Angr { Angstr () supsc (-1) endsc } bind def +/inAngr { showif (\() Angr (\)) showif } bind def +/Angrr { Angstr () supsc (-2) endsc } bind def +/inAngrr { showif (\() Angr (\)) showif } bind def +/wmin {grec (w) endgr () subsc (min) endsc} def +/winpi { grec (w) endgr ( / 2) grec (p) endgr } def +/Celsius { showif (\26x)g(C) showif } bind def + + +%% More shortcuts for impatient users: + +/L { langSel } bind def +/G { gsave exec grestore } bind def +/gs { gsave } bind def +/gr { grestore } bind def + +end % WuGdict... + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Mark "ewu", the end of the wups.. macro definition file %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +WuGdict11a begin + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Customizable plot setup, copied from g3.ps (editör: use latin-1) +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%% Position and scale: + +11.87 dup autolabel defsiz +1 dup stdred +3. -2.5 setnewpage newpage + +1 1 language +1 1 InfSet % plot fnam, info + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Mark "ecu", end of the customization section +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%% output created by frida2 + +/jx -42 def +/jy 7 def + +/p { + /zIn x def + /yIn x def + /xIn x def + xIn jx cos mul yIn jy cos mul add + xIn jx sin mul yIn jy sin mul add zIn add +} def + +%... sample +/s2x 2 def +/s2y 2 def +/s2d 1 def +np +s2x neg s2y neg 0 p mv +s2x neg s2y 0 p li +s2x s2y 0 p li +s2x s2y neg 0 p li cp +{ 250 208 130 setRGBcolor fill } G +161 107 8 setRGBcolor 1 [] lset st +np +s2x s2y neg 0 p mv +s2x s2y neg s2d neg p li +s2x s2y s2d neg p li +s2x s2y 0 p li cp +{ 201 162 89 setRGBcolor fill } G +161 107 8 setRGBcolor 1 [] lset st +np +s2x neg s2y neg 0 p mv +s2x neg s2y neg s2d neg p li +s2x s2y neg s2d neg p li +s2x s2y neg 0 p li cp +{ 247 221 171 setRGBcolor fill } G +161 107 8 setRGBcolor 1 [] lset st + +%... coordinate axes +black 1.5 [] lset 21 setown +% x axis +np +0 0 0 p mv +3.9 0 0 p li st +{ 3.9 0 0 p offset .1 -.2 {(x)} textLM} G +{ 3.9 0 0 p offset np -.25 -.25 0 p mv 0 0 0 p li -.33 .26 0 p li st } G +% y axis +np +0 0 0 p mv +0 3 0 p li st +{ 0 3 0 p offset .2 .1 {(y)} textLM} G +{ 0 3 0 p offset np -.2 -.2 0 p mv 0 0 0 p li .2 -.3 0 p li st } G +% z axis +np +0 0 0 p mv +0 0 3 p li st +{ 0 0 3 p offset 0 0.3 {(z)} textCB +np -.2 -.3 mv 0 0 li .2 -.3 li st +} G + + +%... detector + +/d2phi 3 def +/d2da .833 def +/d2ahi d2da 4 mul def +/d2alo d2da -2 mul def +/d2x 12 def + +% frame +np +d2x d2phi neg d2alo p mv +d2x d2phi d2alo p li +d2x d2phi d2ahi p li +d2x d2phi neg d2ahi p li +cp +{ 210 220 245 setRGBcolor fill } G +40 40 80 setRGBcolor 1.2 [] lset st + +% grid +/hline { % y + /tmpy x def + np + d2x d2phi neg tmpy p mv + d2x d2phi tmpy p li st +} def +/vline { % x + /tmpx x def + np + d2x tmpx d2alo p mv + d2x tmpx d2ahi p li st +} def +40 40 80 setRGBcolor 0.3 [] lset +-1 1 3 { d2da mul hline } for +-3 1 3 { 4 div d2phi mul vline } for + +% detector phi axis +black 1.5 [] lset +np d2x d2phi -1.3 mul 0 p mv d2x d2phi 1.3 mul 0 p li st +{ d2x d2phi 1.3 mul 0 p offset + np -.27 -.22 mv 0 0 li -.28 +.18 li st + .2 .05 {()(j)g(, q)(y)sb()} textLM } G +% detector alpha axis +np d2x 0 d2alo d2da sub p mv d2x 0 d2ahi d2da add p li st +{ d2x 0 d2ahi d2da add p offset + np -.27 -.2 mv 0 0 li .27 -.2 li st + 0 .2 {()(a)g(, q)(z)sb()} textCB } G + +% labels +{ % pop +21 setown black +{ d2x d2phi neg d2alo p offset + .2 -.2 {()(j)g()(min)sb()} textCT + -.2 .1 {()(a)g()(min)sb()} textRM +} G +{ d2x 0 d2alo p offset + 0 -.2 {(0)} textCT +} G +{ d2x d2phi d2alo p offset + .2 -.2 {()(j)g()(max)sb()} textCT +} G +{ d2x d2phi neg 0 p offset + -.3 .1 {(0)} textRM +} G +{ d2x d2phi neg d2ahi p offset + -.2 0 {()(a)g()(max)sb()} textRM +} G +} pop + +%... beam + +% x axis +black +.5 [] lset np 4.6 0 0 p mv 8 0 0 p li st +.5 [.12 .12] lset np 5.2 0 0 p mv d2x 0 0 p li st + +% scattered in xy plane +/scphi d2phi .875 mul def +/scalp d2ahi .625 mul def +105 0 23 setRGBcolor +/cfm { .63 mul } def +.5 [] lset np 0 0 0 p mv d2x cfm scphi cfm 0 p li st +.5 [.12 .18] lset np 0 0 0 p mv d2x scphi 0 p li st +/cfm { .63 mul } def +/ptfr + +% true scattering vector +165 0 33 setRGBcolor +/cfm { .83 mul } def +1.5 [] lset np 0 0 0 p mv d2x cfm scphi cfm scalp cfm p li st +1.5 [.18 .12] lset np 0 0 0 p mv d2x scphi scalp p li st + +% angle in xy plane +0 102 153 setRGBcolor 1 [] lset +{ 5.5 0 0 p offset + np 0 0 mv 0 5 5 -90 -76 arc st + black + 1 -.2 {()(j)g()(f)sb()} textCM } G +{ /cfm { .53 mul } def + d2x cfm scphi cfm 0 p offset + np 0 0 mv -6 0 6 0 11.5 arc st + black + .4 .5 {()(a)g()(f)sb()} textCM } G + + +end diff --git a/hugo/content/ref/instr/det/2d.md b/hugo/content/ref/instr/det/2d.md new file mode 100644 index 0000000000000000000000000000000000000000..71c2974da648da635b37287448d299f6ae076bc6 --- /dev/null +++ b/hugo/content/ref/instr/det/2d.md @@ -0,0 +1,68 @@ ++++ +title = "Detector2D" +weight = 10 ++++ + +## Detector2D + +For SAS and GISAS simulations, +the two-dimensional area detector is modelled by +the {{% ref-class "Device/Detector" "Detector2D" %}} class. + +### Geometry + +A `Detector2D` is a flat rectangular detector. +All pixels have equal size. + +{{< figscg src="/img/draw/detector1.svg" width="100%" >}} + +In BornAgain, detector images are shown as seen from the back of the detector. +In this way we ensure that the $\varphi$ or $q_y$ axis has the same +orientation as the real-space $y$ axis. + +For plotting and data import and export, +BornAgain pretends that the detector bins correspond to +bins of constant width in $\varphi$ or $q_y$ and $\alpha$ or $q_z$, +even though this is only true in first approximation. + +For the actual scattering computation, BornAgain uses true scattering angles, +computed as nonlinear functions of the pixel coordinates. + +Further distortions arise +if the detector is not perpendicular to the `x` axis. +This is not unlikely in GISAS +where it makes sense to position the detector perpendicular +to the reflected or transmitted beam. +Corrections for these and other distortions will be implemented +when requested by users. + +### Constructor + +The constructor has the signature +``` +detector = ba.Detector2D(nphi, phimin, phimax, nalpha, alphamin, alphamax) +``` +where `nphi` and `nalpha` are numbers of bins; +their product is the number of pixels of the detector. + +The arguments `phimin`, `phimax` designate the lowest and highest signed deflection $\varphi$ +at $\alpha=0$. +The arguments `alphamin`, `alphamax` designate the lowest and highest signed grazing angle $\alpha$ +at $\varphi=0$. + +### Masks + +When fitting theoretical models to measured diffraction images, +it can be helpful to mask part of the detector area. +See + +* [Fit with masks](/ex/fit/fit-with-masks) + +### Resolution + +For modeling the detector resolution, see [Detector resolution](/ref/instr/det/resolution). + +### History + +Until BornAgain 21, we had a `RectangularDetector` and a `SphericalDetector`. +In BornAgain 22, they were merged into a new `Detector2D` class. \ No newline at end of file diff --git a/hugo/content/ref/instr/det/_index.md b/hugo/content/ref/instr/det/_index.md index 1080a50646f706bc80ce9abef12bb5b28927bd95..ac44d1eccb26059c1f88f0289d36dccf2bba59f1 100644 --- a/hugo/content/ref/instr/det/_index.md +++ b/hugo/content/ref/instr/det/_index.md @@ -5,31 +5,10 @@ weight = 40 ## Detectors -Every GISAS or off-specular simulation in BornAgain carries a detector object representing the real x-ray/neutron detector. The detector object has to be properly initialized before the simulation can start. Each detector is characterized by its size, the number of pixels and their shapes and finally by the detector's position/rotation with respect to the sample coordinate system. +For SAS and GISAS simulations, see -There are two major types of detectors in BornAgain. +* [Detector2D](/ref/instr/det/2d). -{{< figscg src="/img/draw/two_detectors.png" class="center">}} +For off-specular simulations, see -The `SphericalDetector` object represents a portion of a sphere, whose center is located at the origin of the sample coordinate system. The spherical detector has a simple interface and serves as a good approximation of real detectors for the majority of small angle experimental setups. - -The `FlatDetector` object represents a more realistic, rectangular 2D detector. In particular, it allows to define an arbitrary position/orientation with respect to the sample and/or the beam. - -Both detector types are explained in detail in the following sections of the tutorial. - -* [Spherical detector](/ref/instr/det/spherical) -* [Rectangular detector](/ref/instr/det/flat) - -### Masks - -When fitting theoretical models to measured diffraction images, -it can be helpful to mask part of the detector area. -See - -* [Fit with masks](/ex/fit/fit-with-masks) - -### Resolution - -For modeling the detector resolution, see - -* [Detector resolution manual](/ref/instr/det/resolution) +* [Offspec detector](/ref/instr/det/offspec). diff --git a/hugo/content/ref/instr/det/flat.md b/hugo/content/ref/instr/det/flat.md deleted file mode 100644 index 3e72b786e0b253ac91500bec253f662ab40ca1f8..0000000000000000000000000000000000000000 --- a/hugo/content/ref/instr/det/flat.md +++ /dev/null @@ -1,187 +0,0 @@ -+++ -title = "Rectangular detector" -weight = 20 -+++ - -## Rectangular detector - -A `FlatDetector` object in BornAgain is used to represent a two dimensional neutron/x-ray detector. The following sections provide details on this type of detector: - -* [General description]({{% relref "#general-description" %}}) -* [Rectangular detector definition]({{% relref "#rectangular-detector-definition" %}}) -* [Positioning the rectangular detector]({{% relref "#positioning-the-rectangular-detector" %}}) -* [The detector is perpendicular to the sample plane]({{% relref "#the-detector-is-perpendicular-to-the-sample-plane" %}}) -* [The detector is perpendicular to the direct beam]({{% relref "#the-detector-is-perpendicular-to-the-direct-beam" %}}) -* [The detector is perpendicular to the reflected beam]({{% relref "#the-detector-is-perpendicular-to-the-reflected-beam" %}}) -* [Additional convenience methods]({{% relref "#additional-convenience-methods" %}}) - -### General description - -A `FlatDetector` has a plane rectangular shape, a total given width and height and a given amount of pixels. The detector plane can placed in an arbitrary position and orientation with respect to the sample position. - -{{< figscg src="/img/draw/rectangular_detector.png" width="600" class="center">}} - -{{< alert theme="info" >}} -**Note** - -Real experimental setups vary significantly from one GISAS instrument to another. Different conventions for representing the space coordinates, a range of detector's positions/orientations and different detector's alignment techniques make the creation of a universal detector API quite challenging. The BornAgain detector API is generic enough to be able to cope with all the aforementioned differences and, hopefully, is simple enough to let the user quickly setup his specific case. - -{{< /alert >}} - -### Rectangular detector definition - -BornAgain's FlatDetector is initialized using its constructor - -```python -FlatDetector(nxbins, width, nybins, height) -""" -Constructs rectangular planar detector - -nxbins : Number of bins (pixels) in x-direction -width : Width of the detector in mm along x-direction -nybins : Number of bins (pixels) in y-direction -height : Height of the detector in mm along y-direction -""" -``` - -The local detector coordinate system is defined in such a way, that its origin coincides with the lower left corner of the rectangle. For example, the following code snippet will create a rectangular detector with a total number of pixels equal to $10 \cdot 9=90$ and with a pixel size equal to $200 mm \cdot 180 mm =36\cdot 10^3 mm^2$. - -```python -detector = FlatDetector(10, 200.0, 9, 180.0) -``` - -{{< figscg src="/img/draw/xy_plane_with_labels.png" width="600" class="center">}} - -Here, the vertical and horizontal lines denote the bin boundaries while the blue markers show the bin centers. During a simulation, the bin intensity will be calculated for values of $\varphi_f$ and $\alpha_f$ corresponding to the bin centers and then normalized to the bin area. - -{{< alert theme="info" >}} -**Note** - -`ScatteringSimulation` has a special setting to calculate the intensity in a bin as the 2D integral along the detector bin area. This mode will be explained elsewhere. - -{{< /alert >}} - -### Positioning the rectangular detector - -The position and the orientation of the detector can be defined in a generic way using the following parameters: - -* the vector **n**, given in the sample coordinate system, which is the normal to the detector plane and has a length equal to the sample-detector distance -* the coordinate of the point `(u0, v0)` of intersection of the normal vector **n** and the detector plane, expressed in local detector coordinates -* the detector axis direction vector **u** which defines the orientation of the detector axes with respect to the sample coordinate system - -{{< figscg src="/img/draw/rectangular_detector_genpos.png" width="600" class="center">}} - -In the plot above, the detector is inclined towards the sample by an angle of 20 degrees. - -The position is defined using the `FlatDetector::setPosition` method as follows - -```python -setPosition(normal, u0, v0, direction = R3(0, -1, 0)) -""" -Sets position of rectangular detector -normal : Vector in sample coordinate system, normal to the detector plane, - pointing from the sample origin to the detector plane -u0 : x-coordinate of point of intersection of normal vector and detector plane, - expressed in local detector coordinates -v0 : y-coordinate of point of intersection of normal vector and detector plane, - expressed in local detector coordinates -direction: direction of detector u-axis with respect to the sample coordinate system -""" -``` - -Note that the direction vector **u** is set by default to `(0.0, -1.0, 0.0)` which corresponds to the detector u-axis pointing to the right, as shown in the plot above (green arrow on the detector plane). This value should not be changed, unless the user has to deal with a rotation of the detector around the normal vector **n**. - -In the following, we will show how to set the detector's parameters for the three most common cases in GISAS experimental setups: - -* the detector plane is perpendicular to the sample plane -* the detector plane is perpendicular to the direct beam -* the detector plane is perpendicular to the reflected beam - -### The detector is perpendicular to the sample plane - -In this case the normal vector **n** coincides with the x-axis of the sample coordinate system and the length of the vector is equal to the detector distance. The detector's local coordinates `(u0, v0)` denote the point where the sample x-axis crosses the detector plane. - -{{< figscg src="/img/draw/rectangular_detector_samplepos.png" width="600" class="center">}} - -The following code demonstrates the creation of the detector shown in the plot. Note that the values of the parameters are given only as an example and do not reflect the relative proportions in the plot. - -```python -nxbins, nybins = 10, 9 -width, height = 200.0, 180.0 -distance = 2000.0 -u0, v0 = 100.0, 20.0 - -detector = FlatDetector(nxbins, width, nybins, height) -detector.setPosition(R3(distance, 0.0, 0.0), u0, v0) - -simulation = ScatteringSimulation() -simulation.setDetector(detector) -``` - -The convenience method `FlatDetector::setPerpendicularToSampleX` can be used to achieve the same setup: - -```python -detector = FlatDetector(nxbins, width, nybins, height) -detector.setPerpendicularToSampleX(distance, u0, v0) -``` - -### The detector is perpendicular to the direct beam - -In this case the normal vector **n** coincides with the beam direction. The length of the vector is equal to the sample-detector distance. The detector local coordinates `(u0, v0)` again denote the point where the direct beam hits the detector plane. - -{{< figscg src="/img/draw/rectangular_detector_directbeam.png" width="600" class="center">}} - -The normal vector **n** can be easily calculated from the beam inclination angle $\alpha_i$. - -```python -width, height = 200.0, 180.0 -distance = 2000.0 -u0, v0 = 100.0, 10.0 -alpha_i = 0.2*deg - -detector = FlatDetector(nxbins, width, nybins, height) -normal = R3(distance*cos(alpha_i), 0.0, -1.0*distance*sin(alpha_i))) -detector.setPosition(normal, u0, v0) - -simulation = ScatteringSimulation() -simulation.setDetector(detector) -``` - -The convenience method `FlatDetector::setPerpendicularToDirectBeam` can be used to simplify this setup: - -```python -detector = FlatDetector(nxbins, width, nybins, height) -detector.setPerpendicularToDirectBeam(distance, u0, v0) -``` - -In this case, the ScatteringSimulation will calculate the normal vector **n** during runtime, depending from the beam angle settings. - -### The detector is perpendicular to the reflected beam - -In this case the normal vector **n** coincides with the reflected beam direction. The length of the vector is equal to the sample-detector distance. The detector local coordinates `(u0, v0)` denote the point where the reflected beam hits the detector plane. - -{{< figscg src="/img/draw/rectangular_detector_reflectedbeam.png" width="600" class="center">}} - -The normal vector **n** can be easily calculated from the beam inclination angle $\alpha_i$. - -```python -distance = 2000.0 -u0, v0 = 100.0, 60.0 -alpha_i = 0.2*deg - -detector = FlatDetector(nxbins, width, nybins, height) -normal = R3(distance*cos(alpha_i), 0.0, distance*sin(alpha_i))) -detector.setPosition(normal, u0, v0) - -simulation = ScatteringSimulation() -simulation.setDetector(detector) -``` - -The convenience method `FlatDetector::setPerpendicularToReflectedBeam` can be used to simplify this setup: - -```python -detector = FlatDetector(nxbins, width, nybins, height) -detector.setPerpendicularToReflectedBeam(distance, u0, v0) -``` - -In this case, the ScatteringSimulation will calculate the normal vector **n** during runtime, depending on the beam angle settings. diff --git a/hugo/content/ref/instr/det/spherical.md b/hugo/content/ref/instr/det/spherical.md deleted file mode 100644 index 22ebe773dfa82b3b8641a4e63a25267af023d624..0000000000000000000000000000000000000000 --- a/hugo/content/ref/instr/det/spherical.md +++ /dev/null @@ -1,99 +0,0 @@ -+++ -title = "Spherical detector" -weight = 10 -+++ - -## Spherical detector - -This shape of detector represents a portion of a sphere, defined by the range of $\varphi$ and $\alpha$ angles as shown in the plot below. The sphere has its center located at the origin of the sample coordinate system. - -{{< figscg src="/img/draw/spherical_detector.png" width="500" class="center">}} - -A GISAS or off-specular simulation creates a spherical detector by default. To set its parameters the method `setDetectorParameters` should be used - -```python -setDetectorParameters(n_phi, phi_min, phi_max, n_alpha, alpha_min, alpha_max) -""" -Sets detector parameters using angle ranges - -n_phi : number of phi-axis bins -phi_min : low edge of first phi-bin -phi_max : upper edge of last phi-bin -n_alpha : number of alpha-axis bins -alpha_min : low edge of first alpha-bin -alpha_max : upper edge of last alpha-bin -""" -``` - -All angles are expressed in radians. For convenience, a special `deg` multiplier can be used to define the detector range directly in degrees. For example, the following code snippet - -```python -simulation = ScatteringSimulation() -simulation.setDetectorParameters(20, -1.0*deg, 1.0*deg, 10, 0.0*deg, 1.0*deg) -``` - -will create a detector plane with a total number of bins equal to 200 and with a fixed bin size equal to `0.1*deg` along both directions - -{{< figscg src="/img/draw/phi_alpha_plane.png" width="600" class="center">}} - -Here, the vertical and horizontal lines denote bin boundaries while blue dots show the bin centers. During the simulation, the bin intensity will be calculated for values of $\varphi_f$ and $\alpha_f$ corresponding to the bin centers and then normalized to the bin area. - -{{< alert theme="info" >}} -**Note** - -`ScatteringSimulation` has a special setting to calculate the intensity in a bin as the 2D integral along the detector bin area. This mode will be explained elsewhere. - -{{< /alert >}} - -### Alternative way to create SphericalDetector - -The detector can be initialized separately and then later assigned to the simulation object as shown in the script below. The results will be exactly the same as in the previous example - -```python -detector = SphericalDetector(20, -1.0*deg, 1.0*deg, 10, 0.0*deg, 1.0*deg) -simulation = ScatteringSimulation() -simulation.setDetector(detector) -``` - -### Spherical detector with variable bin size - -It is possible to create a spherical detector with a non-equidistant binning. This is done by creating custom axes and using them as `SphericalDetector` initializers. - -There are two basic axis types in BornAgain: `EquiDivision` and `GenericScale`. Their signatures are shown in the code snippet below. - -```python -EquiDivision(name, nbins, start, end) -""" -Constructs an axis with fixed bin size - -name : The name of the axis -nbins : Number of axis bins -start : Low edge of first bin -end : Upper edge of last bin -""" - -GenericScale(name, bin_boundaries) -""" -Constructs an axis with variable bin size - -name : The name of the axis -bin_boundaries : Array of even size containing lower and upper edges for each bin. -""" -``` - -In the following example we create a `SphericalDetector` with two axes: an x-axis with variable bin size and a y-axis with fixed bin size. The code and resulting detector plane are shown below. - -```python -xedges = [-1.0*deg, -0.7*deg, -0.7*deg, -0.5*deg, -0.5*deg, -0.3*deg, -0.3*deg, -0.2*deg, -0.2*deg, -0.1*deg, -0.1*deg, -0.025*deg, -0.025*deg, 0.025*deg, 0.025*deg, 0.1*deg, 0.1*deg, 0.2*deg, 0.2*deg, 0.3*deg, 0.3*deg, 0.5*deg, 0.5*deg, 0.7*deg, 0.7*deg, 1.0*deg] -xaxis = GenericScale("my-x-axis", xedges) - -yaxis = EquiDivision("my-y-axis", 10, 0.0, 10.) - -detector = SphericalDetector() -detector.setDetectorAxes(xaxis, yaxis) - -simulation = ScatteringSimulation() -simulation.setDetector(detector) -``` - -{{< figscg src="/img/draw/phi_alpha_plane_variable.png" width="600" class="center">}} diff --git a/hugo/static/img/draw/_README.md b/hugo/static/img/draw/_README.md new file mode 100644 index 0000000000000000000000000000000000000000..dcbbb991209f45eece502202d791ddda45132625 --- /dev/null +++ b/hugo/static/img/draw/_README.md @@ -0,0 +1,4 @@ +# Provenance + +detector1.svg + Doc/PhysRef/fig/drawing/detector1.ps -> eps2pdf (from tps) -> pdf2svg \ No newline at end of file diff --git a/hugo/static/img/draw/detector1.svg b/hugo/static/img/draw/detector1.svg new file mode 100644 index 0000000000000000000000000000000000000000..242c590ab170a7202d84d5e93680de0da8fcf942 --- /dev/null +++ b/hugo/static/img/draw/detector1.svg @@ -0,0 +1,117 @@ +<?xml version="1.0" encoding="UTF-8"?> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="591" height="477" viewBox="0 0 591 477"> +<defs> +<g> +<g id="glyph-0-0"> +<path d="M 4.765625 -4.421875 L 7.65625 -8.5625 L 6.109375 -8.5625 L 4.046875 -5.453125 L 2 -8.5625 L 0.4375 -8.5625 L 3.296875 -4.359375 L 0.28125 0 L 1.828125 0 L 4 -3.28125 L 6.140625 0 L 7.734375 0 Z M 4.765625 -4.421875 "/> +</g> +<g id="glyph-0-1"> +<path d="M 6.34375 -8.5625 L 3.96875 -1.890625 L 1.78125 -8.5625 L 0.328125 -8.5625 L 3.21875 0.03125 L 2.703125 1.390625 C 2.46875 2 2.171875 2.21875 1.609375 2.21875 C 1.375 2.21875 1.171875 2.1875 0.875 2.125 L 0.875 3.34375 C 1.15625 3.5 1.4375 3.5625 1.796875 3.5625 C 2.234375 3.5625 2.71875 3.421875 3.078125 3.15625 C 3.5 2.84375 3.75 2.484375 4 1.796875 L 7.8125 -8.5625 Z M 6.34375 -8.5625 "/> +</g> +<g id="glyph-0-2"> +<path d="M 7.234375 -8.5625 L 0.84375 -8.5625 L 0.84375 -7.375 L 5.625 -7.375 L 0.5 -1.21875 L 0.5 0 L 7.46875 0 L 7.46875 -1.1875 L 2.15625 -1.1875 L 7.234375 -7.359375 Z M 7.234375 -8.5625 "/> +</g> +<g id="glyph-0-3"> +<path d="M 1.421875 -1.703125 L 1.421875 0 L 2.40625 0 L 2.40625 0.296875 C 2.40625 1.421875 2.1875 1.75 1.421875 1.78125 L 1.421875 2.40625 C 2.5 2.4375 3.140625 1.65625 3.140625 0.265625 L 3.140625 -1.703125 Z M 1.421875 -1.703125 "/> +</g> +<g id="glyph-0-4"> +</g> +<g id="glyph-0-5"> +<path d="M 8.09375 3.5625 L 8.09375 -8.5625 L 6.875 -8.5625 L 6.875 -7.421875 C 6.25 -8.3125 5.28125 -8.8125 4.15625 -8.8125 C 1.890625 -8.8125 0.421875 -6.96875 0.421875 -4.125 C 0.421875 -1.34375 1.8125 0.375 4.09375 0.375 C 5.28125 0.375 6.09375 -0.046875 6.734375 -0.984375 L 6.734375 3.5625 Z M 4.34375 -7.53125 C 5.796875 -7.53125 6.734375 -6.25 6.734375 -4.171875 C 6.734375 -2.203125 5.78125 -0.90625 4.34375 -0.90625 C 2.84375 -0.90625 1.84375 -2.21875 1.84375 -4.21875 C 1.84375 -6.203125 2.84375 -7.53125 4.34375 -7.53125 Z M 4.34375 -7.53125 "/> +</g> +<g id="glyph-1-0"> +<path d="M 4.0625 -8.296875 C 3.3125 -8.25 2.8125 -8.09375 2.203125 -7.6875 C 1.140625 -6.953125 0.59375 -5.828125 0.59375 -4.40625 C 0.59375 -2.015625 2.296875 -0.125 4.609375 -0.015625 L 4.609375 3.625 L 5.703125 3.625 L 5.703125 -0.015625 C 7.828125 -0.0625 9.59375 -2.03125 9.59375 -4.375 C 9.59375 -6.5 8.15625 -8.390625 6.5 -8.390625 C 5.265625 -8.390625 4.46875 -7.359375 4.46875 -5.78125 C 4.46875 -5.734375 4.46875 -5.671875 4.484375 -5.1875 L 4.609375 -0.71875 C 3.1875 -0.921875 2.390625 -2.34375 2.390625 -4.625 C 2.390625 -6.40625 2.9375 -7.484375 4.0625 -7.921875 Z M 5.515625 -4.984375 C 5.4375 -6.359375 5.75 -7.125 6.375 -7.125 C 7.25 -7.125 8.15625 -5.46875 8.15625 -3.84375 C 8.15625 -2.0625 7.171875 -0.796875 5.703125 -0.6875 Z M 5.515625 -4.984375 "/> +</g> +<g id="glyph-1-1"> +<path d="M 8.109375 -8.171875 L 7.109375 -5.359375 C 6.6875 -7.34375 5.6875 -8.390625 4.203125 -8.390625 C 3.453125 -8.390625 2.640625 -8.078125 2.046875 -7.546875 C 1.109375 -6.765625 0.671875 -5.609375 0.671875 -3.984375 C 0.671875 -1.375 1.96875 0.21875 4.09375 0.21875 C 5.53125 0.21875 6.59375 -0.515625 7.25 -1.984375 C 7.34375 -1.671875 7.453125 -1.375 7.625 -0.96875 C 8.0625 -0.046875 8.328125 0.21875 8.859375 0.21875 C 9.390625 0.21875 9.78125 -0.125 9.984375 -0.8125 C 10.09375 -1.1875 10.15625 -1.546875 10.171875 -2.46875 L 9.734375 -2.46875 C 9.703125 -1.640625 9.390625 -1.03125 8.984375 -1.03125 C 8.453125 -1.03125 7.90625 -1.890625 7.71875 -3.03125 L 9.5625 -8.171875 Z M 6.640625 -3.9375 L 6.265625 -2.875 C 5.6875 -1.203125 5.03125 -0.40625 4.21875 -0.40625 C 3.0625 -0.40625 2.390625 -1.75 2.390625 -4.0625 C 2.390625 -5.28125 2.609375 -6.265625 3.046875 -6.984375 C 3.328125 -7.453125 3.703125 -7.6875 4.21875 -7.6875 C 5.375 -7.6875 6.125 -6.75 6.453125 -4.890625 Z M 6.640625 -3.9375 "/> +</g> +<g id="glyph-2-0"> +<path d="M 4.5 -6.078125 L 2.8125 -1.34375 L 1.265625 -6.078125 L 0.234375 -6.078125 L 2.28125 0.015625 L 1.90625 0.984375 C 1.75 1.421875 1.546875 1.578125 1.140625 1.578125 C 0.96875 1.578125 0.828125 1.546875 0.625 1.5 L 0.625 2.375 C 0.828125 2.484375 1.015625 2.53125 1.28125 2.53125 C 1.59375 2.53125 1.921875 2.421875 2.171875 2.234375 C 2.484375 2.015625 2.65625 1.765625 2.84375 1.28125 L 5.546875 -6.078125 Z M 4.5 -6.078125 "/> +</g> +<g id="glyph-2-1"> +<path d="M 5.140625 -6.078125 L 0.609375 -6.078125 L 0.609375 -5.234375 L 3.984375 -5.234375 L 0.359375 -0.875 L 0.359375 0 L 5.296875 0 L 5.296875 -0.84375 L 1.53125 -0.84375 L 5.140625 -5.21875 Z M 5.140625 -6.078125 "/> +</g> +<g id="glyph-2-2"> +<path d="M 2.984375 -6.078125 L 1.984375 -6.078125 L 1.984375 -7.03125 C 1.984375 -7.4375 2.203125 -7.640625 2.65625 -7.640625 C 2.734375 -7.640625 2.765625 -7.640625 2.984375 -7.625 L 2.984375 -8.421875 C 2.765625 -8.46875 2.640625 -8.484375 2.453125 -8.484375 C 1.546875 -8.484375 1.015625 -7.96875 1.015625 -7.109375 L 1.015625 -6.078125 L 0.203125 -6.078125 L 0.203125 -5.28125 L 1.015625 -5.28125 L 1.015625 0 L 1.984375 0 L 1.984375 -5.28125 L 2.984375 -5.28125 Z M 2.984375 -6.078125 "/> +</g> +</g> +</defs> +<rect x="-59.1" y="-47.7" width="709.2" height="572.4" fill="rgb(100%, 100%, 100%)" fill-opacity="1"/> +<path fill-rule="nonzero" fill="rgb(98.039246%, 81.568909%, 50.98114%)" fill-opacity="1" stroke-width="7.78034" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(63.137817%, 41.960144%, 3.137207%)" stroke-opacity="1" stroke-miterlimit="10" d="M 19.804688 3929.140625 L 1355.664062 4093.164062 L 2355.859375 3192.578125 L 1020 3028.554688 Z M 19.804688 3929.140625 " transform="matrix(0.1, 0, 0, -0.1, 0, 477)"/> +<path fill-rule="nonzero" fill="rgb(78.823853%, 63.529968%, 34.901428%)" fill-opacity="1" stroke-width="7.78034" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(63.137817%, 41.960144%, 3.137207%)" stroke-opacity="1" stroke-miterlimit="10" d="M 1020 3028.554688 L 1020 2692.109375 L 2355.859375 2856.132812 L 2355.859375 3192.578125 Z M 1020 3028.554688 " transform="matrix(0.1, 0, 0, -0.1, 0, 477)"/> +<path fill-rule="nonzero" fill="rgb(96.862793%, 86.66687%, 67.059326%)" fill-opacity="1" stroke-width="7.78034" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(63.137817%, 41.960144%, 3.137207%)" stroke-opacity="1" stroke-miterlimit="10" d="M 19.804688 3929.140625 L 19.804688 3592.65625 L 1020 2692.109375 L 1020 3028.554688 Z M 19.804688 3929.140625 " transform="matrix(0.1, 0, 0, -0.1, 0, 477)"/> +<path fill="none" stroke-width="11.6705" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M 1187.851562 3560.859375 L 2163.046875 2682.8125 " transform="matrix(0.1, 0, 0, -0.1, 0, 477)"/> +<g fill="rgb(0%, 0%, 0%)" fill-opacity="1"> +<use xlink:href="#glyph-0-0" x="219.668" y="221.354"/> +</g> +<path fill="none" stroke-width="11.6705" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M 2017.03125 2728.828125 L 2163.046875 2682.8125 L 2167.34375 2767.773438 " transform="matrix(0.1, 0, 0, -0.1, 0, 477)"/> +<path fill="none" stroke-width="11.6705" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M 1187.851562 3560.859375 L 2189.726562 3683.867188 " transform="matrix(0.1, 0, 0, -0.1, 0, 477)"/> +<g fill="rgb(0%, 0%, 0%)" fill-opacity="1"> +<use xlink:href="#glyph-0-1" x="225.703" y="111.152"/> +</g> +<path fill="none" stroke-width="11.6705" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M 2072.929688 3720.703125 L 2189.726562 3683.867188 L 2139.53125 3626.5625 " transform="matrix(0.1, 0, 0, -0.1, 0, 477)"/> +<path fill="none" stroke-width="11.6705" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M 1187.851562 3560.859375 L 1187.851562 4570.273438 " transform="matrix(0.1, 0, 0, -0.1, 0, 477)"/> +<g fill="rgb(0%, 0%, 0%)" fill-opacity="1"> +<use xlink:href="#glyph-0-2" x="114.7" y="9.877"/> +</g> +<path fill="none" stroke-width="11.6705" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M 1120.546875 4469.335938 L 1187.851562 4570.273438 L 1255.15625 4469.335938 " transform="matrix(0.1, 0, 0, -0.1, 0, 477)"/> +<path fill-rule="nonzero" fill="rgb(82.35321%, 86.274719%, 96.078491%)" fill-opacity="1" stroke-width="9.33641" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(15.686035%, 15.686035%, 31.37207%)" stroke-opacity="1" stroke-miterlimit="10" d="M 3186.523438 175.546875 L 5190.3125 421.601562 L 5190.3125 2103.28125 L 3186.523438 1857.265625 Z M 3186.523438 175.546875 " transform="matrix(0.1, 0, 0, -0.1, 0, 477)"/> +<path fill="none" stroke-width="2.3341" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(15.686035%, 15.686035%, 31.37207%)" stroke-opacity="1" stroke-miterlimit="10" d="M 3186.523438 455.859375 L 5190.3125 701.875 " transform="matrix(0.1, 0, 0, -0.1, 0, 477)"/> +<path fill="none" stroke-width="2.3341" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(15.686035%, 15.686035%, 31.37207%)" stroke-opacity="1" stroke-miterlimit="10" d="M 3186.523438 736.132812 L 5190.3125 982.148438 " transform="matrix(0.1, 0, 0, -0.1, 0, 477)"/> +<path fill="none" stroke-width="2.3341" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(15.686035%, 15.686035%, 31.37207%)" stroke-opacity="1" stroke-miterlimit="10" d="M 3186.523438 1016.40625 L 5190.3125 1262.421875 " transform="matrix(0.1, 0, 0, -0.1, 0, 477)"/> +<path fill="none" stroke-width="2.3341" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(15.686035%, 15.686035%, 31.37207%)" stroke-opacity="1" stroke-miterlimit="10" d="M 3186.523438 1296.679688 L 5190.3125 1542.734375 " transform="matrix(0.1, 0, 0, -0.1, 0, 477)"/> +<path fill="none" stroke-width="2.3341" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(15.686035%, 15.686035%, 31.37207%)" stroke-opacity="1" stroke-miterlimit="10" d="M 3186.523438 1576.953125 L 5190.3125 1823.007812 " transform="matrix(0.1, 0, 0, -0.1, 0, 477)"/> +<path fill="none" stroke-width="2.3341" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(15.686035%, 15.686035%, 31.37207%)" stroke-opacity="1" stroke-miterlimit="10" d="M 3436.992188 206.328125 L 3436.992188 1888.007812 " transform="matrix(0.1, 0, 0, -0.1, 0, 477)"/> +<path fill="none" stroke-width="2.3341" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(15.686035%, 15.686035%, 31.37207%)" stroke-opacity="1" stroke-miterlimit="10" d="M 3687.460938 237.070312 L 3687.460938 1918.75 " transform="matrix(0.1, 0, 0, -0.1, 0, 477)"/> +<path fill="none" stroke-width="2.3341" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(15.686035%, 15.686035%, 31.37207%)" stroke-opacity="1" stroke-miterlimit="10" d="M 3937.929688 267.8125 L 3937.929688 1949.492188 " transform="matrix(0.1, 0, 0, -0.1, 0, 477)"/> +<path fill="none" stroke-width="2.3341" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(15.686035%, 15.686035%, 31.37207%)" stroke-opacity="1" stroke-miterlimit="10" d="M 4188.398438 298.554688 L 4188.398438 1980.273438 " transform="matrix(0.1, 0, 0, -0.1, 0, 477)"/> +<path fill="none" stroke-width="2.3341" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(15.686035%, 15.686035%, 31.37207%)" stroke-opacity="1" stroke-miterlimit="10" d="M 4438.90625 329.335938 L 4438.90625 2011.015625 " transform="matrix(0.1, 0, 0, -0.1, 0, 477)"/> +<path fill="none" stroke-width="2.3341" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(15.686035%, 15.686035%, 31.37207%)" stroke-opacity="1" stroke-miterlimit="10" d="M 4689.375 360.078125 L 4689.375 2041.757812 " transform="matrix(0.1, 0, 0, -0.1, 0, 477)"/> +<path fill="none" stroke-width="2.3341" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(15.686035%, 15.686035%, 31.37207%)" stroke-opacity="1" stroke-miterlimit="10" d="M 4939.84375 390.820312 L 4939.84375 2072.539062 " transform="matrix(0.1, 0, 0, -0.1, 0, 477)"/> +<path fill="none" stroke-width="11.6705" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M 2885.9375 699.21875 L 5490.898438 1019.0625 " transform="matrix(0.1, 0, 0, -0.1, 0, 477)"/> +<path fill="none" stroke-width="11.6705" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M 5400.039062 945.039062 L 5490.898438 1019.0625 L 5396.640625 1079.648438 " transform="matrix(0.1, 0, 0, -0.1, 0, 477)"/> +<g fill="rgb(0%, 0%, 0%)" fill-opacity="1"> +<use xlink:href="#glyph-1-0" x="555.817" y="379.3164"/> +</g> +<g fill="rgb(0%, 0%, 0%)" fill-opacity="1"> +<use xlink:href="#glyph-0-3" x="565.66934" y="379.3164"/> +<use xlink:href="#glyph-0-4" x="570.211499" y="379.3164"/> +<use xlink:href="#glyph-0-5" x="574.753657" y="379.3164"/> +</g> +<g fill="rgb(0%, 0%, 0%)" fill-opacity="1"> +<use xlink:href="#glyph-2-0" x="585.18384" y="381.67812"/> +</g> +<path fill="none" stroke-width="11.6705" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M 4188.398438 18.28125 L 4188.398438 2260.546875 " transform="matrix(0.1, 0, 0, -0.1, 0, 477)"/> +<path fill="none" stroke-width="11.6705" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M 4097.578125 2193.242188 L 4188.398438 2260.546875 L 4279.257812 2193.242188 " transform="matrix(0.1, 0, 0, -0.1, 0, 477)"/> +<g fill="rgb(0%, 0%, 0%)" fill-opacity="1"> +<use xlink:href="#glyph-1-1" x="401.703" y="244.216"/> +</g> +<g fill="rgb(0%, 0%, 0%)" fill-opacity="1"> +<use xlink:href="#glyph-0-3" x="412.0128" y="244.216"/> +<use xlink:href="#glyph-0-4" x="416.554959" y="244.216"/> +<use xlink:href="#glyph-0-5" x="421.097117" y="244.216"/> +</g> +<g fill="rgb(0%, 0%, 0%)" fill-opacity="1"> +<use xlink:href="#glyph-2-1" x="431.5273" y="246.57772"/> +</g> +<path fill="none" stroke-width="3.89017" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M 2338.046875 2525.195312 L 3188.242188 1759.726562 " transform="matrix(0.1, 0, 0, -0.1, 0, 477)"/> +<path fill="none" stroke-width="3.89017" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-dasharray="40.3767 40.3767" stroke-miterlimit="10" d="M 2488.085938 2390.117188 L 4188.398438 859.140625 " transform="matrix(0.1, 0, 0, -0.1, 0, 477)"/> +<path fill="none" stroke-width="3.89017" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(41.175842%, 0%, 9.01947%)" stroke-opacity="1" stroke-miterlimit="10" d="M 1187.851562 3560.859375 L 3630.507812 1926.601562 " transform="matrix(0.1, 0, 0, -0.1, 0, 477)"/> +<path fill="none" stroke-width="3.89017" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(41.175842%, 0%, 9.01947%)" stroke-opacity="1" stroke-dasharray="40.3767 60.565" stroke-miterlimit="10" d="M 1187.851562 3560.859375 L 5065.078125 966.757812 " transform="matrix(0.1, 0, 0, -0.1, 0, 477)"/> +<path fill="none" stroke-width="11.6705" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(64.706421%, 0%, 12.940979%)" stroke-opacity="1" stroke-miterlimit="10" d="M 1187.851562 3560.859375 L 4405.9375 1989.375 " transform="matrix(0.1, 0, 0, -0.1, 0, 477)"/> +<path fill="none" stroke-width="11.6705" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(64.706421%, 0%, 12.940979%)" stroke-opacity="1" stroke-dasharray="60.565 40.3767" stroke-miterlimit="10" d="M 1187.851562 3560.859375 L 5065.078125 1667.460938 " transform="matrix(0.1, 0, 0, -0.1, 0, 477)"/> +<path fill="none" stroke-width="7.78034" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 39.99939%, 60.00061%)" stroke-opacity="1" stroke-miterlimit="10" d="M 2563.125 2322.578125 C 2700.3125 2322.578125 2836.992188 2339.375 2970.117188 2372.539062 " transform="matrix(0.1, 0, 0, -0.1, 0, 477)"/> +<g fill="rgb(0%, 0%, 0%)" fill-opacity="1"> +<use xlink:href="#glyph-1-0" x="283.42" y="257.377"/> +</g> +<g fill="rgb(0%, 0%, 0%)" fill-opacity="1"> +<use xlink:href="#glyph-2-2" x="294.618" y="259.73872"/> +</g> +<path fill="none" stroke-width="7.78034" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 39.99939%, 60.00061%)" stroke-opacity="1" stroke-miterlimit="10" d="M 3242.773438 2186.015625 C 3242.773438 2321.171875 3229.21875 2456.015625 3202.265625 2588.476562 " transform="matrix(0.1, 0, 0, -0.1, 0, 477)"/> +<g fill="rgb(0%, 0%, 0%)" fill-opacity="1"> +<use xlink:href="#glyph-1-1" x="330.969" y="247.481"/> +</g> +<g fill="rgb(0%, 0%, 0%)" fill-opacity="1"> +<use xlink:href="#glyph-2-2" x="342.6245" y="249.84272"/> +</g> +</svg>