Data Loader Plugins¶
default
Default data loader¶
Loads the data from whitespace seperated column formatted ascii data files. The module allows the specification of which columns that correspond to the x, y and y_error columns in the data file. If y_error is not used the it can safely be set to the same column as y.
Which columns that are imported are determined from the dialog box in import settings. Note that these settings apply to the marked data set(s). Other possible tunings are the definitions of delimiter, None means any white space character (default). Skip rows is how many rows are skipped before the file is started to be read. Comment is the first character of a commented line.
- class genx.plugins.data_loaders.default.Plugin(parent)¶
- LoadData(dataset, filename, data_id=0)¶
LoadData(self, dataset, filename) –> none
Loads the data from filename into the dataset object.
- SettingsDialog()¶
SettingsDialog(self) –> None
This function should - if necessary implement a dialog box that allows the user set import settings for example.
resolution
Data loader that includes the resoultion¶
Loads files in a four column format where the fourth column contains the resolution of the experiment. Note that all reflectivity modules uses the standard deviation as a the resolution. Some instruments might use the FWHM instead.
The default columns are the following:
First column q values
Second column Intensitiy values
Third values The uncertainty in the Intensities
Fourth column resolution
The other settings are just as in the default data loader.
The resolution is stored as the member variable res. For data set 0 it can accessed as data[0].res
- class genx.plugins.data_loaders.resolution.Plugin(parent)¶
- LoadData(dataset, filename, data_id=0)¶
LoadData(self, dataset, filename) –> none
Loads the data from filename into the data_item_number.
- SettingsDialog()¶
SettingsDialog(self) –> None
This function should - if necessary implement a dialog box that allows the user set import settings for example.
amor
Amor at SINQ reflectometer data loader¶
Loads the default datafile format used for extracted reflectivity at the SINQ reflectometer Amor.
auto
Data loader that selects plugin by extension¶
Loads files using an other data loader that fits the file extension extracted from the file. If none if found it falls back to the resolution loader if there res column is configured, otherwise the default loader is used.
See the other data loaders for detailed explanation.
- class genx.plugins.data_loaders.auto.Plugin(parent)¶
Automatic selected data loader.
Plugins having fixed columns have to be put into the loaders list, if flexible columns are used they are part of the inheritance and can only use the columns defined in the ResolutionPlugin class.
- CountDatasets(file_path)¶
Count the number of dataset in a file. Default implementation of dataloader allows for only one item.
- LoadData(dataset, filename, data_id=0)¶
LoadData(self, dataset, filename) –> none
Loads the data from filename into the data_item_number.
d17_cosmos
D17 cosmos data loader¶
Loads .out files from the cosmos program that is used to process time of flight data from the D17 iunstrument at the ILL.
The default columns are the following:
First column q values
Second column Intensitiy values
Third values The unceratinty in the Intensities
Fourth column q-resolution
The data loader skips the first 36 lines of the file which is assumed to be the header. The other settings are just as in the default data loader.
The resolution is stored as the member variable res. Can be accessed, for data set 0, data[0].x
- class genx.plugins.data_loaders.d17_cosmos.Plugin(parent=None)¶
- LoadData(dataset, filename, data_id=0)¶
LoadData(self, data_item_number, filename) –> none
Loads the data from filename into the data_item_number.
- SettingsDialog()¶
SettingsDialog(self) –> None
This function should - if necessary implement a dialog box that allows the user set import settings for example.
- wildcard = '*.mft'¶
d17_cosmos
D17 cosmos data loader¶
Loads .out files from the cosmos program that is used to process time of flight data from the D17 iunstrument at the ILL.
The default columns are the following:
First column q values
Second column Intensitiy values
Third values The unceratinty in the Intensities
Fourth column q-resolution
The data loader skips the first 36 lines of the file which is assumed to be the header. The other settings are just as in the default data loader.
The resolution is stored as the member variable res. Can be accessed, for data set 0, data[0].x
- class genx.plugins.data_loaders.d17_legacy.Plugin(parent=None)¶
- LoadData(dataset, filename, data_id=0)¶
LoadData(self, data_item_number, filename) –> none
Loads the data from filename into the data_item_number.
- SettingsDialog()¶
SettingsDialog(self) –> None
This function should - if necessary implement a dialog box that allows the user set import settings for example.
- wildcard = '*.out'¶
rigaku
Rigaku ASCII file from Smartlab (*.ras)¶
Loads the data exported by Rigaku Smartlab.
orso
SINQ SIX standard file from PSI¶
Load the simple text format used at the PSI SINQ neutron source. Reads all clumns but uses s2t as standard x.
- class genx.plugins.data_loaders.sinq_six.Plugin(parent=None)¶
- CanOpen(file_path)¶
Return if the data loader class can open the given file. Default implementation just checks if the filename matches the wildcard, if it exists.
- LoadData(dataset, filename, data_id=0)¶
Loads the data from filename into the data_item_number.
- wildcard = '*.dat'¶
sns_mr
SNS magnetism reflectometer data loader¶
Loads the default datafile format used for extracted reflectivity at the SNS magnetism reflectometer. It allows to import several channels at once, automatically naming the datasets according to the imported polarizations.
- class genx.plugins.data_loaders.sns_mr.Plugin(parent)¶
- CanOpen(file_path)¶
Return if the data loader class can open the given file. Default implementation just checks if the filename matches the wildcard, if it exists.
- LoadData(dataset, filename, data_id=0)¶
LoadData(self, data_item_number, filename) –> none
Loads the data from filename into the data_item_number.
- wildcard = '*.dat'¶
sls_sxrd
SLD sxrd data loader¶
Loads the data from whitespace seperated column formatted ascii data files. It is intended for surface x-ray diffraction data where the data sets consists of rod scans along the l-direction (perpendicular to the surface). The plugin sorts each rod with equal h and k values into one data sets. The l-direction is also sorted.
The default columns are the following:
First column h values
Second column k values
Third values l values
Fourth column Intensites
Fifth column The standard deviation of the intensities.
The other settings are just as in the default data loader.
The h,k values is stored as extra data in data.extra_data dictonary as h and k.
- class genx.plugins.data_loaders.sls_sxrd.Plugin(parent)¶
- LoadData(dataset, filename, data_id=0)¶
LoadData(self, dataset, filename) –> none
Loads the data from filename into the dataset.
- SettingsDialog()¶
SettingsDialog(self) –> None
This function should - if necessary implement a dialog box that allows the user set import settings for example.
xrdml
XRDML data loader¶
Loads the data from Philips XPert instrument.
- class genx.plugins.data_loaders.xrdml.Plugin(parent)¶
- CountDatasets(file_path)¶
Count the number of dataset in a file. Default implementation of dataloader allows for only one item.
- LoadData(dataset, filename, data_id=0)¶
Loads the data from filename into the data_item_number.
- SettingsDialog()¶
This function should - if necessary implement a dialog box that allows the user set import settings for example.
- wildcard = '*.xrdml'¶
- genx.plugins.data_loaders.xrdml.ReadXpert(file_name)¶
Read the data of a philips X’Pert diffractometer file, exported as text files.