Page History
Use of SmallDataAna_psana to set up the producer's parameters
See the following link to learn how to start an interactive iPython session and make an average image for a given detector:
Beam center and radius
Use of SmallDataAna_psana and extracting information from the average image
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. The first step is to create an average image that shows the feature of interest well. This is described in the section bout Working with Images from camera/areadetectors
Beam center and radius
Code Block | ||||
---|---|---|---|---|
|
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 is an example fit: first of the entire prompt:
- 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