Skip to content

Commit

Permalink
Add sample to source distance to Beam (#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 authored Aug 16, 2023
1 parent 730b8d5 commit 831061f
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 831061f

Please sign in to comment.