Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mantidproject
mantid
Commits
f33269a7
Commit
f33269a7
authored
Mar 29, 2021
by
Matt Cumber
Browse files
Re #30905 Added To CMake And Update Filenames
parent
9d66d23f
Changes
8
Hide whitespace changes
Inline
Side-by-side
Framework/DataHandling/src/LoadMuonNexus.cpp
View file @
f33269a7
...
...
@@ -97,21 +97,18 @@ void LoadMuonNexus::init() {
"Table or a group of tables containing detector dead times. Version 1 "
"only."
);
declareProperty
(
std
::
make_unique
<
WorkspaceProperty
<
Workspace
>>
(
"DetectorGroupingTable"
,
""
,
Direction
::
Output
,
PropertyMode
::
Optional
),
"Table or a group of tables with information about the "
"detector grouping stored in the file (if any). Version 1 only."
);
declareProperty
(
std
::
make_unique
<
ArrayProperty
<
std
::
string
>>
(
"PeriodsInformation"
),
"An array of strings which hold period information. This array is in the "
"format ['NumberOfSequences', 'Labels', 'Type', 'Frames', "
"'TotalFrames', 'Counts', 'Tag,]. Empty "
"strings "
"show no value "
"could be read from file."
);
declareProperty
(
std
::
make_unique
<
WorkspaceProperty
<
Workspace
>>
(
"DetectorGroupingTable"
,
""
,
Direction
::
Output
,
PropertyMode
::
Optional
),
"Table or a group of tables with information about the "
"detector grouping stored in the file (if any). Version 1 only."
);
declareProperty
(
std
::
make_unique
<
ArrayProperty
<
std
::
string
>>
(
"PeriodsInformation"
),
"An array of strings which hold period information. This array is in the "
"format ['NumberOfSequences', 'Labels', 'Type', 'Frames', "
"'TotalFrames', 'Counts', 'Tag,]. Empty "
"strings "
"show no value "
"could be read from file."
);
}
/// Validates the optional 'spectra to read' properties, if they have been set
...
...
Framework/Nexus/inc/MantidNexus/MuonNexusReader.h
View file @
f33269a7
...
...
@@ -31,13 +31,12 @@ class DLLExport MuonNexusReader {
@date 14/08/2008
*/
private:
std
::
string
nexus_instrument_name
;
///< name read from nexus file
std
::
string
nexus_samplename
;
///< sample name read from Nexus
int
nexusLogCount
;
///< number of NXlog sections read from file
std
::
vector
<
bool
>
logType
;
///< true if i'th log is numeric
std
::
vector
<
std
::
string
>
logNames
;
///< stores name read from file
std
::
vector
<
std
::
string
>
m_periodInformation
;
/// stores the information of the periods
std
::
string
nexus_instrument_name
;
///< name read from nexus file
std
::
string
nexus_samplename
;
///< sample name read from Nexus
int
nexusLogCount
;
///< number of NXlog sections read from file
std
::
vector
<
bool
>
logType
;
///< true if i'th log is numeric
std
::
vector
<
std
::
string
>
logNames
;
///< stores name read from file
std
::
vector
<
std
::
string
>
m_periodInformation
;
/// stores the information of the periods
void
openFirstNXentry
(
NeXus
::
File
&
handle
);
bool
readMuonLogData
(
NeXus
::
File
&
handle
);
///< method to read the fields of open NXlog section
std
::
vector
<
std
::
vector
<
float
>>
logValues
,
///< array of values for i'th NXlog section
...
...
@@ -87,10 +86,10 @@ public:
int
t_ntc1
;
///< number of time channels in time regime 1
int
t_nper
;
///< number of periods in file (=1 at present)
// for nexus histogram data
float
*
corrected_times
;
///< temp store for corrected times
int
*
counts
;
///< temp store of histogram data
int
*
detectorGroupings
;
///< detector grouping info
int
numDetectors
;
///< detector count
std
::
string
getInstrumentName
()
const
;
///< return instrument name
float
*
corrected_times
;
///< temp store for corrected times
int
*
counts
;
///< temp store of histogram data
int
*
detectorGroupings
;
///< detector grouping info
int
numDetectors
;
///< detector count
std
::
string
getInstrumentName
()
const
;
///< return instrument name
std
::
vector
<
std
::
string
>
getPeriodInfo
()
const
;
/// Return period information
};
Framework/Nexus/src/MuonNexusReader.cpp
View file @
f33269a7
...
...
@@ -125,10 +125,8 @@ void MuonNexusReader::readFromFile(const string &filename) {
// Try to read in period information
std
::
vector
<
std
::
string
>
periodInformation
{
"period_sequences"
,
"period_labels"
,
"period_type"
,
"frames_period_requested"
,
"frames_period_raw"
,
"total_counts_period"
,
"period_output"
};
"period_sequences"
,
"period_labels"
,
"period_type"
,
"frames_period_requested"
,
"frames_period_raw"
,
"total_counts_period"
,
"period_output"
};
try
{
handle
.
openGroup
(
"beam"
,
"NXbeam"
);
for
(
const
auto
&
info
:
periodInformation
)
{
...
...
@@ -138,8 +136,7 @@ void MuonNexusReader::readFromFile(const string &filename) {
int
temp
=
0
;
handle
.
readData
(
info
,
temp
);
tempString
=
std
::
to_string
(
temp
);
}
else
if
(
info
==
"frames_period_requested"
||
info
==
"frames_period_raw"
||
info
==
"period_type"
||
}
else
if
(
info
==
"frames_period_requested"
||
info
==
"frames_period_raw"
||
info
==
"period_type"
||
info
==
"period_output"
)
{
// Int array data
std
::
vector
<
int
>
temp
;
handle
.
readData
(
info
,
temp
);
...
...
@@ -364,6 +361,4 @@ bool MuonNexusReader::logTypeNumeric(const int i) const { return (logType[i]); }
*/
string
MuonNexusReader
::
getLogName
(
const
int
i
)
const
{
return
(
logNames
[
i
]);
}
std
::
vector
<
std
::
string
>
MuonNexusReader
::
getPeriodInfo
()
const
{
return
m_periodInformation
;
}
std
::
vector
<
std
::
string
>
MuonNexusReader
::
getPeriodInfo
()
const
{
return
m_periodInformation
;
}
scripts/Muon/GUI/Common/grouping_tab_widget/grouping_tab_widget_presenter.py
View file @
f33269a7
...
...
@@ -12,7 +12,7 @@ from Muon.GUI.Common import thread_model
from
Muon.GUI.Common.run_selection_dialog
import
RunSelectionDialog
from
Muon.GUI.Common.thread_model_wrapper
import
ThreadModelWrapper
from
Muon.GUI.Common.utilities.run_string_utils
import
run_string_to_list
from
Muon.GUI.Common.muon_period_info
import
MuonPeriodInfoWidget
,
CONTEXT_MAP
,
PERIOD_INFO_NOT_FOUND
,
INFO_DELIM
from
Muon.GUI.Common.muon_period_info
_widget
import
MuonPeriodInfoWidget
,
CONTEXT_MAP
,
PERIOD_INFO_NOT_FOUND
,
INFO_DELIM
class
GroupingTabPresenter
(
object
):
...
...
scripts/Muon/GUI/Common/muon_period_info.py
→
scripts/Muon/GUI/Common/muon_period_info
_widget
.py
View file @
f33269a7
File moved
scripts/test/Muon/CMakeLists.txt
View file @
f33269a7
...
...
@@ -73,6 +73,7 @@ set ( TEST_PY_FILES
muon_data_context_test.py
muon_group_pair_context_test.py
muon_gui_context_test.py
muon_period_info_widget_test.py
phase_table_widget/phase_table_context_test.py
phase_table_widget/phase_table_presenter_test.py
plot_widget/plot_widget_model_test.py
...
...
scripts/test/Muon/grouping_tab/grouping_tab_presenter_test.py
View file @
f33269a7
...
...
@@ -22,7 +22,7 @@ from Muon.GUI.Common.pairing_table_widget.pairing_table_widget_presenter import
from
Muon.GUI.Common.pairing_table_widget.pairing_table_widget_view
import
PairingTableView
from
Muon.GUI.Common.test_helpers.context_setup
import
setup_context_for_tests
from
Muon.GUI.Common.difference_table_widget.difference_widget_presenter
import
DifferencePresenter
from
Muon.GUI.Common.muon_period_info
import
PERIOD_INFO_NOT_FOUND
from
Muon.GUI.Common.muon_period_info
_widget
import
PERIOD_INFO_NOT_FOUND
def
pair_name
():
...
...
scripts/test/Muon/muon_period_info_test.py
→
scripts/test/Muon/muon_period_info_
widget_
test.py
View file @
f33269a7
...
...
@@ -7,7 +7,7 @@
import
unittest
from
mantidqt.utils.qt.testing
import
start_qapplication
from
Muon.GUI.Common.muon_period_info
import
MuonPeriodInfoWidget
,
CYCLES_NOT_FOUND
,
DAQ
,
DWELL
,
NOT_DAQ_STRING
from
Muon.GUI.Common.muon_period_info
_widget
import
MuonPeriodInfoWidget
,
CYCLES_NOT_FOUND
,
DAQ
,
DWELL
,
NOT_DAQ_STRING
@
start_qapplication
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment