Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JUNGFRAU: CrystFEL geometry files without quadrant information #8

Open
dallanto opened this issue Feb 14, 2020 · 2 comments
Open

JUNGFRAU: CrystFEL geometry files without quadrant information #8

dallanto opened this issue Feb 14, 2020 · 2 comments

Comments

@dallanto
Copy link
Contributor

As per latest commit (ec5e475...) in jungfrau_flex_geom, a geometry file is written,
and the tile-wise blocks incl. corner_x/y look reasonable.

The problem is that this is still incomplete information for use with JUNGFRAU_geom.from_crystfel_geom('test2.geom')

I use the geometry base class for the writing, as there are no detector-specific inheritances yet. This implies, as I see it, a problem, because the base class requirements are likely too close to the AGIPD properties.
For instance, the concept of quadrants makes less sense, at least from the general point of view (1, 2 and also the 6 SPB JF-units are not compatible with this).

In order to skip refactoring considerations etc. for the moment and just provide a geom file with formally "correct" (?) content, I complemented the auto-generated geom file with quadrant and module rigid group definitions. But this still gives rise to an error, so I'm still missing something ...

@takluyver
Copy link
Member

I'd suggest we get the JUNGFRAU geometry working and merged first, and worry about reading/writing geometry files in a separate PR. You can raise NotImplementedError for anything that's known to be broken at the moment.

I'd guess that the rigid group definitions will need to be generalised. We should probably define only each module as a rigid group, ignoring 'quadrants' for JUNGFRAU.

What errors do you get?

@dallanto
Copy link
Contributor Author

For completeness (while the geom-file PR has been split and postponed):

---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<ipython-input-4-b02d27c44501> in <module>
      1 get_ipython().run_line_magic('matplotlib', 'notebook')
----> 2 geom.inspect(axis_units='px', frontview=True)

~/Devel/PycharmProjects/EXtra-geom/extra_geom/detectors.py in inspect(self, axis_units, frontview)
   1443           along the beam. False gives a 'looking into the beam' view.
   1444         """
-> 1445         ax = super().inspect(axis_units=axis_units, frontview=frontview)
   1446         scale = self._get_plot_scale_factor(axis_units)
   1447 

~/Devel/PycharmProjects/EXtra-geom/extra_geom/detectors.py in inspect(self, axis_units, frontview)
    143         # Add markers for first pixels & lines for first row
    144         first_rows = np.array(first_rows)
--> 145         first_px_x, first_px_y = first_rows[:, 0, 0], first_rows[:, 0, 1]
    146 
    147         ax.scatter(first_px_x, first_px_y, marker='x', label='First pixel')

IndexError: too many indices for array

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants