Skip to content

azimuthal integrator using DSSC geometry object

Michael Schneider requested to merge DSSC_azimuthal into DevelopmentRG

Hi all,

I think the extra_geom.DSSC_1MGeometry object is really useful for setting up the azimuthal integrator, as it provides a get_pixel_positions() method. Using these positions instead of the manually calculated ones directly takes the hexagonal pixel arrangement into account. I wrote a slightly modified version of the current AzimuthalIntegrator class for this, so both versions are available. The AzimuthalIntegratorDSSC instance then gets called with the unassembled image (i.e., including the module as a third dimension). As a small bonus, this gives a minor save in computation time.

Other minor changes:

  • I added a way to account for a slightly shifted center (i.e., the q=0 position). This could of course be handled by the geometry object, but I find it useful enough to include it as an option here.
  • I added a convenience method to calculate the momentum transfer coordinate (calc_q) directly from the AzimuthalIntegratorDSSC object by giving the detector distance and wavelength.
  • using the np.ravel function instead of the image.flatten() method makes sure the integration works directly on xarrays

Also, I propose to change the quickmask_DSSC_ASIC function in the dssc_misc submodule. Currently, it requires the geometry object and returns a 2D mask - this is incompatible with the proposed AzimuthalIntegratorDSSC class. I feel the quickmask feature is really independent of the geometry used, as it just masks entire ASICS, regardless of their position in the assembled 2d image. If you feel this breaks too much existing code, we could of course make this into a separate function.

What do you think?

Cheers,

Michael

involved: @mschndr @gortr @yarosla

Edited by Rafael Gort

Merge request reports