18#include "MantidDataHandling/DllConfig.h"
23namespace DataHandling {
41 const std::string
name()
const override {
return "LoadFITS"; }
44 const std::string
summary()
const override {
return "Load FITS files into workspaces of type Workspace2D."; }
47 int version()
const override {
return 1; }
48 const std::vector<std::string>
seeAlso()
const override {
return {
"Load",
"SaveFITS"}; }
51 const std::string
category()
const override {
return "DataHandling\\Imaging"; }
67 void loadHeader(
const std::string &filePath,
FITSInfo &header);
73 void doLoadFiles(
const std::vector<std::string> &paths,
const std::string &outWSName,
bool loadAsRectImg,
int binSize,
77 void parseHeader(
FITSInfo &headerInfo);
83 bool loadAsRectImg =
false,
int binSize = 1,
double noiseThresh =
false);
86 int binSize,
double cmpp);
90 std::vector<char> &buffer);
95 std::vector<char> &buffer);
97 void readInBuffer(
const FITSInfo &fileInfo, std::vector<char> &buffer,
size_t len);
107 bool isInstrOtherThanIMAT(
const FITSInfo &hdr);
109 void setupDefaultKeywordNames();
112 void mapHeaderKeys();
116 size_t fetchNumber(
const std::string &name);
119 std::string padZeros(
const size_t number,
const size_t totalDigitCount);
141 static const size_t g_DIGIT_SIZE_APPEND = 6;
145 static const int g_BASE_HEADER_SIZE = 2880;
Defines an interface to an algorithm that loads a file so that it can take part in the automatic sele...
LoadFITS: Load one or more of FITS files into a Workspace2D.
std::string m_headerRotationKey
static const size_t g_maxBitDepth
std::string m_headerBitDepthKey
static const std::string g_AXIS_NAMES_NAME
std::string m_headerNAxisNameKey
const std::string name() const override
Algorithm's name for identification overriding a virtual method.
int version() const override
Algorithm's version for identification overriding a virtual method.
static const std::string g_XTENSION_KEYNAME
static const std::string g_COMMENT_KEYNAME
std::string m_headerImageKeyKey
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso (these are not validated) algorithms related to this algorithm....
static const size_t g_maxBytesPP
std::vector< std::string > m_headerAxisNameKeys
static const std::string g_BIT_DEPTH_NAME
bool loadMutipleAsOne() override
Returns a value indicating whether or not loader wants to load multiple files into a single workspace...
static const std::string g_HEADER_MAP_NAME
static const std::string g_defaultImgType
std::string m_headerScaleKey
const std::string summary() const override
Summary of algorithms purpose.
std::string m_headerOffsetKey
std::string m_sampleRotation
static const std::string g_END_KEYNAME
static const std::string g_IMAGE_KEY_NAME
static const std::string g_ROTATION_NAME
const std::string category() const override
Algorithm's category for identification overriding a virtual method.
Defines a wrapper around an open file.
std::vector< std::vector< double > > MantidImage
typedef for the image type
std::shared_ptr< Workspace2D > Workspace2D_sptr
shared pointer to Mantid::DataObjects::Workspace2D
Helper class which provides the Collimation Length for SANS instruments.