Sddstoolkit

From Ciswikidb
Jump to navigation Jump to search

Link to Michael's SDDS pages

Here's an example of the media:PositronDistribution.sdds header:

SDDS1
&column name=Entry,type=double, &end
&column name=E,    units=MeV, type=double, &end
&column name=pX,   units=MeV, type=double, &end
&column name=pY,   units=MeV, type=double, &end
&column name=pZ,   units=MeV, type=double, &end
&column name=X,    units=mm, type=double, &end
&column name=Y,    units=mm, type=double, &end
&column name=Z,    units=mm, type=double, &end
&column name=sX,   type=double, &end
&column name=sY,   type=double, &end
&column name=sZ,   type=double, &end
&data mode=ascii no_row_counts=1 &end

Here's an example of command for getting output from file:

sddscheck PositronDistribution.sdds
sddsquery PositronDistribution.sdds
sddsprintout -col=Entry -col=E PositronDistribution.sdds
sddsplot -columnNames=pX,pY PositronDistribution.sdds
sddsplot -columnNames=Entry,E PositronDistribution.sdds
sddshist PositronDistribution.sdds PositronDistribution.hist -data=E -bins=20
sddsquery PositronDistribution.hist
sddsplot -col=E -col=frequency PositronDistribution.hist
sddsprintout -col=E -col=frequency PositronDistribution.hist
sddshist PositronDistribution.sdds PositronDistribution.hist -data=E -bins=100
sddsplot -columnnames=E,frequency PositronDistribution.hist
sddsplot -mode=y=log -columnnames=E,frequency PositronDistribution.hist
sddshist2d PositronDistribution.sdds PositronDistribution.h2d -column=E,sZ -xparam=50 -yparam=50
sddscontour -shade=32 PositronDistribution.h2d -quantity=frequency
sddsplot -graphic=dot -columnNames=EMean,sZMean output2.sdds

Here's options for plotting:

For sddsplot or sddscontour, you can use: -device=lpng,onwhite -output=filename.png
FYI: lpng is for "large png", you can also specify "png" for a smaller version.
You can also output to postscript, but I've never dealt with that before.

Here's options for sorting sdds files:

sddssort PositronDistribution.sdds PositronDistributionSorted.sdds -col=E,increasing
more PositronDistributionSorted.sdds
sddscheck PositronDistributionSorted.sdds 

Here's options for statistics on sdds files:

sddsrunstats PositronDistributionSorted.sdds output2.sdds -window=column=E,width=200 -noOverlap -mean=E -mean=sZ -standardDeviation=sZ -sigma=sZ
sddsquery output2.sdds
sddsprintout -col=EMean -col=sZMean output2.sdds
sddsplot -graphic=dot -columnNames=EMean,sZMean output2.sdds