Skip to content

Commit 7caa6d1

Browse files
committed
Make naming of NXcanSAS consistent.
The correct format of NXcanSAS has a lowercase can. Make this the place throughout the project to avoid confusion. RE mantidproject#38523
1 parent 681b75e commit 7caa6d1

File tree

7 files changed

+18
-18
lines changed

7 files changed

+18
-18
lines changed

Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSSave.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def PyInit(self):
110110

111111
self.setPropertyGroup("Nexus", "FileFormats")
112112
self.setPropertyGroup("CanSAS", "FileFormats")
113-
self.setPropertyGroup("NXCanSAS", "FileFormats")
113+
self.setPropertyGroup("NXcanSAS", "FileFormats")
114114
self.setPropertyGroup("PolarizedNXcanSAS", "FileFormats")
115115
self.setPropertyGroup("NistQxy", "FileFormats")
116116
self.setPropertyGroup("RKH", "FileFormats")
@@ -312,11 +312,11 @@ def _validate_workspace(self, errors, input_workspace):
312312
def _validate_pol_props(self, errors):
313313
polarization_props = self.getProperty("PolarizationProps").value
314314
if not polarization_props:
315-
errors.update({"PolarizationProps": "PolarizationProps must be set to use SavePolarizedNXCanSAS."})
315+
errors.update({"PolarizationProps": "PolarizationProps must be set to use SavePolarizedNXcanSAS."})
316316
return
317317
if "InputSpinStates" not in polarization_props.keys():
318318
errors.update(
319-
{"PolarizationProps": "Missing property for SavePolarizedNXCanSAS. These properties are missing: InputSpinStates."}
319+
{"PolarizationProps": "Missing property for SavePolarizedNXcanSAS. These properties are missing: InputSpinStates."}
320320
)
321321

322322
def _get_file_formats(self):

Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSSaveTest.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def test_that_run_number_properties_can_be_set(self):
6666
"UseZeroErrorFree": False,
6767
"Nexus": False,
6868
"CanSAS": False,
69-
"NXCanSAS": True,
69+
"NXcanSAS": True,
7070
"NistQxy": False,
7171
"RKH": False,
7272
"CSV": False,
@@ -92,7 +92,7 @@ def test_that_workspace_can_be_saved_without_zero_error_free_option(self):
9292
"UseZeroErrorFree": use_zero_errors_free,
9393
"Nexus": True,
9494
"CanSAS": True,
95-
"NXCanSAS": True,
95+
"NXcanSAS": True,
9696
"NistQxy": True,
9797
"RKH": True,
9898
"CSV": True,
@@ -132,7 +132,7 @@ def test_that_nistqxy_cannot_be_saved_if_axis_is_spectra_axis(self):
132132
"UseZeroErrorFree": use_zero_errors_free,
133133
"Nexus": False,
134134
"CanSAS": False,
135-
"NXCanSAS": False,
135+
"NXcanSAS": False,
136136
"NistQxy": True,
137137
"RKH": False,
138138
"CSV": False,
@@ -159,7 +159,7 @@ def test_that_if_no_format_is_selected_raises(self):
159159
"UseZeroErrorFree": use_zero_errors_free,
160160
"Nexus": False,
161161
"CanSAS": False,
162-
"NXCanSAS": False,
162+
"NXcanSAS": False,
163163
"NistQxy": False,
164164
"RKH": False,
165165
"CSV": False,
@@ -186,7 +186,7 @@ def test_that_zero_error_is_removed(self):
186186
"UseZeroErrorFree": use_zero_errors_free,
187187
"Nexus": True,
188188
"CanSAS": False,
189-
"NXCanSAS": False,
189+
"NXcanSAS": False,
190190
"NistQxy": False,
191191
"RKH": False,
192192
"CSV": False,
@@ -223,12 +223,12 @@ def test_polarization_props_must_be_set_when_polarized_nx_can_sas_set(self):
223223
save_options = {
224224
"InputWorkspace": workspace,
225225
"Filename": file_name,
226-
"PolarizedNXCanSAS": True,
226+
"PolarizedNXcanSAS": True,
227227
}
228228
save_alg = create_unmanaged_algorithm(save_name, **save_options)
229229
save_alg.setRethrows(True)
230230
# Act
231-
self.assertRaisesRegex(RuntimeError, "PolarizationProps must be set to use SavePolarizedNXCanSAS.", save_alg.execute)
231+
self.assertRaisesRegex(RuntimeError, "PolarizationProps must be set to use SavePolarizedNXcanSAS.", save_alg.execute)
232232

233233
def test_workspace_must_be_group_to_use_polarized_nx_can_sas(self):
234234
# Arrange
@@ -238,7 +238,7 @@ def test_workspace_must_be_group_to_use_polarized_nx_can_sas(self):
238238
save_options = {
239239
"InputWorkspace": workspace,
240240
"Filename": file_name,
241-
"PolarizedNXCanSAS": True,
241+
"PolarizedNXcanSAS": True,
242242
}
243243
save_alg = create_unmanaged_algorithm(save_name, **save_options)
244244
save_alg.setRethrows(True)
@@ -258,13 +258,13 @@ def test_polarization_props_throws_when_any_mandatory_properties_unset(self):
258258
}
259259
with self.assertRaisesRegex(
260260
RuntimeError,
261-
".*PolarizationProps: Missing property for SavePolarizedNXCanSAS. These properties are missing: InputSpinStates",
261+
".*PolarizationProps: Missing property for SavePolarizedNXcanSAS. These properties are missing: InputSpinStates",
262262
):
263263
# Act
264264
SANSSave(
265265
InputWorkspace=workspace,
266266
Filename=file_name,
267-
PolarizedNXCanSAS=True,
267+
PolarizedNXcanSAS=True,
268268
PolarizationProps=pol_props,
269269
)
270270

docs/source/release/v4.1.0/sans.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Improvements
2929
- The **diagnostic** page icon has been changed from a question mark to a stethoscope, to distinguish it from the **Help** page icon. The **Export Table** button now has an icon. There have been minor icon changes elsewhere on the interface.
3030
- Sample thickness, height, and width can be read from a batch file. These parameters are also included in the batch file generated from exporting the table.
3131
- The beam centre HAB/LAB update checkboxes are automatically deselected if you select LAB/HAB as the reduction mode, respectively.
32-
- The run numbers for sample transmission, sample direct, can scatter, and can direct workspaces are now added to NXCanSAS and CanSAS files.
32+
- The run numbers for sample transmission, sample direct, can scatter, and can direct workspaces are now added to NXcanSAS and CanSAS files.
3333

3434

3535
Bug Fixes

docs/source/release/v5.1.0/sans.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ New
1212
###
1313

1414
- A new algorithm :ref:`SANSILLParameterScan <algm-SANSILLParameterScan>` added, used to treat data from ILL's D16 on omega scan mode.
15-
- :ref:`SaveCanSAS1D <algm-SaveCanSAS1D>` and :ref:`SaveNXCanSAS <algm-SaveNXCanSAS>` now include the batch
15+
- :ref:`SaveCanSAS1D <algm-SaveCanSAS1D>` and :ref:`SaveNXcanSAS <algm-SaveNXcanSAS>` now include the batch
1616
file name in their metadata if one was used to produce the output.
1717

1818
Improvements

docs/source/release/v6.9.0/sans.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ SANS Changes
77

88
New Features
99
------------
10-
- Metadata indicating the subtracted workspace and the scale factor is now saved to CanSAS1D and NXCanSAS subtracted
10+
- Metadata indicating the subtracted workspace and the scale factor is now saved to CanSAS1D and NXcanSAS subtracted
1111
output files when a :ref:`ISIS_SANS_scaled_background-ref` has been performed. This information is located in
1212
``SASprocess``.
1313
- All beam centre settings can now be left uncommented in the TOML file. The appropriate beam centre values will now be

scripts/SANS/sans/algorithm_detail/save_workspace.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def save_to_file(workspace, file_format, file_name, additional_properties, addit
2727
:param file_name: the file name.
2828
:param additional_properties: a dict of additional save algorithm inputs
2929
e.g. Transmission and TransmissionCan for SaveCanSAS1D-v2
30-
:param additional_run_numbers: a dict of workspace type to run number. Used in SaveNXCanSAS only.
30+
:param additional_run_numbers: a dict of workspace type to run number. Used in SaveNXcanSAS only.
3131
:return:
3232
"""
3333
save_options = {"InputWorkspace": workspace}

scripts/SANS/sans/command_interface/ISISCommandInterface.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ def set_save(
532532
save_algs.append(SaveType.CAN_SAS)
533533
case "SaveCSV":
534534
save_algs.append(SaveType.CSV)
535-
case "SaveNXCanSAS":
535+
case "SaveNXcanSAS":
536536
save_algs.append(SaveType.NX_CAN_SAS)
537537
case _:
538538
raise RuntimeError(f"The save format {key} is not known")

0 commit comments

Comments
 (0)