Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
b8949a2
added ad-hoc-diffractometer package and started yaml configuration fo…
dihenriksen Aug 25, 2026
07d8908
enhance geometry yaml
josephhanrahan Aug 31, 2026
526cce6
add phi as a constraint, removing gamma1
josephhanrahan Sep 2, 2026
90c9ee8
updated geometry file
dihenriksen Sep 18, 2026
f13cafa
Create hkl module
josephhanrahan Sep 21, 2026
0d5f911
comment out beam for now
josephhanrahan Sep 21, 2026
0fa9b4b
fix yml filepath
josephhanrahan Sep 21, 2026
14943e7
give name on init
josephhanrahan Sep 21, 2026
d112a32
define pseudos and reals
josephhanrahan Sep 21, 2026
94c0587
try new approach
josephhanrahan Sep 21, 2026
97ff29c
remove beam
josephhanrahan Sep 21, 2026
5c99394
added diffractometer object
dihenriksen Sep 23, 2026
c521d98
fixed pixi toml for mac
dihenriksen Sep 24, 2026
4a4795a
minor update
dihenriksen Oct 5, 2026
6837cac
added tdms class from profile collection, tdms to diffractometer, ren…
dihenriksen Oct 8, 2026
4ef909c
added notebooks repo with some helpful notebooks, mostly around getti…
dihenriksen Oct 19, 2026
3ce7e88
moved all diffractometer code to a notebook
dihenriksen Oct 19, 2026
9ef8091
Saving
josephhanrahan Oct 16, 2026
83b56ab
minor fixes
dihenriksen Oct 19, 2026
c887819
Fix major problems with geometry yaml
josephhanrahan Oct 19, 2026
553f726
moved notebook, updated geometry variables
Oct 20, 2026
2c92f92
fixed angle names, use TDMSAxis for gamma and delta in notebook
dihenriksen Oct 21, 2026
fa80f02
diffr1 successfully connects now
dihenriksen Oct 21, 2026
3248e5f
replaced diffractometer.py file with custom CDIDiffractometer class
dihenriksen Oct 22, 2026
243601b
updated angles in notebook, energy signature in CDIDiffractometer
dihenriksen Oct 23, 2026
1a83fd6
updated dependencies in pyproject
dihenriksen Oct 23, 2026
76cc753
fix up pyproject dependencies
dihenriksen Oct 23, 2026
8bf1482
remove energy from init
dihenriksen Oct 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ci:
autoupdate_commit_msg: "chore: update pre-commit hooks"
autofix_commit_msg: "style: pre-commit fixes"

exclude: ^.cruft.json|.copier-answers.yml$
exclude: ^.cruft.json|.copier-answers.yml$|^notebooks/

repos:
- repo: https://github.com/adamchainz/blacken-docs
Expand Down
81 changes: 81 additions & 0 deletions diffractometer-geometry.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# CDI 7-circle diffractometer prototype.
# Schema reference: docs/source/reference/declarative_geometry_schema.md
# How-to: docs/source/howto/custom_geometry.md

ad_hoc_diffractometer_geometry:
schema_revision: 1

name: cdi-geometry

documentation: |
CDI 7-circle diffractometer prototype.

This is a working first model of the CDI stack from beamline notes.
The top two sample rotations are fixed at zero in the initial mode.


The solver has special handling for an Eulerian inner pair named
``chi`` and ``phi``. These names are solver-facing aliases for the
two lower CDI sample stages noted as omega/chi during beamline
discussion:

chi -> gon.sam.c_lg.lrx / omega1 in earlier notes
phi -> gon.sam.c_lg.lrz / chi1 in earlier notes


Basis used here: vertical=+Y, longitudinal=+Z, transverse=+X.


Stack (floor first):
mu : vertical
--> chi : longitudinal
--> phi : transverse
--> omega2 : longitudinal, fixed at 0 in fixed_alpha
--> chi2 : transverse, fixed at 0 in fixed_alpha
gamma : rotation about x-axis (vertical in motion)
--> delta : rotation about y-axis (horizontal in motion)

# [x, y, z]
basis:
vertical: [0.0, 1.0, 0.0]
longitudinal: [0.0, 0.0, 1.0]
transverse: [1.0, 0.0, 0.0]

stages:
# TODO - check +/- signs
- { name: mu, axis: +vertical, parent: null, role: sample } # Ry gon.sam.ry
- { name: omega1, axis: +transverse, parent: mu, role: sample } # Rx gon.sam.c_lg.lrx / omega1
# omega about the transverse axis
# phi is about the vertical when everything else is at 0, but would change as everythhing else moves
# we do not have a phi installed, so it should be zero or not included in the geometry.
# phi is on top of omega and chi and mu
- { name: chi1, axis: +longitudinal, parent: omega1, role: sample } # Rz gon.sam.c_lg.lrz / chi1

# do not need to worry about second omega and chi; assume they are fixed
# we have double omega and double chi installed, but do not need to incorporate them right now
- { name: omega2, axis: +transverse, parent: chi1, role: sample } # Rx gon.sam.c_sm.lrx
- { name: chi2, axis: +longitudinal, parent: omega2, role: sample } # Rz gon.sam.c_sm.lrz
- { name: gamma, axis: +transverse, parent: null, role: detector } # Rx tdms.ax
- { name: delta, axis: +vertical, parent: gamma, role: detector } # Ry tdms.ay

# 7 real axes, so N - 3 = 4 constraints are needed for a unique forward solve.
modes:
fixed_incidence:
constraints:
- { type: sample, stage: chi2, value: 0.0 }
- { type: sample, stage: omega2, value: 0.0 }
- { type: sample, stage: chi1, value: 0.0 }
# - { type: detector, stage: gamma, value: 0.0 }
- { type: reference, name: incidence, value: 5.0 }
computed: [mu, omega1, delta, gamma]
extras:
n_hat: REQUIRED
incidence: REQUIRED

fixed_chi1_chi2_omega2:
default: true
constraints:
- { type: sample, stage: chi2, value: 0.0 }
- { type: sample, stage: omega2, value: 0.0 }
- { type: sample, stage: chi1, value: 0.0 }
computed: [mu, omega1, delta, gamma]
Binary file added notebooks/CDI_gonio.pptx
Binary file not shown.
Loading
Loading