Page History
Run dependent parameters:
First up are functions that will return e.g. the region-of-interest boundaries for each run. During the experiment, this should be kept up-to-date so if the setup changes, the littleData file will get an entry with new boundaries for a just finished range of runs. This way, the littleDataRun script will always use the correct region of interest for each run.
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
Code Block | ||||
---|---|---|---|---|
|
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
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