Skip to content

Commit 58ab4a7

Browse files
committed
Refactor terminology from "sample" to "structure" in documentation and code comments
1 parent 56cdefe commit 58ab4a7

15 files changed

Lines changed: 154 additions & 152 deletions

File tree

docs/user-guide/analysis-workflow/analysis.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ EasyDiffraction relies on third-party crystallographic libraries, referred to as
2020
**calculation engines** or just **calculators**, to perform the calculations.
2121

2222
The calculation engines are used to calculate the diffraction pattern for the
23-
defined model of the studied sample using the instrumental and other required
23+
defined model of the studied structure using the instrumental and other required
2424
experiment-related parameters, such as the wavelength, resolution, etc.
2525

2626
You do not necessarily need the measured data to perform the calculations, but

docs/user-guide/analysis-workflow/project.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ hrpt.cif
127127

128128
### 2. structures / <span class="orange">lbco.cif</span>
129129

130-
This file contains crystallographic information associated with the sample
130+
This file contains crystallographic information associated with the structure
131131
model, including **space group**, **unit cell parameters**, and **atomic
132132
positions**.
133133

docs/user-guide/concept.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ Credits: DOI 10.1126/science.1238932
5858
## Data Analysis
5959

6060
Data analysis uses the reduced data to extract meaningful information about the
61-
sample. This may include determining the crystal or magnetic structure,
62-
identifying phases, performing quantitative analysis, etc.
61+
crystallographic structure. This may include determining the crystal or magnetic
62+
structure, identifying phases, performing quantitative analysis, etc.
6363

6464
Analysis often involves comparing experimental data with data calculated from a
6565
crystallographic model to validate and interpret the results. For powder

docs/user-guide/first-steps.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ workflow. One of them is the `download_from_repository` function, which allows
6666
you to download data files from our remote repository, making it easy to access
6767
and use them while experimenting with EasyDiffraction.
6868

69-
For example, you can download a sample data file like this:
69+
For example, you can download a data file like this:
7070

7171
```python
7272
import easydiffraction as ed

tutorials/ed-13.py

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@
5252
#
5353
# In EasyDiffraction, a project serves as a container for all
5454
# information related to the analysis of a specific experiment or set of
55-
# experiments. It enables you to organize your data, experiments, sample
56-
# models, and fitting parameters in a structured manner. You can think
57-
# of it as a folder containing all the essential details about your
58-
# analysis. The project also allows us to visualize both the measured
59-
# and calculated diffraction patterns, among other things.
55+
# experiments. It enables you to organize your data, experiments,
56+
# crystal structures, and fitting parameters in an organized manner. You
57+
# can think of it as a folder containing all the essential details about
58+
# your analysis. The project also allows us to visualize both the
59+
# measured and calculated diffraction patterns, among other things.
6060

6161
# %% [markdown] tags=["doc-link"]
6262
# 📖 See
@@ -440,7 +440,7 @@
440440

441441
# %% [markdown] tags=["doc-link"]
442442
# 📖 See
443-
# [documentation](https://docs.easydiffraction.org/lib/user-guide/analysis-workflow/model/)
443+
# [documentation](https://docs.easydiffraction.org/lib/user-guide/analysis-workflow/structure/)
444444
# for more details about structures and their purpose in the data
445445
# analysis workflow.
446446

@@ -455,7 +455,7 @@
455455

456456
# %% [markdown] tags=["doc-link"]
457457
# 📖 See
458-
# [documentation](https://docs.easydiffraction.org/lib/user-guide/analysis-workflow/model/#space-group-category)
458+
# [documentation](https://docs.easydiffraction.org/lib/user-guide/analysis-workflow/structure/#space-group-category)
459459
# for more details about the space group.
460460

461461
# %%
@@ -467,7 +467,7 @@
467467

468468
# %% [markdown] tags=["doc-link"]
469469
# 📖 See
470-
# [documentation](https://docs.easydiffraction.org/lib/user-guide/analysis-workflow/model/#cell-category)
470+
# [documentation](https://docs.easydiffraction.org/lib/user-guide/analysis-workflow/structure/#cell-category)
471471
# for more details about the unit cell parameters.
472472

473473
# %%
@@ -478,7 +478,7 @@
478478

479479
# %% [markdown] tags=["doc-link"]
480480
# 📖 See
481-
# [documentation](https://docs.easydiffraction.org/lib/user-guide/analysis-workflow/model/#atom-sites-category)
481+
# [documentation](https://docs.easydiffraction.org/lib/user-guide/analysis-workflow/structure/#atom-sites-category)
482482
# for more details about the atom sites category.
483483

484484
# %%
@@ -528,12 +528,12 @@
528528
# %% [markdown] **Reminder:**
529529
#
530530
# The fitting process involves comparing the measured diffraction
531-
# pattern with the calculated diffraction pattern based on the sample
532-
# model and instrument parameters. The goal is to adjust the parameters
533-
# of the structure and the experiment to minimize the difference
534-
# between the measured and calculated diffraction patterns. This is done
535-
# by refining the parameters of the structure and the instrument
536-
# settings to achieve a better fit.
531+
# pattern with the calculated diffraction pattern based on the crystal
532+
# structure and instrument parameters. The goal is to adjust the
533+
# parameters of the structure and the experiment to minimize the
534+
# difference between the measured and calculated diffraction patterns.
535+
# This is done by refining the parameters of the structure and the
536+
# instrument settings to achieve a better fit.
537537

538538
# %% [markdown] tags=["doc-link"]
539539
# 📖 See
@@ -872,7 +872,7 @@
872872
# %% [markdown]
873873
# ### 🧩 Exercise 3: Define a Structure – LBCO
874874
#
875-
# The LBSO structure is not as simple as the Si model, as it contains
875+
# The LBSO structure is not as simple as the Si one, as it contains
876876
# multiple atoms in the unit cell. It is not in COD, so we give you the
877877
# structural parameters in CIF format to create the structure.
878878
#
@@ -946,7 +946,7 @@
946946

947947
# %% [markdown] tags=["dmsc-school-hint"]
948948
# You can use the same approach as in the previous part of the notebook,
949-
# but this time you need to use the model name corresponding to the LBCO
949+
# but this time you need to use the name corresponding to the LBCO
950950
# structure, e.g. 'lbco'.
951951

952952
# %% [markdown]
@@ -1055,8 +1055,8 @@
10551055
# **Hint:**
10561056

10571057
# %% [markdown] tags=["dmsc-school-hint"]
1058-
# Use the `linked_phases` attribute of the experiment to link the sample
1059-
# model.
1058+
# Use the `linked_phases` attribute of the experiment to link the
1059+
# crystal structure.
10601060

10611061
# %% [markdown]
10621062
# **Solution:**

tutorials/ed-14.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222

2323
# %%
2424
# Download CIF file from repository
25-
model_path = ed.download_data(id=20, destination='data')
25+
structure_path = ed.download_data(id=20, destination='data')
2626

2727
# %%
28-
project.structures.add(cif_path=model_path)
28+
project.structures.add(cif_path=structure_path)
2929

3030
# %%
3131
project.structures.show_names()

tutorials/ed-15.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222

2323
# %%
2424
# Download CIF file from repository
25-
model_path = ed.download_data(id=21, destination='data')
25+
structure_path = ed.download_data(id=21, destination='data')
2626

2727
# %%
28-
project.structures.add(cif_path=model_path)
28+
project.structures.add(cif_path=structure_path)
2929

3030
# %%
3131
project.structures.show_names()

tutorials/ed-2.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
# # Structure Refinement: LBCO, HRPT
33
#
44
# This minimalistic example is designed to show how Rietveld refinement
5-
# of a crystal structure can be performed when both the structure and
6-
# experiment are defined directly in code. Only the experimentally
7-
# measured data is loaded from an external file.
5+
# can be performed when both the crystal structure and experiment are
6+
# defined directly in code. Only the experimentally measured data is
7+
# loaded from an external file.
88
#
99
# For this example, constant-wavelength neutron powder diffraction data
1010
# for La0.5Ba0.5CoO3 from HRPT at PSI is used.

tutorials/ed-3.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
#
99
# It is intended for users with minimal programming experience who want
1010
# to learn how to perform standard crystal structure fitting using
11-
# diffraction data. This script covers creating a project, adding sample
12-
# models and experiments, performing analysis, and refining parameters.
11+
# diffraction data. This script covers creating a project, adding
12+
# crystal structures and experiments, performing analysis, and refining
13+
# parameters.
1314
#
1415
# Only a single import of `easydiffraction` is required, and all
1516
# operations are performed through high-level components of the
@@ -98,9 +99,10 @@
9899
# %% [markdown]
99100
# #### Show Defined Structures
100101
#
101-
# Show the names of the models added. These names are used to access the
102-
# model using the syntax: `project.structures['model_name']`. All
103-
# model parameters can be accessed via the `project` object.
102+
# Show the names of the crystal structures added. These names are used
103+
# to access the structure using the syntax:
104+
# `project.structures[name]`. All structure parameters can be accessed
105+
# via the `project` object.
104106

105107
# %%
106108
project.structures.show_names()

tutorials/ed-4.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,27 +29,27 @@
2929
# #### Create Structure
3030

3131
# %%
32-
model = StructureFactory.create(name='pbso4')
32+
structure = StructureFactory.create(name='pbso4')
3333

3434
# %% [markdown]
3535
# #### Set Space Group
3636

3737
# %%
38-
model.space_group.name_h_m = 'P n m a'
38+
structure.space_group.name_h_m = 'P n m a'
3939

4040
# %% [markdown]
4141
# #### Set Unit Cell
4242

4343
# %%
44-
model.cell.length_a = 8.47
45-
model.cell.length_b = 5.39
46-
model.cell.length_c = 6.95
44+
structure.cell.length_a = 8.47
45+
structure.cell.length_b = 5.39
46+
structure.cell.length_c = 6.95
4747

4848
# %% [markdown]
4949
# #### Set Atom Sites
5050

5151
# %%
52-
model.atom_sites.add(
52+
structure.atom_sites.add(
5353
label='Pb',
5454
type_symbol='Pb',
5555
fract_x=0.1876,
@@ -58,7 +58,7 @@
5858
wyckoff_letter='c',
5959
b_iso=1.37,
6060
)
61-
model.atom_sites.add(
61+
structure.atom_sites.add(
6262
label='S',
6363
type_symbol='S',
6464
fract_x=0.0654,
@@ -67,7 +67,7 @@
6767
wyckoff_letter='c',
6868
b_iso=0.3777,
6969
)
70-
model.atom_sites.add(
70+
structure.atom_sites.add(
7171
label='O1',
7272
type_symbol='O',
7373
fract_x=0.9082,
@@ -76,7 +76,7 @@
7676
wyckoff_letter='c',
7777
b_iso=1.9764,
7878
)
79-
model.atom_sites.add(
79+
structure.atom_sites.add(
8080
label='O2',
8181
type_symbol='O',
8282
fract_x=0.1935,
@@ -85,7 +85,7 @@
8585
wyckoff_letter='c',
8686
b_iso=1.4456,
8787
)
88-
model.atom_sites.add(
88+
structure.atom_sites.add(
8989
label='O3',
9090
type_symbol='O',
9191
fract_x=0.0811,
@@ -246,7 +246,7 @@
246246
# #### Add Structure
247247

248248
# %%
249-
project.structures.add(structure=model)
249+
project.structures.add(structure=structure)
250250

251251
# %% [markdown]
252252
# #### Add Experiments
@@ -284,9 +284,9 @@
284284
# Set structure parameters to be optimized.
285285

286286
# %%
287-
model.cell.length_a.free = True
288-
model.cell.length_b.free = True
289-
model.cell.length_c.free = True
287+
structure.cell.length_a.free = True
288+
structure.cell.length_b.free = True
289+
structure.cell.length_c.free = True
290290

291291
# %% [markdown]
292292
# Set experiment parameters to be optimized.

0 commit comments

Comments
 (0)