Skip to content

Commit

Permalink
Add sample to source distance to Beam (cctbx#622)
Browse files Browse the repository at this point in the history
* Add sample_to_source_distance to Beam

---------

Co-authored-by: DiamondLightSource-build-server <[email protected]>
Co-authored-by: Nicholas Devenish <[email protected]>
  • Loading branch information
3 people committed Jul 11, 2024
1 parent 94a8e3b commit 5319c5a
Show file tree
Hide file tree
Showing 6 changed files with 326 additions and 17 deletions.
1 change: 1 addition & 0 deletions newsfragments/622.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add sample_to_source_distance to Beam
22 changes: 22 additions & 0 deletions src/dxtbx/dxtbx_model_ext.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ class BeamBase:
self, points: Union[Tuple[Vec3Float], List[Vec3Float]]
) -> None: ...
def get_sample_to_source_direction(self) -> Vec3Float: ...
def get_sample_to_source_distance(self) -> float: ...
def set_sample_to_source_distance(
self, sample_to_source_distance: float
) -> None: ...
def get_sigma_divergence(self) -> float: ...
def set_sigma_divergence(self, sigma_divergence: float) -> None: ...
def get_transmission(self) -> float: ...
Expand Down Expand Up @@ -110,6 +114,22 @@ class Beam(BeamBase):
polarization_fraction: float,
flux: float,
transmission: float,
probe: Probe = ...,
deg: bool = ...,
) -> None: ...
@overload
def __init__(
self,
direction: Vec3Float,
wavelength: float,
divergence: float,
sigma_divergence: float,
polarization_normal: Vec3Float,
polarization_fraction: float,
flux: float,
transmission: float,
probe: Probe = ...,
sample_to_source_distance: float = ...,
deg: bool = ...,
) -> None: ...
@staticmethod
Expand Down Expand Up @@ -141,6 +161,8 @@ class PolychromaticBeam(Beam):
polarization_fraction: float,
flux: float,
transmission: float,
probe: Probe = ...,
sample_to_source_distance: float = ...,
deg: bool = ...,
) -> None: ...
@staticmethod
Expand Down
Loading

0 comments on commit 5319c5a

Please sign in to comment.