Page History
...
Use of SmallDataAna_psana
For the use of the interactive features of SmallDataAna_psana, we recommend to start it in an ipython session as interactive grabbing of user input is currently not implemented via the notebook.
Creating an average image
In order to decide on the proper ROI, fit a team center or make a mask, the first step is always to create an image that you would like to use as base. This is achieved using the following function
SDAna In: anaps.AvImage()
This will by default create an average image of 100 events of an area detector.
The full command with all its options and a examples is here:
If you would like to take a quick look at your average image before proceeding, use as seen above:
Code Block |
---|
SDAna In: anaps.plotAvImage() |
which will result in a figure like this popping up:
Beam center and radius
SDAna In: anaps.FitCircle()
This will by draw the image and let you either select points by clicking or define a threshold above which points are selected and fitted to a single circle. The azimuthal integration code needs a center point which the circle fitting will return.
Below are an example fit: first the image you created first will pop up. You can then either select points by hand or use a threshold (highest x% of pixels). The chosen pixel location will be shown and you are adjust your threshold until you are satisfied. In the last step, the fit is performed and overlaid on the image. The beam center and radius of the circle are printed. You will have to know about your sample to use the radius to extract the detector - sample distance. The latter will not affect she shape of the azimuthally integrated data (a wrong center will!), but the q-bin values will be wrong.
FitCircle has an optional argument (useMask=False/True) that defaults to False. If set to True, the mask stored in the calib directory will be applied.
Overview
Content Tools