adxv user manual - scripps research...2010/01/09  · a brief history of adxv in 1992 the scripps...

64
1

Upload: others

Post on 05-Jul-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

1

2

Introduc,on 3 HistoryofAdxv 4 SupportedFileFormats 5 NotesforHDF5files 6 Star,ngAdxv 7 Examples 9 TheAdxvWindows 11 Control 11 Image 17 Magnify 20 Load 25 Save 31

OutputFileFormats 32

Line/Histogram 33

Info(ImageHeader) 39

Predic,ons 42

Sta,s,cs 45

SeSngs 46

Proper,es 49

Background 52

SocketInterface 54

BeamCenterFile 55

FrequentlyaskedQues,ons 56

Commandlineop,ons 58

Environmentvariables 64

Introduc,on

Adxv isaprogramtographicallydisplayandanalyze2‐Dareadetectordata. It isop,mizedtodisplayX‐Raycrystallographydiffrac,onimages.Manycommondataformatsarerecognized,includingADSCSMV/IMG,CBFandHDF5.Thedatamaybedisplayedasa1‐Dcrosssec,on,2‐Dimageor3‐Dsurface.Sequen,alimagesmaybedisplayedasananima,on.Themagnifica,on,contrastandcolormappingareadjustable.Displayed datamay be saved in a variety of formats includingASCII,SMV/IMG,TIFF,JPEGandPostscript.

AdxvwillrunonmostversionsofLinuxandOSX.ItisbasedonX11/Mo,fsoanX‐server is required. It will run on Windows if the Cygwin libraries have beeninstalledandanX‐serverisrunning.

Adxv is freely available to everyone. There is no registra,on, license or feerequiredtouseit.Youcandownloaditfrom:

www.scripps.edu/~arvai/adxv.html 

Thismanualisavailablehere:

www.scripps.edu/~arvai/adxv/AdxvUserManual.pdf  

ThecurrentversionofAdxvis1.9.10. 

3

ABriefHistoryofAdxvIn1992TheScrippsResearch Ins,tute (TSRI) gotanewMar ImagePlateScanner. Itwas a great detector, although it used the VMS opera,ng system and the displaysohware(XIPS)wasnotsogreat.SoIwroteaprogramcalledXviptodisplayimagesonourUnix (Sun)worksta,ons.Xvipwaswrijen inCandused theX11/Xviewgraphicslibraries.

Our Sunworksta,onsweremonochrome, so grayscale imageswere displayed usingdithering.Whenwegotcolorworksta,ons,ImodifiedXviptoworkwithgrayscaleandcolor.A laterversionofXvipwasgiven toMarResearch,whichevolved intowhat isnowtheirMarViewdisplayprogram.In1993, incollabora,onwithADSC,IcreatedaversionofXvipwhichwasbejersuitedforSAXSdata.ThisprogramwascalledMarvip.In1994IcombinedthebestfeaturesofXvipandMarvipintothefirstversionofAdxv.ThiswaswrijenwiththeX11/Mo,flibraries.OvertheyearsAdxvhasslowlyevolvedby adding more features, suppor,ng more data formats and suppor,ng the latestcomputersandopera,ngsystems.

Adxv.Thereisnosubs,tute.

Xvip,circa1993

4

Format 

ADSCSMV/IMG(16and32‐bitinteger) .img

Bruker .sfrm

CBF(Standardand“mini‐CBF”) .cbf

EDF .edf

FujiImagePlate .fuji

HDF5 .h5/.hdf5

MarCCD .mccd

MarImagePlate .image/.marxxxx

NUMPY .npy

R‐AXIS .osc

TIFF (8, 16, 32 Bits/Pixel with 1 Sample/Pixel) .tif / .tiff

Rawbinary(8,16,32‐bitintegerand32‐bitfloat) any

Adxvspotfile .adx

Cheetahpixelmapfile .h5

CrystFELgeometryfile .geom

Denzo.xfile .x

SupportedFileFormats

File Extension 

Adxvrecognizesmanyfileformatsbasedonthefileheader,sothefileextensioncanbeanything.Fileswhichhavebeencompressedwithgzip,compressorbzipmaybereadwithoutuncompressingthem.

The internal data representa,on of Adxv is 32‐bit signed integer. If an input dataformat isfloa,ngpoint and thedata valuesare very smallor very large, youmaywant to runAdxvwith the–iscale command lineop,on tomul,ply thedatabyascalefactorbeforeconversiontointeger. 5

6

HDF5 files are containers for two kinds of objects ‐ Datasets and Groups. Datasetscontain multidimensional arrays of data and Groups are container structures which may contain Datasets or other Groups. Groups are analogous to directories and Datasets are like files.

BydefaultAdxvwilltrytoopenthefollowingDatasetsinanhdf5file:

/data/data/data/intensi,es/real/entry/data/entry/data/data/entry_1/data_1/data/entry_1/image_1/data/entry_1/instrument_1/detector_1/data/entry/instrument/detector/data

If none of these are found, the InfoWindow is raised and you can examine the fileheader tofind thedatasetname. You caneitherdouble‐clickon thedatasetornext,meyoucanstartAdxvwith:

adxv‐hdf5dataset<datasetname>

NotesforHDF5files

IntheInfoWindowtotheright,thedatasetnameis/entry/data/data

An hdf5 file may contain mul,pledatasets, each of which will behighlightedinaboldfontintheInfoWindow.

For more informa,on about hdf5files see page 29 (Load Window)andpage41(InfoWindow).

Star,ngAdxv

TheusagetostartAdxvfromthecommandlineis:

 adxv [op>ons] [file [predic>ons]] 

Theop,onswhichmaybe specifiedon the command line are listed star,ngonpage58.Followinganycommandlineop,onsisthenameofanimagefiletoload.Ahertheimagefile,afilewithspotposi,onsmayalsobespecified.

Forexampletodisplayanimageyoucando:

 adxv test_1_001.img 

Twowindowswillappear‐theControlWindowandtheImageWindow.TheImageWindow graphically displays the image using a grayscale colormap. Larger pixelvalues are darker and smaller pixel values are lighter. As the mouse is movedaround the Image Window, the posi,on of the cursor is displayed in bothmillimeters and pixels. The resolu,on (in Angstroms) and I/Sigma of the regionunderthecursorarealsodisplayed.

Inthe ImageWindow,theLehmousebujonmaybepressed,draggedandthenreleasedtoproducea1‐dcross‐sec,onplot.Thisplotwillbedisplayed inanewLineWindow. Themiddlemouse bujonmay be pressed and dragged to "pan"around the image.Pressing the rightmousebujonwillmagnifyanddisplay theareaunderthecursorinaseparateMagnifyWindow.

7

The Control Window may be used to modify the appearance of the displayedimage. In the center of this window is a graphical display of the pixel to colormappingandimmediatelytotherightofthisisaver,calslider.Draggingthesliderwilladjustthecontrastoftheimage.Pixelvalueslargerthanthevalueinthetextboxabove the slideraredrawnasblack (or the top color in the colormap), andpixel values smaller than the value below the slider are drawn aswhite (or thebojomcolorinthecolormap).Thereareradiobujonstoadjusttheimagescale,and colormap. The default Scale is Auto and this will scale the image so it fitsinsidetheImageWindow.If100%isselected,theneachpixelintheimagewillbedrawnas1pixelon the screen. If 50% is selected, theneveryotherpixel in theimagewillbedrawn.Thereare3choicesforcolormap(Gray,HeatandRainbow).Eachofthesemaybeinverted.ForexampleiftheGraycolormapisinverted,thenlargepixelsareWhiteandsmallpixelsareBlack.

The magnifica,on factor used to display data in the Magnify Window may beadjusted from 1 to 128. If this is set to 8, then each pixel in the imagewill bedrawnasan8x8pixel in theMagnifyWindow.Thedata in theMagnifyWindowmaybedisplayedasValues,Pixelsor3‐D.IfValuesisselected,thenonlynumberswill be displayed. If Pixels is selected, then a magnified view of the pixels isdisplayed. If 3‐D is selected, the data is displayed as a three‐dimensional wiremesh.

OtherAdxvwindowscanbeaccessedfromtheControlWindow.ClickingwiththeLehmousebujononthemenubaratthetopoftheControlWindowwilldisplayamenuwithchoicesofWindowstodisplay.Eachofthesewindows,aswellastheControlWindowandImageWindow,willbeshownandexplained inmoredetaillater.

IftheControlWindowisnotvisible,simultaneouslypressingthe<SHIFT>keyandthe right mouse bujon in either the Image or Magnify Window will raise theControlWindowtothetop.

8

Examples

Displayanimageandoverlayspotsfroma.adxfile:

 adxv Thau2_1_031.img Spots.adx 

Drawresolu,onringsat4specificresolu,ons:

adxv ‐rings 8 3.5 2 1.5 trypsin_2_001.img 

Display1152x1152binaryunsignedshortdata,skip2048byteheaderandswapbytes:

 adxv ‐ushort ‐nx 1152 ‐ny 1152 ‐skip 2048 ‐swap test_001.raw 

Displayanimageanddenzopredic,ons:

 adxv nnos6_1_001.img nnos6_1_001.x 

SpecifyanexactvisualidanduseOpenGLforthe3‐Ddisplay:

 adxv ‐visual 0x26 ‐gl 

ReadanHDF5fileandspecifywhichdatasettodisplay:

 adxv ‐hdf5dataset /entry_1/image_1/data cxidb‐3.cxi 

ConvertanimagefromCBFtoIMG:

 adxv ‐smv32bits –sa G8_1_00001.cbf G8_1_00001.img 

9

Automa,callysaveanimageasa1/10scalejpegfile:

 adxv ‐sa ‐jpeg_scale 0.1 nnos6_001.img nnos6_001.jpeg 

Cropa100x100pixelregion,wheretheupperlehcornerisatx=200,y=300,fromanhdf5fileandsaveitasa32‐bit.imgfile.

 adxv –smv32bits ‐sa ‐sa_crop 100x100+200+300 dark.h5 dark.img 

DisplayCSPADdataanduseaCrystFELdetectorgeometryfiletocorrecttheimage:

 adxv ‐pixelmap cspad.geom CxiDs1‐image.h5 

DisplayCSPADdataanduseaCheetahpixelmapfiletocorrecttheimage:

 adxv ‐pixelsize 0.110 ‐pixelmap pixelmap.h5 CxiDs1‐image.h5 

Usealargerfontfortheresolu,onrings.Thiswillhelpifyouhavealargeimage,scaleto100%andthensaveasjpgor,ff:

 adxv ‐rings ‐rfont "‐*‐lucidatypewriter‐bold‐r‐normal‐sans‐180‐*‐*‐*‐*‐*‐*‐*” 

Here’sashortscripttomakeamoviefromaseriesofimages:

 #! /bin/csh  

 foreach i ( lyso_*.img  ) 

 adxv ‐sa $i /tmp/$i:r.jpg 

 end 

 ffmpeg ‐r 25 ‐i /tmp/lyso_%03d.jpg ‐vb 20M lyso.mpg 

10

TheControlWindow

Adjusts the scale of the image in theImageDisplayWindow. Whenthescaleis100%,everypixel isdisplayedsothat1 pixel in the image is 1 pixel on thescreen.Whenthescaleis25%,every4thpixel in the image is displayed on thescreen. For example if the image is3072x3072 pixels and the scale is 25%,then the imagedisplayedon the screenwill be 768x768 pixels. When Auto isselected, the image is scaled so it fitsinside the ImageWindow. The scale iscalculated as the width of the imagedivided by the width of the ImageWindow. For example if the ImageWindowis600pixelswideandtheimageis 3072 pixels wide the scale will be600/3072=0.195.

Seeexamplesbelow.

11

The top row contains a menu bar.Selec,ngoneofthesemenubujonswilldisplay a pull downmenu. The items inthesepulldownmenuswillbediscussedlater.

Auto 25%

50% 100%The ImageWindowshowing the same imagedisplayedatdifferent scales.Whenthe scale is 25% or larger the image does not fit completely inside the ImageWindow. In thiscase,youcanpressandhold theMiddlemousebujontomovetheimagearound.Thebeamcenterisdrawnasaredcrossineachimage.

12

Adjusts the colormap of the imagedisplayed in the Image and MagnifyWindows. For example with Heat, largerpixelvaluesarelightYellow,intermediatevaluesareOrangeandsmallervaluesaredarkRed.

This inverts the colormap. For example, with Gray,largerpixelvaluesareBlack.WhenInvertisselected,largerpixelvaluesareWhite.

Seeexamplesofdifferentcolormapsbelow.

13

Heat Rainbow

Gray+InvertGray

Rainbow + Invert Rainbow

Heat Heat + Invert 

Gray Gray + Invert 

The Image Window showing different colormaps 

14

Pixel  values  larger  than  this  value  are drawn as Black. This may also be set and displayed in the Histogram Window.

If  the Right mouse button  is pressed  in  the colormap drawing area,  this popup  menu  appears.  Selecting  “Fix  Contrast”  will  not  automatically update  the  contrast  setting  for  each  image as  it  is  loaded. The Max and Min contrast settings will remain as from the last image loaded or as set by  the  user.  This  may  also  be  set  in  the  Settings  window.  When  Fix Contrast  is  set,  the Max and Min contrast values  in  the  textboxes  to  the right will be drawn in a Bold font.

Graphical  display  of  pixel  value  vs. color mapping.    For  example  a  pixel value  of  360  will  be  drawn  in medium gray and a pixel value of 120 will  be  drawn  in  light  gray.  The Middle mouse button may be pressed and  dragged  in  this  window  to stretch and adjust the colormap. The behavior is analogous to stretching a rubber  sheet.  Selecting  a  different colormap  or  moving  the  contrast slider will reset the colormap.

Slider  to  adjust  the  contrast. Dragging  this  up  increases  the contrast  and  dragging  it  down decreases the contrast.

15

Pixel  values  smaller  than  this  are drawn as White. May also be set and displayed in the Histogram Window.

This selects how data  is displayed  in the  Magnify  Window.  If  3­D  is selected  the  data  is  displayed  as  a wire mesh. Pixels displays magniQied pixels  and  Values  prints  only numbers. See examples on Page 22.

Information about the image which was loaded. MaxI is the largest pixel value in the image.  AvgI  is  the  average  pixel  value. Over4lows  is  the  number  of  pixels  which have overQlowed the linear range of the detector. Spots is the number of groups of contiguous  pixels  which  are  overQlowed,  i.e.  each  “spot”  may  contain  multiple overQlowed  pixels.  Scale  factor  is  how  much  the  image  was  scaled  to  Qit  in  the Image Window when the Scale mode is Auto. In this case the image is 19% the size of the entire image, so about every 5th pixel is displayed. 

If Adxv is started with the –verbose Qlag, more  information is printed: 

‐ The x,y position of the smallest and largest pixels ‐ The number of ‐1 and ‐2 pixels ‐ The standard deviation (sigma) of all the pixels 

MagniQication factor of pixels drawn in the  Magnify  Window.  8  means  that each pixel in the raw data is magniQied 8 times and is drawn   as an 8x8 pixel box in the Magnify Window. The range of magniQications is from 1 to 128. See examples on Page 21.

There  is  more  information  about magniQication types and factors  in the Magnify Window section (page 20).

16

TheImageWindow

The The ImageWindow graphically displays the image using a grayscale colormap.Larger pixel valuesare darkerandsmallerpixelvaluesarelighter. AsthemouseismovedaroundtheImageWindow,theposi,onofthecursorisdisplayedinbothmmandpixels.Theresolu,on(inA)andtheI/Sigmaoftheregionunderthecursorisalsodisplayed. The beam center is drawn as a red cross in both the Image andMagnifywindows.

Thelehmousebujonmaybepressed,draggedalongthewindowandthenreleasedtoproducea1‐dplot inaseparateLineWindow. Themiddlemousebujonmaybepressed and dragged to "pan” the image if the image does not fit in the window.Pressingtherightmousebujonwillmagnifyanddisplaytheareaunderthecursorinaseparate Magnify Window. If the <SHIFT> key and Right mouse bujon are pressedsimultaneously, the ControlWindowwill be raised. If themouse has a scroll wheel,theninPixels and3‐D modethescrollwheelcanbeusedtoadjustthemagnifica,onfactorintheMagnifyWindowfrom1to128.

Ifthe<SHIFT>keyandLehmousebujonarepressedsimultaneously,aposi,onontheimageisselected.Oncethreeposi,onshavebeenselected,theanglebetweentwo consecu,ve lines described by those three posi,ons will be printed to thestandardoutput.Iftwoofthethreeposi,onsareiden,cal,thehorizontalandver,calangle(rela,vetothecrystalorigin)betweenthetwopointsisprinted.Ifallthreepointsare iden,cal, thehorizontal and ver,cal angle requiredtorotate thatpoint to thebeamcenterisprinted. Theseop,onswereusefulinthe old days tomeasure theanglesofalaSceores,matehowfartorotateacrystaltoalignazone.

If the <SHIFT> key andMiddlemouse bujon are pressed simultaneously, the beamcenterwillbesettothecursorposi,on.ThismayalsobedoneintheMagnifyWindow.

With the cursor is in the ImageWindow, twonumbers followedbya carriage returnmaybe typedand theMagnifyWindowwillbe raisedandcenteredon that x,ypixelposi,on. If theRightmousebujonispressedwhilethe<SHIFT>key isalsopressed,thenthedistancebetweensuccessiveclicks (inpixelsandmm)willbeprintedto theterminal.

17

Image showing resolution rings. Notice that the beam center is drawn as a red  cross.  For  this  image 2‐theta  is non‐zero,  so  the  resolution  rings  are not  circular.  Resolution  rings may  be  turned  on  or  off  in  the  Properties Window, which  is discussed  later. The  font used  for  the rings may be set with the –rfont command line option. If you want to draw only the rings, without the resolutions printed, you can use the –rings_only command line option. Rings may also be drawn at specific resolutions with the –rings command line option. 

18

f  RaisetheLoadWindow.TheFileLoadWindowisdisplayed.

h  Adjust thehistogramcontrast in the ImageWindow.Thecontrastof the visible  por>on of thedataintheImage Windowisautoma,callyadjusted.Notethatiftheen,reimageisnotvisible,onlythepixelsvisibleintheImageWindowareusedtoadjustthecontrast.

l  Toggle ligh,ng on and off in the Magnify Window. When using OpenGLgraphics,thiswilltoggleturningligh,ngonandoff.

m  AdjustthehistogramcontrastintheMagnifyWindow.ThecontrastoftheMagnifyWindowisautoma,callyadjusted.

P|p  Toggle turning predic,ons on and off.When predic,ons are displayed, this willtoggledisplayingthemornotdisplayingthem.

r  Resetthedisplayinthe3‐dmagnifywindow.Theposi,onandorienta,onof thedatainthe3‐dmagnifywindowisresettoitsoriginalstate.

s  TogglesmoothingintheMagnifyWindow.WhenusingOpenGLgraphicsinlinemode (‐gl_lines), thiswill toggle between drawing thewiremeshwith smoothlines (slower) or aliased lines (faster).When a surface is displayed this willtogglebetweendrawingaliasedandan,‐aliasedpolygons.

w  Toggle between wiremeshand surfacedisplay in theMagnifyWindow.WhenusingOpenGLgraphics,this will togglebetweenawiremeshandsurfacedisplayofthedata.

Arrow Keys  Adjustthecursorposi,on.Pressing the arrowkeys (up, down, leh,right) willmovethecursorbyonepixel. Ifthe Plot Type is Circle (set underEdit‐>Proper,es),thearrowkeyswilltranslatethecenterofthecirclebyonepixel.

?  Printhelp.Thiswillprintasummaryofthekeyswhichmaybepressed.

<SHIFT> + Middle mouse bulon 

Setthebeamcentertothecurrentcursorposi,on

<SHIFT> + Right mouse bulon 

Raises the Control Window. Also prints the distance between successive Rightmousebujonclickstotheterminal.

The following keys may be typed while the  cursor  is  in the Image Window 

19

TheMagnifyWindow

The Magnify Windowdisplaysamagnifiedpor,onofthedatafromtheImageWindow.Pressing the right mouse bujon in the Image Window draws a box and displays amagnifiedviewofthedatawithinthatboxinaseparateMagnifyWindow.Theformatofthe displayed data may be selected by toggle bujons in the Control Window (seeexamplesbelow).Thedefault is"Pixels"whereeach pixel in the image isscaledbyamagnifica,onfactoranddisplayed.Ifthemagnifica,onfactoris32orlarger,thevalueofeachpixelwillalsobeprintedwithineachpixel.If"Values"isselectedthenonlypixelvalues will be printed, not a magnified image. If "3‐D" is selected then a threedimensionalwiremeshrepresenta,onofthedatawillbedisplayed.Thefunc,onofthemousebujonsisdifferentwiththedifferentdisplaymodes.

InValues modetheLehandRightmousebujonshavenoeffect.TheMiddlemousebujonwillpanthedisplayeddataaroundtheimage.

InPixels modetheLehmousebujonwilldrawalineorcircle (depending on the PlotTypeseSngintheProper,esWindow).TheMiddlemousebujonagainpansaroundtheimageandtheRightbujonhasnoeffect.

In 3‐Dmode the Lehmousebujon rotates thewiremesh. TheMiddlemousebujontranslates themesh (inX‐Y) within theMagnify Window. TheRightmousebujon isusedtoscalethewiremeshintheZdirec,on.IfControl‐Right mouse bujonispressedthiswillscalethewiremeshinalldimensions.

Ifthemousehasascrollwheel,theninPixels and3‐D modethescrollwheelcanbeusedtoadjustthemagnifica,onfactorfrom1to128.

If Adxv is started with the ‐gl command line, thenOpenGLgraphics isused for3‐Dmode.

20

x1 x2 x4

x8 x16 x32

x64 x128

Magnify  Window  as  the magniQication  increases from  1  to  128.  The magniQication  mode  is Pixels.

21

Notice that when the magniQication is 32 or larger, the pixel values are printed in each pixel. Depending on the number of digits needed for each value, a larger or smaller font may be used so that the value will Qit within a pixel . For Values the magniQication setting is disabled. The magniQication depends on how many pixels can be Qit in the Magnify Window and is usually about 32.

Comparison between Pixels, 3­D  and Values.

22

3­D Pixels

Pixels Values

The  same data  is  shown with MagniQication  set  to  Pixels  (left)  and 3‐D  (right). The magniQication is 4 in both cases.

The Magnify Window when using GL (­gl command line option)

Pixels. The colormap is Heat.

3‐D  Wire  Mesh.  Type  “w”  to  toggle between wire mesh and surface display.

3‐D  Surface.  Type  “l”  to  toggle  lighting on and off.

23

l  Thiswilltoggleturningligh,ngonandoff.

r  Theposi,onandorienta,onofthedatainthe3‐DMagnifyWindowwillberesettoitsoriginalstate.

S  Inlinemode(‐gl_lines),thiswilltogglebetweendrawingthewiremeshwith smooth lines (slower) or aliased lines (faster).When a surface isdisplayed this will toggle between drawing aliased and an,‐aliasedpolygons.

w  Thiswilltogglebetweenawiremeshandsurfacedisplayofthedata.

?  Printhelp.Thiswillprintasummaryofthekeyswhichmaybepressed.

The following keys may be typed in the Magnify Window 

The following keys may be typed when using OpenGL graphics (‐gl) 

f  RaisetheLoadWindow

h  Adjustthecontrasttoop,mizedisplayofthecontentsoftheMagnifyWindow

p  Toggledisplayofspotson/off

r  Resetorienta,onof3‐Ddisplay

Arrow Keys  Adjustthecursorposi,on.Pressingthearrowwillmovethecursorbyonepixel.

?  Printhelp.Thiswillprintasummaryofthekeyswhichmaybepressed

<SHIFT> + Middle mouse bulon 

Setthebeamcentertothecurrentmouseposi,on

<SHIFT> + Right mouse bulon 

PrintsthedistancebetweensuccessiveRightmousebujonclickstotheterminal

24

TheLoadWindow

ThiswindowisaccessedbyclickingFile‐>Load fromtheControlWindowandis used to  load  Qiles.  Image  Qiles,  Adxv  spot  (.adx),  denzo  output  (.x)  and  CrystFEL geometry (.geom) Qiles may be loaded. 

Regular expression(s) to Qilter which Qiles are listed in the scrolling window to the right. Some examples of patterns: 

*0.img [A‐C]*.h5 lys3_?_*.cbf 

If Pattern is blank or *, all Qiles are listed. Directories are always listed. 

Typing a carriage return will re‐scan the Directory for Qiles matching the Pattern. 25

Pressing  the  List button will  list all  Qiles which  match  the regular  expression  in the Pattern text Qield.  

About 20000  Qiles may be  listed  at  once. However,  if  there  are too many Qiles, you can list every 100’th Qile by making the pattern 

 *01.img 

Directory where Qiles are located 

Directories are listed Qirst, followed by Qiles. Directory names have a trailing “/”. 

Single‐clicking  a directory will  change  into  that directory.  Clicking  the  “..”  directory will move one directory up. 

Double‐clicking on a Qile will load and display that Qile.  

Pressing  the  Right mouse  button  in  the Qile  list  section  brings up  a  menu  where  you can choose to sort Qiles alphabetically  or  by modiQication  time.  The default is alphabetical. 

26

Load  and  display  the Qile  in  the  text  Qield  to the left. 

You  can  type  a  Qile  name  into  this  text  Qield  or  select one with the mouse from the list on the right. To load a Qile  you  can  either  click  the  Load  button,  type  a carriage return in the text Qield or double‐click on the Qile in the list on the right

Whenfilesarelisted,theyarenotsortedabsolutelyalphabe,cally.Sor,ngalsotakesintoaccountrunnumbersandthesearesortedfromsmalltolarge.Forexample,filesaresortedlikethis:

data_1_001.imgdata_2_001.imgdata_10_001.imgdata_11_001.img

notlikethis:

data_10_001.imgdata_11_001.imgdata_1_001.imgdata_2_001.img

WhenSort by Timeisselected,morerecentfilesarelistedfirst,regardlessoffilename.Directoriesares,lllistedfirst.

Tore‐scanfilesinadirectory,presstheListbujonortypeacarriagereturninthePajerntextfield.

27

Movie mode. Continually load and display the next Qile. Press again to stop. In this case the Stride is 5, so every 5’th Qile (8, 13, 18, etc) will be continually loaded and displayed.  If  Qiles are displayed  too quickly, a pause can be added between  them with the –delay command line option.

Load  and  display  the  next  Qile.  In  this  case,  the  next  Qile  to  load  will  be C3_1_00013.img. This is because the current Qile is number 8 and the stride is 5. If instead the  left (previous) arrow button is pressed,  then Qile number 3 would be loaded. 

When  a  new  Qile  is  loaded,  if  the  Line  or Magnify Windows  are  displayed,  their contents will  be  updated  to  reQlect  the  data  in  the  new  Qile.  This  also  applies  to movie mode. 

Specify  every  n’th Qile  to  load.  For example  if  the Stride  is  10,  then every 10’th  Qile will be  loaded.  If  the Stride  is  1,  then every  Qile  will  be loaded.

28

With  three‐dimensional hdf5 data,  the Load Window will automatically show two additional  text  Qields  and  a  checkbox.  These  are  used  to  select  which  slab(s)  to display. 

Number  of  slabs  to combine  and  display. If  Slabs  is  5,  then  5 slabs are summed and displayed.  How  to combine  slabs  (sum or  average)  may  be speciQied  in  the Properties Window.

If  this  checkbox  is  checked,  then  the  forward  and  backward  arrows  will display  the  next  slab  of  data,  not  the  next  Qile.  For  example  if  you  are displaying  slab #1,  the  stride  is  3,  and you  click  the  forward arrow button, then slab #4 will be displayed.   If there are no more slabs, then the next Qile will be displayed. 

Specify the Qirst slab to display. Each slab is a 2‐d array of data. If the data is 100x2527x2463 pixels,  then there are 100 slabs of data, where each slab  is 2527x2463 pixels.

29

Here a Qile (G4_2_00001.h5) is loaded which contains a total of 5 slabs. The Qirst slab  to display is 2 and the number of slabs to combine is 3. Thus, slabs 2‐4 are combined and displayed.

The title bar of the Image Window shows that slabs 2‐4 are displayed out of a total of 5 slabs in the Qile.

30

Directory and File where the saved data will be written.

Selects which window data will be saved from.

Selects which format the data will be saved as.  See Output File Formats (below) for more information about these choices.

31

TheSaveWindow

Thiswindow isaccessedbyclickingFile‐>Save  in theControlWindow.Data  from the Image, Magnify and Line windows may be saved to a Qile in various formats. The Line window may display either a histogram or a  1‐d cross section of the data. Whichever is displayed in the Line window will be saved. 

OutputFileFormats

For the Image andMagnify Windows, the output is NX columns and NY rows,whereNX is thewidth (inpixels) andNY is theheight. For example, here is theoutputofa5x5pixelregiondisplayedintheMagnifyWindow:

443462387439413439215615664724254882560019114757420451563609483431396415410440424

FortheLinewindow,thereisashortheader,followedbypairsofX,Yvalues,whereXisthedistance(inpixels)andYisthevalue.Forexample:

#Linefromimage:/home/arvai/test_images/pilatus.cbf#Start:12801119#End:12901119#Linewidth:1#Interpola,on:1#0406.0000001469.0000002449.0000003488.000000425600.000000519114.0000006420.0000007410.0000008393.0000009434.000000

Notethatthex‐coordinate(distance)isrela,vetotheStartposi,onintheheader.

• Ascii

32

Thisisonlyanop,onfortheImageWindow.Theen,reimageiswrijen,regardlessofhowmuch isvisible.Theoutputformat isADSC imgformat.There isanASCIIheaderwhichlookslikethis:

{HEADER_BYTES=512;DIM=2;SIZE1=2463;SIZE2=2527;TYPE=unsigned_short;BYTE_ORDER=lijle_endian;DISTANCE=80.001;PIXEL_SIZE=0.172000;WAVELENGTH=0.980800;}^L

Theheader ispadded toHEADER_BYTESbytesand is then followedby the rawdata,whichis16‐bitunsignedshprt.Theoutputdatawillbesigned32‐bitintegerifAdxvisstartedwith the –smv32bits command line op,on. In this case theheader is slightlydifferent,with:

TYPE=long_integer;

• Binary

33

Images may also be converted to and saved as .img files with the –sa command line option. See examples on pages 9 and 10.

Here is a library and documentation to read/write ADSC SMV/IMG files:

http://www.scripps.edu/~arvai/adxv/data/smv.tar.gz

Taggedimagefileformat.

• Postscript

Writes level2 color postscript. If Adxv is startedwith the –level1 command lineop,on,thenlevel1postscriptwillbewrijen.

• Tiff

StandardJPEGformat.

• Jpeg

34

TheLine/HistogramWindow

The horizontal scale ismillimeters and the ver,cal scale is pixel value. The totallength of the displayed data (in millimeters) is shown in the upper right. Anes,mateofthecrystal laScelengthbasedondistancebetweenadjacentpeaksisalsoshown.

The Line Window displays a 1‐D cross‐sec,on plot of data from the Image orMagnifyWindows.Pressinganddraggingthelehmouse bujonin the ImageorMagnifyWindowwilldrawarubberbandline.Whenthemousebujonisreleased,thedataselectedbythatlinewillbedisplayedasa1‐DplotintheLineWindow.

Totallengthofdata(millimeters).

Thisspotspacing,correspondstothisreciprocallaScespacing.

Pressing theLehmousebujonwilldisplay theXandYcoordinates.PressinganddraggingtheMiddlemousebujonwilladjustthever,calscaleoftheplot

35

Magnifying a region of an image, and then plorng a cross‐sec>on through it.  

36

Overloaded pixels are drawn in Yellow. No>ce the cross‐sec>on has a flat top. 

37

The LineWindowmay also display a histogram of the data in the Image orMagnifyWindows. This is selected from the View‐>Histogram pulldown menu in the ControlWindow.ThehistogramofeithertheMagnifyWindow(View‐>Histogram‐>Magnify)ortheen,reimage(View‐>Histogram‐>Image)maybeselected.

Thehorizontalscaleispixelvalueandthever,calscaleisnumberofpixels.

Twover,caldashedlinesaredrawnatthepixelvaluesdisplayedaboveand belowthecontrast sliderintheControlWindowandrepresenttheminandmaxpixelsvaluesinthecolormap.Valuesbelowtheminpixelvaluearedrawnaswhiteandvaluesabovethemaxvaluearedrawnasblack.Pixelvaluesintermediateto thesevaluesaredrawnasagrayscale

The LehMouse bujon can beused to adjust the min pixelvalue slider and the RightMouse bujon will adjust themax value. TheMiddle mousebujon will adjust the ver,calscaleoftheplot.

Asmallredcrossisdrawnatthehorizontalposi,onofthecursor.TheX‐andY‐valuesofthiscoordinatearedisplayedintheupperright.Thelehandrightarrowkeysmaybepressedtomovethecursor1pixelineachdirec,on.

38

TheInfoWindow

ThiswindowisaccessedbyclickingView‐>Image Header  intheControlWindow.Thiswillshowtheimageheaderforthedisplayedimage.Belowaresomeexampleimageheadersforvariousimageformats.

mini‐CBF 39

ADSC img

Bruker

40

NUMPY

Mar CCD

EDF

HDF5

Withanhdf5file,headerentrieswith2ormoredimensionsaredisplayedinaboldfont.Ifyoudouble‐clickoneofthesewiththeLehmousebujon,thenAdxvwillloadthatdataset.Adxvwillalsorememberthedatasetnameandwilltrytoloaditfromfuturehdf5files.

41

Dataset name. If star,ng Adxvwiththe-hdf5dataset command line argument, this is the name you would use.

Dimensionsofthedataarrayinpixels.

Data type. In thiscase,F32LEis floa,ng point, 32‐bit, lijleendian.

Filter(ifany)neededtodecompressthedata.Inaddi,onstothestandardHDF5filters,AdxvwillalsorecognizetheLZ4filter.

Double‐clicktoloadthisdataset

ThePredic,onsWindow

This window is accessed by clicking View‐>Predic>ons  in the Control Window.Spotscanbeautoma,callyormanuallypickedanddisplayed.

Max  #  of  Spots  specifies the maximumnumber of spots to find. All the foundspotsaresortedbasedonI/Sigmaandthelargestaresaved.IfMaxissetto0,thenallspotsarekept.

Min  I/Sigma  saves only spots larger thanthespecifiedI/Sigma.

Min. Spot Spacingsavesonlythelargeroftwospotsiftheyaretooclose.Distanceisinpixels.

Ignore Ice Rings willnotusespotsnearicerings.

Fast  Peak  Search  uses a different peaksearchalgorithm.

Avoid Zero Pixels ignoresspotsnearpixelswhichhaveavalueof0

When Find  Peaks  is clicked, spots will besearched, saved inafiles calledpeaks.file and then displayed on the image with aboxaroundeachspot

42

The first line of thepeaks.file file is “DPS‐PF A1.0”. This is followed bypairsofY,Xvalues.Forexample:

DPS‐PFA1.0614.36796.76542.30798.36579.09791.72672.28573.30...

If Adxv is started with the –peaks_adx command line op,on, then apeaks.adx fileisalsowrijen.ThiscontainsX,Y,I/Sigma:

796.76614.36362.67798.36542.30231.83791.72579.09202.38573.30672.28172.72...

Inbothcases,theX,Yvaluesareinpixels.

Both the peaks.file and peaks.adx files are recognized by Adxv as spotfilesandmaybeusedtodisplayspotposi,ons.Forexample:

 adxv test_1_001.img peaks.file 

or

 adxv test_1_001.img peaks.adx 

43

Add  Peaks  – Select this to manually addspots. Click on a spot in either the ImageorMagnifyWindowswith the Lehmousebujontoaddaspot.

Spot Info –ClickingonaspotdisplaystheX and Y posi,on of the spot in the textboxesbelow.

Remove  Spots  – Clicking on a spot withtheLehmousebujonwillremoveit.

Whenadenzo.xfile is loaded,clickingona spot with the Leh mouse bujon willdisplaytheHKLandX,Yvalueofthatspot.

ThedisplayedX,Yvaluemaybeselectedtobemmorpixels,buttheoutputpeaks.fileisalwayspixels.

Un‐checkingthisboxwillturnoffthedisplayofspots.Sameastyping“p”intheImageorMagnifyWindows.

44

TheSta,s,csWindow

ThiswindowisaccessedbyclickingView‐>Sta>s>cs intheControlWindow.

WhentheRightmousebujonisclickedineithertheImageorMagnifyWindows,sta,s,csofdatainaboxcenteredonthemouseposi,onarecalculatedanddisplayed.

Box Size specifiestheareaoftheregionoverwhichtocalculatesta,s,cs.IftheareaoftheBoxis0,thenallthepixelsintheMagnifyWindowareused.

TheCenter of MassisdisplayedinbothPixelsandmm.

TheAverage pixelvalueaswellastheStandard Devia>on arecalculatedanddisplayed.

45

TheSeSngsWindow

ThiswindowisaccessedbyclickingEdit‐>Serngs intheControlWindow.Distanceand Pixel Size are in millimeters,Wavelength is in Angstroms and 2‐Theta is indegrees.Thebeamcentermaybeenteredanddisplayedinpixelsormillimeters,dependingontheseSngoftheadjacentradiobox.

Whenanewimageisdisplayed,thesevaluesmaybeoverwrijenbyvaluesintheimageheader.Toavoidthisandkeepthevaluesastheyare,checktheboxunderFixandnexttotherelevantparameter

Here theWavelength is fixed,soavalueread in fromanewimagewillnotchangethis.

46

2‐theta may be Horizontal orVer,cal.WhenHorizontal, thedetector rotates about aver,calaxisandwhenVer,calthe detector rotates about ahorizontalaxis.

When Small Spots is checked,there is more smoothing of theimage displayed in the ImageWindow. If spots are small andevery n’th pixel is simplydisplayed without smoothing,then some spots may not bevisible. This only affects thedisplayintheImageWindow,not the Magnify Window. Seeexamplesonthenextpage.

When Fix Contrast is checked, the image contrast is not automa,callyadjustedforeachimageasitisloaded.ThemayalsobesetfromapulldownmenuselectedbyclickingtheRightmousebujon inthecolormapdrawingareaoftheControlWindow.

Theposi,onofthebeamcentermay be moved by 1 pixel byclicking the appropriate arrowbujon

The coordinates of the beamcenter may be entered anddisplayed in the text boxes tothe leh in either millimeters orpixelsbyselec,ngmmorpixels,respec,vely.

47

Effect of smoothing on an image which is scaled to 50%

No  smoothing  (every  other  pixel  is displayed).  This  can  be  selected  with the –nosmooth command line option.

This  is  the  default  setting.  There  is  no smoothing when the image is scaled   to 100%  and  there  is  progressively  more smoothing  as  the  image  scale  is decreased.

More  smoothing  (about  twice  the default).  This  can  be  selected with  the   –small_spots  command  line  option  or by  checking  the    Small  Spots  checkbox in the Settings Window.

TheProper,esWindow

Thiswindow isaccessedbyclickingEdit‐>Proper>es  in theControlWindow.Theupper setofproper,esaffect thedisplayof theLineWindowand the lower setaffectthedisplayoftheImageWindow

Numberofpixelsorthogonal to thelinedirec,onwhichareaveragedtoform each point displayed in theLineWindow.

Numberofpointsdrawnperpixeloflength.

Whenapointfallsbetweenpixels,it’svaluemay be either the closest pixelorinterpolatedfromclosepixels.

The line may be displayed asindividual points, a line connec,ngpoints, or a stair‐step centered oneachpixel.

49

The Leh mouse bujon will selectthecenterofacircle.Asthemouseis dragged, the radius of the circleincreases.When themouse bujonisreleased,acirculararcofdatawillbe drawn, from 0 to 360 degreesaround the circle. The plot iscounter‐clockwise star,ng from therightside.

Same as above, except the edge ofthecircleisselectedandthemouseisthendraggedtoselectthecenter.

As above, the center of a circle is selectedwith the Lehmouse bujon and themouseisdraggedtoselecttheradius.Thehorizontalaxisoftheplotisradius(i.e.distance from the centerof the circle). The valueat each radius is the circularlyaveragedpixelintensityatthatradius.MaybeusefulforSAXS.

The plotwill be a straight line, where the first point is selectedwith the Lehmousebujon.Themouseisthendraggedandtheendpointiswherethemousebujonisreleased

50

Draw circles on the ImageWindowshowing the resolu,on.Default is5circles. See the –rings and –rfontcommand line flags for moreop,ons. Notethattheseresolu,onringsarenotcircularwhen2‐thetaisnon‐zero. When Anchor1 isselected,acircleisdrawnaboutthebeamcenter,throughthenextpointselected with the Leh mousebujon.Thediameterofthisringwillchange as the beam center ischanged.ThisisusefulforfiSngthebeam center from ice rings orcheckinganisotropicscajering.

Number of colors to use for thecolormap when displaying theimage.

51

Selects how to combine slabswhenmul,pleslabs fromanhdf5filearedisplayed.

TheBackgroundWindow

ThiswindowisaccessedbyclickingEdit‐>Background  intheControlWindow.Youcandisplaythebackgroundofanimageaswellassubtractordividethebackgroundfromanimage.Thismayalsobeusedtoaddorsubtractimages.

Display  will calculate anddisplay the background of thecurrentimage.

Divide willdividethecurrentimagebyeitherafileoracalculatedbackground.

Subtract  will subtract thebackground (either calculatedor read from a file) from thecurrent image. The percentageof the background to subtractmaybespecified.50%specifieshalf the background will besubtracted. If thepercentage isnega,ve, the background isadded. For example ‐100% canbeusedtosumtwoimages.

Selectwhetherthebackgroundisreadfromafileorcalculatedfromthecurrentimage.

52

Select whether thebackground is applied tothe Original  image or thecurrently Displayed  image.The difference is that thecurrently displayed imagemayalreadyhavehadsomebackgroundsubtracted.

ThebackgroundmaybecalculatedusingaLocal movingaverageorbasedonRadial symmetryaboutthebeamcenter.Forthelater,makesurethebeamcenteriscorrect.

53

If File is selected as theSource, then the Directory andFile arespecifiedhere.

TheSocketinterface

When Adxv is started with the –socket command line op,on, it will listen for aconnec,on on port 8100. Commands may be sent to Adxv over this connec,on.Commandscanbesenttoloadimages,displayspotsorraisewindows.Belowisalistofcommandswhichcanbesent.

box x y  Sizeofboxdrawnaroundspots.

define_type n color <color> radius <radius> 

Defineaspottype.Colorisoneofred,greenorBlue.Radiusisinpixels.

load_image <image file>   Loadanimagefile

load_spots N  ReadNspots

x y type  Spotatpixelposi,onxy

end_of_pack  Endofspotdata

raise_window <window>  RaisesaWindow.<window>mustbeoneofControl,Image,Magnify,Line,orLoad.

exit  ExitAdxv

Hereisanexample:

hjp://www.scripps.edu/~arvai/adxv/data/adxv_socket_example.c

Torun:

cc‐oadxv_socket_exampleadxv_socket_example.cadxv‐socket&./adxv_socket_example

Thiswillloadanimagefile,display4spotsofvarioussizesandcolorsandraisetheLoadWindow.Youwillneedtochangethenameoftheimagefile inthecode.Anexampleimageisavailablehere:

hjp://www.scripps.edu/~arvai/adxv/data/q1.img.gz54

TheBeamCenterFile

WheneverAdxvreadsanimagefile,itcheckstoseeifthereisa.adxv_beam_center fileinthedirectorywheretheimageisbeingloadedfrom.Ifthisfileexists,thenitwillbeusedtosetthebeamcenter.Thereasonforthisisthatsome,mesthebeamcenterwrijenintheimageheaderisnotcorrect.Ifitisadjustedone,me,thenallimagesinthatdirectorywillbedisplayedwiththecorrectbeamcenter.

Ifthe.adxv_beam_centerfiledoesnotexistoriftheuseradjuststhebeamcenterinAdxv,thenthisfilewillbewrijen.Thefilecontains4asciinumbers:

beam_x beam_y nx ny 

beam_x andbeam_y arethecoordinatesofthebeamcenterandnx andny aretheimage dimensions. For the beam center to be used, the image dimensions of thedisplayedimagemustmatchnxandny.

Tonotreadorwritethe.adxv_beam_centerfile,Adxvcaneitherbestartedwiththe‐no_adxv_beam_center    command line op,on or the NO_ADXV_BEAM_CENTER environmentvariablemaybeset.

55

FrequentlyaskedQues,ons

Is there any license or fee for using Adxv? 

No,itisfreeforanyonetouse.

Where can I download adxv from?

www.scripps.edu/~arvai/adxv.html

What if Adxv complains about missing fonts? 

Youcaninstallthemissingfontsfromthesepackages:

xorg‐x11‐fonts‐75dpi.noarch

xorg‐x11‐fonts‐ISO8859‐1‐75dpi.noarch

YoucanalsodownloadallthefontsAdxvneedsfrom:

hjp://www.scripps.edu/~arvai/adxv/fonts.tar.gz

Putthisfileinadirectory(i.e./usr/share/adxvfonts/)andtype:

gunzip‐‐stdoutfonts.tar.gz|tarxvf–

ThenrunAdxvwiththefontpathop,on:

adxv‐fp/usr/share/adxvfonts

What if I download Adxv and get "./adxv: Permission denied."? 

chmod+x./adxv 56

What if the Image Window doesn't refresh correctly under NX? 

ThisisabuginNXandshouldbefixedinnewerversionsoftheNXserver.

TrytypingCtrl + Alt + E totogglelazyencoding.

DependingontheversionofNX,tryaddingoneofthefollowing op,onsonthemachinewhichisrunningthenxserver:

/usr/NX/etc/node.cfgAgentExtraOp,ons="‐defer0"

/etc/nxserver/node.confAGENT_EXTRA_OPTIONS_X="‐defer0"

Otherthingstotry:

adxv‐nopixmapadxv‐nopixmap‐nobsComplaintonomachine(hjps://www.nomachine.com/report‐issues)Asalastresort,contactme([email protected])

Is there a version of Adxv which runs under Windows?

Ifyouinstallcygwin(hjp://www.cygwin.com/)andthex‐serverpackages(hjp://x.cygwin.com/docs/ug/setup‐cygwin‐x‐installing.html)thenthecygwinversionofAdxvshouldwork.AdxvwascompiledunderWindows8.ThiswillalsorununderWindows7,butonlyifyouinstallthe32‐bitversionofcygwin.ThankstoDr.IlyaFrantsuzovforthisfeedback.

Adxv crashes in with "Library not loaded: /usr/X11/lib/libXt.6.dylib” 

InOSX10.10(Yosemite)theX11librariesweremovedfrom/usr/X11to/opt/X11.Youcanmakeasymboliclinkfrom/opt/X11to/usr/X11:

ln ‐s /opt/X11 /usr/X11 

What if none of the binaries run on my machine or I find a bug? 

[email protected]

What if I want to donate money to fund Adxv support and development? 

Definitelycontactme.57

Commandlineop,ons

‐autoload  Automa,cally load images listed in the file$XFORMSTATUSFILE. Thisfile shouldcontainonelinewithtwovalues,an integernumberandfilename.Thisfile ischeckedeverytwosecondsandwhentheintegernumber changes, the specifiedfile name is loaded anddisplayed.

‐auto_sigma  As the cursor moves across the ImageWindow, the I/Sigmaoftheregionunderthecursoriscalculatedmoreaccurately,butmoreslowly. This isdonebydefault intheMagnifyWindow.

‐beam_center x y  Specifythebeamcenterinmm.Defaultisreadfromtheimageheader.

‐beam_center_pixels x y  Specifythebeamcenterinpixels.Defaultisreadfromtheimageheader.

‐border  Drawa1pixelborderaroundtheimage.

‐bruker  InputfileisBruker(.sfrm)format.

‐char  Inputfileisbinarysignedchars

‐colormap  Createanewcolormapinsteadofusingthedefaultone.

‐colors Gray|Heat|Rainbow  Definestheini,alcolormapcolors.DefaultisGray.

‐contrast Min Max  Settheini,alvaluesforthecontrastseSng.Defaultisautoma,c.

‐debug  Printdebugginginforma,on.

‐delay t  Delay(inmilliseconds)fordisplayingimagesinmoviemode.

‐display DISPLAY  X11displaytouse

‐distance x  Specifythecrystaltodetectordistanceinmm.Defaultisreadfromtheimageheader.

58

‐double  Inputfileisbinarydoubles

‐edf  InputfileisEDFformat

‐fast_scan_mm H|V  Specifythefastscanningdirec,onformmcoordinatesdisplayedintheImageWindow.DefaultisH(Horizontal).Seealso‐scan_origin_mm

‐fast_scan_px H|V  Specifythefastscanningdirec,onforpixelcoordinatesdisplayedintheImageWindow.DefaultisH(Horizontal).Seealso‐scan_origin_px

‐find_peaks  Runpeaksearchandexit

‐fix_contrast  Donotautoma,callyre‐adjustthecontrastaseachnewimage is read in. Thismayalsobe set in theSeSngsWindow.

‐flip H|V  FliptheimageaboutaHorizontalorVer,calaxis.

‐flip_beam H|V  FlipthebeamcenteraboutaHorizontalorVer,calaxis.

‐float  Inputfileisbinaryfloats

‐fp FontPath  TheFontPath

‐fuji  InputfileisaFujiimageplateimage.

‐fuji10bit  InputfileisaFuji10bitimageplateimage.

‐gl ‐use_gl 

Ifavailable,useOpenGLtorender3‐dgraphicsintheMagnifyWindow.

 ‐gl_lines  DrawOpenGL3‐dgraphicsasawiremesh.Typing"w"intheMagnifyWindowwillalsotogglebetweenawiremeshorpolygonalsurfacerepresenta,on.

‐gl_quad_strip_bug  Drawthe3‐dpolygonalsurfaceusingGL_QUADSinstead ofGL_QUAD_STRIP.ThisworksaroundabuginsomeX‐Servers.

‐hdf5dataset <dataset>  NameofHDF5dataset(i.e./data)

‐hist32bits  Largerdynamicrangeforhistogram(slower)

59

‐ifont <fontname>  TextfonttouseintheImageWindow

‐int ‐raw 

Inputfileisrawbinarysignedintegers(4bytes/pixel).

‐invert_colors  Invertthecolormapcolors

‐iscale X  Scalefactortomul,plypixelvaluesby

‐itext  Drawtextinimagewindowwithwhitebackground

‐jpeg_quality N  Outputjpegquality.0isworst,100isbest,defaultis75.

‐jpeg_scale X  Outputjpegand,fscale.0‐1.0,defaultis1.0

‐level1  Outputlevel1postscript(defaultislevel2)

‐log  Takethelogofallthepixels:p=log(p)*1000

‐long  Inputfileisbinarysignedlongs(8bytes/pixel)

‐marccd  Marccdimage

‐mosflm  MimicMosflm'scoordinatesystem.Shortcutfor:‐rotate90‐flipV‐scan_origin_pxUL‐scan_origin_mmUL

‐ncolors N  Use N colors for the colormap. Default is 1024. If N=0,usethemaximumpossible

‐newpixmap  Create a new pixmap when a new image is read. Thedefaultistoonlycreateanewpixmapifthenewimageisadifferentsize

 ‐no_adxv_beam_center  Neitherreadnorcreatethe.adxv_beam_centerfile.

‐noborder  Donotdrawaborderaroundtheimage(default)

‐nobs  DonotuseBackingStoreonthedisplay

‐nofp  Donottrytosetupfontpath(default)

‐nodisplay  Donotdisplaytheimage

‐nopixmap  UseaWindowinsteadofaPixmapintheImageWindow.

60

‐norotate  Donotrotatemar.imagefiles90degreesbeforedisplaying.

‐nosmooth  When the image scale factor is less than 0.25, do notsmooth the displayed image. When a large image isscaled down, small spots may not be visible if simplyeveryn'thpixelisdisplayed.Smoothingisonbydefault.

‐nolabelPixmap  LabelsarenotdrawnfromPixmaps

‐numpy  InputfileisNUMPYformat

‐nx N  Numberofpixelsinhorizontal(fast)direc,on

‐ny N  Numberofpixelsinver,cal(slow)direc,on

‐o_direct  OpenfileswithO_DIRECTforfasterI/O

‐offset N  Constanttoaddtoallpixelvalues

‐oldcontrast  Useolderautoma,ccontrastadjustment.

‐overload N  Pixeloverloadvalue.Pixelslargerthanthisaredrawnasyellow.ThismayalsobesetintheProper,esWindow

‐parallel  Usemul,pleprocessors(upto16)

 ‐peaks_adx  Writepeaks.adx(XYI/Sigma)forpeaksearch.

‐pixelmap <geometryfile>   CrystFELgeometryfileorCheetahpixelmapfile

‐pixelsize X  Pixelsize(mm)

‐printheader  Printimageheadertothestandardoutput

‐ps  DisplaythePredic,onWindowatstartup.

‐q  LineWindowhorizontalscaleisinq‐spaceunits

‐rfont <fontname>  Fonttouseforresolu,onrings.

‐rings [res1, res2, ...]  Displayresolu,onrings

‐rings_only  Drawonlytherings,nottheresolu,ons

61

62

‐rotate 90 | 180 | 270  Rotatetheimage90,180or270degreesbeforedisplayingit

‐sa  Standalonemode.Thisreadsanimagefile,automa,callywritesajpeg,,fforimg file andthenexits. Itrequiresan input imagefileandoutputfilenameasthe lasttwoarguments, respec,vely. The output filename extension(.,ff,.jpegor.img)specifiestheoutputformat.

‐sa_crop WxH+X+Y  In standalone mode (‐sa), this will crop the outputimage. The upper leh corner is X,Y and the outputdimensionsareWxH(pixels).

‐scandir  Usestat()insteadofd_typefieldtodeterminethefiletype

‐scan_origin_mm UL|UR|LL|LR 

The scan origin for mmcoordinatesdisplayedintheImageWindow.DefaultisLL(LowerLeh).Seealso‐fast_scan_mm.

‐scan_origin_px UL|UR|LL|LR 

The scan origin for pixel coordinates displayed in theImageWindow.DefaultisUL(UpperLeh).Seealso‐fast_scan_px.

‐short ‐sshort 

Inputfileisrawbinarysignedshorts(2bytes/pixel).

‐show_underload  Showpixelsbelowathreshold.SeeProper,esWindow.

‐skip N  Skip N bytes before readingrawbinarydata.Maybeusedtoskipafileheader.

‐slab_combine Sum|Avg  Sum or Average data when combining mul,ple slabs.DefaultisSum.Appliestomul,‐dimensionalhdf5data.

‐slab N   Firstslabofmul,‐dimensionalhdf5datatodisplay

‐slabs N   Numberofslabsofmul,‐dimensionalhdf5datatomergeanddisplay

‐slowcbf  Slowerrou,netoopenCBFfiles

‐small_cursor  UseasmallercrosshaircursorintheImageWindow

‐small_spots  Bejerimagedisplayforimageswithsmallspots

 ‐smv32bits  Output imgfileswillbe32‐bit signed integer, insteadof16‐bitunsignedshort

‐socket [port_number]  Adxvwill listen fora socket connec,ononportnumber8100. The port number may be set with theADXV_DISPLAY_PORTenvironmentvariable.

‐spindle_orient H|V  SpindleOrienta,on(forDPS)

‐spindle_rot clock|an>  SpindleRota,on(forDPS)

‐stride N  NumberofSlabs/Filestostepwhenloadingthenextimage

‐swab ‐swap ‐swapbytes 

Swapthetwo8‐bithalvesofeach16‐bitword

‐swap_beam_center  Swapxandyposi,onofthebeamcenter

‐swaw  Swapthetwo16‐bithalvesofeach32‐bitword

‐swadw  Swapthetwo32‐bithalvesofeach64‐bitword

‐>ff  InputfileformatisTIFF

‐>ff32  OutputTIFFfileformatwillbe32‐bitinteger

‐twotheta X  2‐Thetaangleindegrees.Defaultisreadfromtheimageheader

‐uchar  Inputfileisrawbinaryunsignedchars(1byte/pixel)

‐underload N  Thresholdbelowwhich to show small pixel values.MayalsobesetinProper,esWindow.

‐uint  Inputfileisbinaryunsignedintegers(4bytes/pixel)

‐ushort  Inputfileisrawbinaryunsignedshorts(2bytes/pixel)

‐verbose  Moreverbosetextmessages

‐visual Visual   VisualClassorIDtouse.Seexdpyinfo(1)orglxinfo(1).

‐wavelength X  X‐Ray wavelengthinangstroms.Defaultisreadfromtheimageheader.

63

EnvironmentVariables

ADXV_DISPLAY_PORT  Porttolistenforasocketconnec,on.Defaultis8100.Alsosetwith–socketcommandlineargument

ADXV_PATTERN  PajerntolistnewimagesintheLoadWindow.Defaultis*.img.

ADXV_SHOW_PIXELS  Pixeloverloadvalue.Pixelslargerthanthisaredrawninyellow. Default is 65000, but may be changed in thePropertyWindow.

DISPLAY  Setthedefaulthostanddisplaynumber.

MARHOME  If$MARHOME/fontsexiststhenthiswillbeprependedtotheXFontPath.See‐nofp.

NO_ADXV_BEAM_CENTER  Donotreadorwritethe.adxv_beam_centerfile

XFORMSTATUSFILE  Filewhichspecifiesimagestoautoma,callyload(seethe‐autoloadcommandlineop,on).

OMP_NUM_THREADS  Maximum number of threads to use when the ‐parallelcommandlineop,onisused.Maxis16.

64