Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
efeaea26
"ReadMe.md" did not exist on "687bc6164db8cd5c3d5d1cf548be42a790a652fb"
Commit
efeaea26
authored
9 years ago
by
Federico Montesino Pouzols
Browse files
Options
Downloads
Patches
Plain Diff
remove unnecessary members, reorganize methods,, re #13994
parent
f6f123ec
No related branches found
No related tags found
No related merge requests found
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Framework/DataHandling/inc/MantidDataHandling/LoadFITS.h
+19
-23
19 additions, 23 deletions
Framework/DataHandling/inc/MantidDataHandling/LoadFITS.h
Framework/DataHandling/src/LoadFITS.cpp
+306
-283
306 additions, 283 deletions
Framework/DataHandling/src/LoadFITS.cpp
with
325 additions
and
306 deletions
Framework/DataHandling/inc/MantidDataHandling/LoadFITS.h
+
19
−
23
View file @
efeaea26
...
...
@@ -97,27 +97,30 @@ private:
/// Execution code
void
exec
();
/// Loads files into workspace(s)
void
doLoadFiles
(
const
std
::
vector
<
std
::
string
>
&
paths
,
const
std
::
string
&
outWSName
,
bool
loadAsRectImg
=
false
);
/// Loads the FITS header(s) into a struct
void
doLoadHeaders
(
const
std
::
vector
<
std
::
string
>
&
paths
,
std
::
vector
<
FITSInfo
>
&
headers
);
/// Once loaded, check against standard and limitations of this algorithm
void
headerSanityCheck
(
const
FITSInfo
&
hdr
,
const
FITSInfo
&
hdrFirst
);
/// Loads files into workspace(s)
void
doLoadFiles
(
const
std
::
vector
<
std
::
string
>
&
paths
,
const
std
::
string
&
outWSName
,
bool
loadAsRectImg
,
int
binSize
,
double
noiseThresh
);
/// Parses the header values for the FITS file
void
parseHeader
(
FITSInfo
&
headerInfo
);
/// Initialises a workspace with IDF and fills it with data
DataObjects
::
Workspace2D_sptr
makeWorkspace
(
const
FITSInfo
&
fileInfo
,
size_t
&
newFileNumber
,
std
::
vector
<
char
>
&
buffer
,
API
::
MantidImage
&
imageY
,
API
::
MantidImage
&
imageE
,
const
DataObjects
::
Workspace2D_sptr
parent
,
bool
loadAsRectImg
=
false
);
DataObjects
::
Workspace2D_sptr
makeWorkspace
(
const
FITSInfo
&
fileInfo
,
size_t
&
newFileNumber
,
std
::
vector
<
char
>
&
buffer
,
API
::
MantidImage
&
imageY
,
API
::
MantidImage
&
imageE
,
const
DataObjects
::
Workspace2D_sptr
parent
,
bool
loadAsRectImg
=
false
,
int
binSize
=
1
,
double
noiseThresh
=
false
);
void
addAxesInfoAndLogs
(
DataObjects
::
Workspace2D_sptr
ws
,
bool
loadAsRectImg
,
const
FITSInfo
&
fileInfo
,
double
cmpp
);
const
FITSInfo
&
fileInfo
,
int
binSize
,
double
cmpp
);
// Reads the data from a single FITS file into a workspace (directly, fast)
void
readDataToWorkspace
(
const
FITSInfo
&
fileInfo
,
double
cmpp
,
...
...
@@ -132,9 +135,6 @@ private:
void
readInBuffer
(
const
FITSInfo
&
fileInfo
,
std
::
vector
<
char
>
&
buffer
,
size_t
len
);
/// Once loaded, check against standard and limitations of this algorithm
void
headerSanityCheck
(
const
FITSInfo
&
hdr
,
const
FITSInfo
&
hdrFirst
);
/// filter noise pixel by pixel
void
doFilterNoise
(
double
thresh
,
API
::
MantidImage
&
imageY
,
API
::
MantidImage
&
imageE
);
...
...
@@ -148,16 +148,16 @@ private:
void
setupDefaultKeywordNames
();
// Maps the header keys to specified values
void
mapHeaderKeys
();
/// Returns the trailing number from a string minus leading 0's (so 25 from
/// workspace_00025)
/// workspace_000
0
25)
size_t
fetchNumber
(
const
std
::
string
&
name
);
// Adds a number of leading 0's to another number up to the totalDigitCount.
std
::
string
padZeros
(
const
size_t
number
,
const
size_t
totalDigitCount
);
// Maps the header keys to specified values
void
mapHeaderKeys
();
// Strings used to map header keys
std
::
string
m_headerScaleKey
;
std
::
string
m_headerOffsetKey
;
...
...
@@ -176,14 +176,10 @@ private:
std
::
string
m_baseName
;
size_t
m_pixelCount
;
// rebin block size (m_rebin x m_rebin) cells
int
m_rebin
;
// noise threshold level
double
m_noiseThresh
;
// Number of digits for the fixed width appendix number added to
// workspace names, i.e. 3=> workspace_001; 5 => workspace_00001
static
const
size_t
g_DIGIT_SIZE_APPEND
=
5
;
static
const
size_t
g_DIGIT_SIZE_APPEND
=
6
;
/// size of a FITS header block (room for 36 entries, of 80
/// characters each), in bytes. A FITS header always comes in
/// multiples of this block.
...
...
This diff is collapsed.
Click to expand it.
Framework/DataHandling/src/LoadFITS.cpp
+
306
−
283
View file @
efeaea26
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment