Skip to content

Commit 48ab64c

Browse files
authored
Merge pull request #168 from scipp/american-spelling
Change to american spelling
2 parents fdeb7bd + 99cc87f commit 48ab64c

File tree

13 files changed

+25
-25
lines changed

13 files changed

+25
-25
lines changed

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
- run: anaconda --token ${{ secrets.ANACONDATOKEN }} upload --user scipp --label main $(ls conda-package-*/*/*.tar.bz2)
7979
- uses: actions/setup-python@v3
8080

81-
# We disable pypi upload for now, because the name `ess` is not authorised
81+
# We disable pypi upload for now, because the name `ess` is not authorized
8282
# - uses: pypa/[email protected]
8383
# with:
8484
# user: __token__

docs/about/release-notes.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ Features
9999
~~~~~~~~
100100

101101
* Added resolution function for Amor and support for Orso file format in the ``reflectometry`` module `#115 <https://github.com/scipp/ess/pull/115>`_ (*Reflectometry*).
102-
* Added footprint correction, super-mirror calibration, and normalisation between sample and supermirror measurements on a per-pixel & per-Q-bin level in the Amor workflow `#97 <https://github.com/scipp/ess/pull/97>`_ (*Reflectometry*).
102+
* Added footprint correction, super-mirror calibration, and normalization between sample and supermirror measurements on a per-pixel & per-Q-bin level in the Amor workflow `#97 <https://github.com/scipp/ess/pull/97>`_ (*Reflectometry*).
103103

104104
Contributors
105105
~~~~~~~~~~~~
@@ -153,7 +153,7 @@ Breaking changes
153153

154154
* A major rewrite of the reflectometry code was undertaken `#61 <https://github.com/scipp/ess/pull/61>`_:
155155

156-
* The reflectometry and Amor Data classes were removed in favour of a formalism consisting of free-functions that accept Scipp DataArrays and Datasets.
156+
* The reflectometry and Amor Data classes were removed in favor of a formalism consisting of free-functions that accept Scipp DataArrays and Datasets.
157157
* Moved the chopper class from the ``wfm`` submodule to free functions in its own ``choppers`` module.
158158
* The unit conversion (computing wavelength and Q) now use ``transform_coords``.
159159
* The Amor reduction notebook from ``ess-notebooks`` has been imported into the ``ess`` repository.

docs/developer/style-guide.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Layout
1515
------
1616

1717
This repository is ESS instrument centric,
18-
and we therefore strongly prefer having all code organised into ``src/ess/{instrument}`` directories.
18+
and we therefore strongly prefer having all code organized into ``src/ess/{instrument}`` directories.
1919

2020
If your code is specific to the ESS facility,
2121
but is intended to be ubiquitous across a class of instruments,

docs/instruments/amor/amor_reduction.ipynb

+4-4
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@
5353
"![Figure5](https://ars.els-cdn.com/content/image/1-s2.0-S0168900216300250-gr5.jpg)\n",
5454
"\n",
5555
"The yellow area shows the incoming and reflected beam, both with the divergence $\\Delta \\theta$.\n",
56-
"The inclination of the sample relative to the centre of the incoming beam (here identical to the instrument horizon) is called $\\omega$, and the respective angle of the reflected beam relative to the same axis is $\\gamma$.\n",
56+
"The inclination of the sample relative to the center of the incoming beam (here identical to the instrument horizon) is called $\\omega$, and the respective angle of the reflected beam relative to the same axis is $\\gamma$.\n",
5757
"\n",
58-
"In general the detector centre is located at $\\gamma_{\\rm D} = 2\\omega$.\n",
58+
"In general the detector center is located at $\\gamma_{\\rm D} = 2\\omega$.\n",
5959
"These are instrument coordinates and should not be confused with the situation on the sample, where the take-off angle of an individual neutron trajectory is called $\\theta$.\n",
6060
"\n",
6161
"### The supermirror reference\n",
@@ -183,9 +183,9 @@
183183
"The pixel positions are wrong in the `sample.nxs` and `reference.nxs` files, and require an ad-hoc correction.\n",
184184
"We apply an arbitrary shift in the vertical (`y`) direction.\n",
185185
"We first move the pixels down by 0.955 degrees,\n",
186-
"so that the centre of the beam goes through the centre of the top half of the detector blades\n",
186+
"so that the center of the beam goes through the center of the top half of the detector blades\n",
187187
"(the bottom half of the detectors was turned off).\n",
188-
"Next, we move all the pixels so that the centre of the top half of the detector pixels lies at an angle of $2 \\omega$,\n",
188+
"Next, we move all the pixels so that the center of the top half of the detector pixels lies at an angle of $2 \\omega$,\n",
189189
"as described in the beamline diagram."
190190
]
191191
},

docs/techniques/wfm/introduction-to-wfm.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@
571571
"where each wavelength frame $N$ contains a subsequent part of the spectrum of the source pulse.\n",
572572
"\n",
573573
"The main reason for using the WFM concept is to redefine the burst time $t_{P} = \\Delta t$ as implied by Eq. (1), in order to match the required wavelength resolution of the experiment.\n",
574-
"A secondary objective, or constraint of the first, is to utilise as much of the source pulse as possible."
574+
"A secondary objective, or constraint of the first, is to utilize as much of the source pulse as possible."
575575
]
576576
},
577577
{

docs/techniques/wfm/reducing-wfm-data.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@
235235
"id": "d59e57c4",
236236
"metadata": {},
237237
"source": [
238-
"The `wfm.plot` submodule provides a useful tool to visualise the chopper cascade as a time-distance diagram.\n",
238+
"The `wfm.plot` submodule provides a useful tool to visualize the chopper cascade as a time-distance diagram.\n",
239239
"This is achieved by calling"
240240
]
241241
},

src/ess/amor/load.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def _tof_correction(data: sc.DataArray, dim: str = 'tof') -> sc.DataArray:
1515
"""
1616
A correction for the presence of the chopper with respect to the "true" ToF.
1717
Also fold the two pulses.
18-
TODO: generalise mechanism to fold any number of pulses.
18+
TODO: generalize mechanism to fold any number of pulses.
1919
2020
Parameters
2121
----------

src/ess/diffraction/corrections.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def normalize_by_monitor(data: sc.DataArray,
5353
mon = mon.rebin(wavelength=wavelength_edges)
5454
if smooth_args is not None:
5555
get_logger('diffraction').info(
56-
"Smoothing monitor '%s' for normalisation using "
56+
"Smoothing monitor '%s' for normalization using "
5757
"ess.diffraction.smoothing.lowpass with %s.", monitor, smooth_args)
5858
mon = lowpass(mon, dim='wavelength', **smooth_args)
5959
return data.bins / sc.lookup(func=mon, dim='wavelength')

src/ess/v20/imaging/beamline.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def make_beamline() -> dict:
1313
https://doi.org/10.1016/j.nima.2016.09.034
1414
1515
The +15.0 increments added to the angles correspond to an offset between the
16-
zero angle and the chopper top-dead centre.
16+
zero angle and the chopper top-dead center.
1717
"""
1818

1919
dim = 'frame'

src/ess/v20/imaging/operations.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def mask_from_adj_pixels(mask):
1717
"""
1818
Checks if the adjacent pixels (in 8 directions) are masked to remove
1919
any noisy pixels which are erroneously masked or unmasked compared to
20-
it's neighbours
20+
it's neighbors
2121
2222
If all adj. pixels are then the pixel considered is set to True
2323
If no adj. pixels are then the pixel considered is set to False
@@ -63,13 +63,13 @@ def make_flip(fill):
6363

6464
def mean_from_adj_pixels(data):
6565
"""
66-
Applies a mean across 8 neighboring pixels (plus centre value)
66+
Applies a mean across 8 neighboring pixels (plus center value)
6767
for data with 'x' and 'y' dimensions (at least).
6868
Result will calculate mean from slices across additional dimensions.
6969
7070
For example if there is a tof dimension in addition to x, and y,
71-
for each set of neighbours the returned mean will take the mean
72-
tof value in the neighbour group.
71+
for each set of neighbors the returned mean will take the mean
72+
tof value in the neighbor group.
7373
"""
7474
fill = np.finfo(data.values.dtype).min
7575
has_variances = data.variances is not None
@@ -105,13 +105,13 @@ def _median(neighbors, edges_mask, dim):
105105

106106
def median_from_adj_pixels(data):
107107
"""
108-
Applies a median across 8 neighboring pixels (plus centre value)
108+
Applies a median across 8 neighboring pixels (plus center value)
109109
for data with 'x' and 'y' dimensions (at least).
110110
Result will calculate median from slices across additional dimensions.
111111
112112
For example if there is a tof dimension in addition to x, and y,
113-
for each set of neighbours the returned median will take the median
114-
tof value in the neighbour group.
113+
for each set of neighbors the returned median will take the median
114+
tof value in the neighbor group.
115115
"""
116116
fill = np.finfo(data.values.dtype).min
117117
has_variances = data.variances is not None

src/ess/wfm/plot.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def time_distance_diagram(data: sc.DataArray, **kwargs) -> plt.Figure:
3333
ax.grid(True, color='lightgray', linestyle="dotted")
3434
ax.set_axisbelow(True)
3535

36-
# Draw a light grey rectangle from the origin to t_0 + pulse_length + t_0
36+
# Draw a light gray rectangle from the origin to t_0 + pulse_length + t_0
3737
# The second t_0 should in fact be the end of the pulse tail, but since this
3838
# information is not needed for computing the frame properties, it may
3939
# not be present in the description of the beamline.
@@ -47,7 +47,7 @@ def time_distance_diagram(data: sc.DataArray, **kwargs) -> plt.Figure:
4747
fc='lightgrey',
4848
ec='k',
4949
zorder=10))
50-
# Draw a dark grey rectangle from t_0 to t_0 + pulse_length to represent the usable
50+
# Draw a dark gray rectangle from t_0 to t_0 + pulse_length to represent the usable
5151
# pulse.
5252
ax.add_patch(
5353
Rectangle((data.meta["source_pulse_t_0"].value, 0),

tests/nexus/load_test.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def nxroot(request):
2929
"""
3030
with h5py.File('dummy.nxs', mode='w', driver="core", backing_store=False) as f:
3131
root = snx.NXroot(f)
32-
# This is modelled after the basic recommended NeXus structure
32+
# This is modeled after the basic recommended NeXus structure
3333
entry = root.create_class('entry0', snx.NXentry)
3434
entry['start_time'] = sc.scalar("yesterday")
3535
sample = entry.create_class('sample0', snx.NXsample)

tests/v20/operations_test.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def test_mean_filter(self):
6565
test_value = 4
6666
data = np.array([bulk_value] * 9 * 9 * 4, dtype=np.float64).reshape(9, 9, 4)
6767
data = sc.Variable(dims=['y', 'x', 'z'], values=data)
68-
data['z', 1]['x', 4]['y', 4].value = test_value # centre at z == 1
68+
data['z', 1]['x', 4]['y', 4].value = test_value # center at z == 1
6969
data['z', 2]['x', 4]['y', 0].value = test_value # edge at z == 3
7070
data['z', 3]['x', 0]['y', 0].value = test_value # corner at z == 2
7171

@@ -98,7 +98,7 @@ def test_median_filter(self):
9898
test_value = 4.0
9999
data = np.array([bulk_value] * 9 * 9 * 4, dtype=np.float64).reshape(9, 9, 4)
100100
data = sc.Variable(dims=['y', 'x', 'z'], values=data)
101-
data['z', 1]['x', 4]['y', 4].value = test_value # centre at z == 1
101+
data['z', 1]['x', 4]['y', 4].value = test_value # center at z == 1
102102

103103
data['z', 2]['x', 3]['y', 0].value = test_value # edge at z == 3
104104
data['z', 2]['x', 4]['y', 0].value = test_value # edge at z == 3

0 commit comments

Comments
 (0)