Skip to content

Commit 63f8817

Browse files
Complete the description attribute for all parameters (#95)
* Create a new fitting module directory * Reorganizes fitting tracker module structure * Refactors minimizer structure and imports * Refactors reliability factors into metrics module * Reorganizes import statements for clarity * Enforces absolute imports for consistency * Updates pixi.lock * Pins dependencies in pixi.toml * Reorganizes import statements in minimization module * Adds descriptions to parameters and descriptors
1 parent 77e2493 commit 63f8817

File tree

6 files changed

+41
-4
lines changed

6 files changed

+41
-4
lines changed

src/easydiffraction/experiments/collections/background.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ def category_key(self) -> str:
3131
def cif_category_key(self) -> str:
3232
return 'pd_background'
3333

34-
def __init__(self, x: float, y: float):
34+
def __init__(
35+
self,
36+
x: float,
37+
y: float,
38+
):
3539
super().__init__()
3640

3741
self.x = Descriptor(
@@ -69,7 +73,11 @@ def category_key(self) -> str:
6973
def cif_category_key(self):
7074
return 'pd_background'
7175

72-
def __init__(self, order: int, coef: float) -> None:
76+
def __init__(
77+
self,
78+
order: int,
79+
coef: float,
80+
) -> None:
7381
super().__init__()
7482

7583
self.order = Descriptor(

src/easydiffraction/experiments/collections/excluded_regions.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,24 @@ def category_key(self) -> str:
2121
def cif_category_key(self) -> str:
2222
return 'excluded_region'
2323

24-
def __init__(self, start: float, end: float):
24+
def __init__(
25+
self,
26+
start: float,
27+
end: float,
28+
):
2529
super().__init__()
2630

2731
self.start = Descriptor(
2832
value=start,
2933
name='start',
3034
cif_name='start',
35+
description='Start of the excluded region.',
3136
)
3237
self.end = Parameter(
3338
value=end,
3439
name='end',
3540
cif_name='end',
41+
description='End of the excluded region.',
3642
)
3743

3844
# Select which of the input parameters is used for the

src/easydiffraction/experiments/collections/linked_phases.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,24 @@ def category_key(self) -> str:
1818
def cif_category_key(self) -> str:
1919
return 'pd_phase_block'
2020

21-
def __init__(self, id: str, scale: float):
21+
def __init__(
22+
self,
23+
id: str,
24+
scale: float,
25+
):
2226
super().__init__()
2327

2428
self.id = Descriptor(
2529
value=id,
2630
name='id',
2731
cif_name='id',
32+
description='Identifier of the linked phase.',
2833
)
2934
self.scale = Parameter(
3035
value=scale,
3136
name='scale',
3237
cif_name='scale',
38+
description='Scale factor of the linked phase.',
3339
)
3440

3541
# Select which of the input parameters is used for the

src/easydiffraction/sample_models/collections/atom_sites.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,47 +38,56 @@ def __init__(
3838
value=label,
3939
name='label',
4040
cif_name='label',
41+
description='Unique identifier for the atom site.',
4142
)
4243
self.type_symbol = Descriptor(
4344
value=type_symbol,
4445
name='type_symbol',
4546
cif_name='type_symbol',
47+
description='Chemical symbol of the atom at this site.',
4648
)
4749
self.adp_type = Descriptor(
4850
value=adp_type,
4951
name='adp_type',
5052
cif_name='ADP_type',
53+
description='Type of atomic displacement parameter (ADP) used (e.g., Biso, Uiso, Uani, Bani).',
5154
)
5255
self.wyckoff_letter = Descriptor(
5356
value=wyckoff_letter,
5457
name='wyckoff_letter',
5558
cif_name='Wyckoff_letter',
59+
description='Wyckoff letter indicating the symmetry of the atom site within the space group.',
5660
)
5761
self.fract_x = Parameter(
5862
value=fract_x,
5963
name='fract_x',
6064
cif_name='fract_x',
65+
description='Fractional x-coordinate of the atom site within the unit cell.',
6166
)
6267
self.fract_y = Parameter(
6368
value=fract_y,
6469
name='fract_y',
6570
cif_name='fract_y',
71+
description='Fractional y-coordinate of the atom site within the unit cell.',
6672
)
6773
self.fract_z = Parameter(
6874
value=fract_z,
6975
name='fract_z',
7076
cif_name='fract_z',
77+
description='Fractional z-coordinate of the atom site within the unit cell.',
7178
)
7279
self.occupancy = Parameter(
7380
value=occupancy,
7481
name='occupancy',
7582
cif_name='occupancy',
83+
description='Occupancy of the atom site, representing the fraction of the site occupied by the atom type.',
7684
)
7785
self.b_iso = Parameter(
7886
value=b_iso,
7987
name='b_iso',
8088
units='Ų',
8189
cif_name='B_iso_or_equiv',
90+
description='Isotropic atomic displacement parameter (ADP) for the atom site.',
8291
)
8392
# Select which of the input parameters is used for the
8493
# as ID for the whole object

src/easydiffraction/sample_models/components/cell.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,36 +34,42 @@ def __init__(
3434
name='length_a',
3535
cif_name='length_a',
3636
units='Å',
37+
description='Length of the unit cell edge a.',
3738
)
3839
self.length_b = Parameter(
3940
value=length_b,
4041
name='length_b',
4142
cif_name='length_b',
4243
units='Å',
44+
description='Length of the unit cell edge b.',
4345
)
4446
self.length_c = Parameter(
4547
value=length_c,
4648
name='length_c',
4749
cif_name='length_c',
4850
units='Å',
51+
description='Length of the unit cell edge c.',
4952
)
5053
self.angle_alpha = Parameter(
5154
value=angle_alpha,
5255
name='angle_alpha',
5356
cif_name='angle_alpha',
5457
units='deg',
58+
description='Angle between edges b and c.',
5559
)
5660
self.angle_beta = Parameter(
5761
value=angle_beta,
5862
name='angle_beta',
5963
cif_name='angle_beta',
6064
units='deg',
65+
description='Angle between edges a and c.',
6166
)
6267
self.angle_gamma = Parameter(
6368
value=angle_gamma,
6469
name='angle_gamma',
6570
cif_name='angle_gamma',
6671
units='deg',
72+
description='Angle between edges a and b.',
6773
)
6874

6975
# Lock further attribute additions to prevent

src/easydiffraction/sample_models/components/space_group.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,13 @@ def __init__(
3131
value=name_h_m,
3232
name='name_h_m',
3333
cif_name='name_H-M_alt',
34+
description='Hermann-Mauguin symbol of the space group.',
3435
)
3536
self.it_coordinate_system_code = Descriptor(
3637
value=it_coordinate_system_code,
3738
name='it_coordinate_system_code',
3839
cif_name='IT_coordinate_system_code',
40+
description='A qualifier identifying which setting in IT is used.',
3941
)
4042

4143
# Lock further attribute additions to prevent

0 commit comments

Comments
 (0)