IGOR 2D reduced file reader
Class to load IGOR reduced .ABS files
Load data file.
Parameters: | path – file path |
---|---|
Returns: | Data1D object, or None |
Raises: |
|
ASCII reader
Class to load ascii files (2, 3 or 4 columns).
Load data file
Parameters: | path – file path |
---|---|
Returns: | Data1D object, or None |
Raises: |
|
Module to associate default readers to file extensions. The module reads an xml file to get the readers for each file extension. The readers are tried in order they appear when reading a file.
Read the specified settings file to associate default readers to file extension.
Parameters: |
|
---|
Function called by the registry/loader object to register all default readers using a call back function.
WARNING: | this method is now obsolete |
---|---|
Parameters: | registry_function – function to be called to register each reader |
Information relating to the CanSAS data format. These constants are used in the cansas_reader.py file to read in any version of the cansas format.
The base class to define where all of the data is to be saved by cansas_reader.py.
Helper method to get the names namespace list
Method to iterate through a cansas constants tree based on a list of names
Parameters: | namespace – A list of names that match the tree structure of cansas_constants |
---|
A helper class to hold information on where you are in the constants tree
Helper method to get the current_level map
Helper method to get the ns_datatype label
Helper method to get the ns_variable label
CanSAS data reader - new recursive cansas_version.
Bases: sas.dataloader.readers.xml_reader.XMLreader
Class to load cansas 1D XML files
Dependencies: | The CanSAS reader requires PyXML 0.8.4 or later. |
---|
Checks to see if the xml file is a CanSAS file
Parameters: | ext – The file extension of the data file |
---|
Loads the file and associates a schema, if a known schema exists
Parameters: | xml_file – The xml file path sent to Reader.read |
---|
Validate and read in an xml_file file in the canSAS format.
Parameters: | xml_file – A canSAS file path in proper XML format |
---|
Write the content of a Data1D as a CanSAS XML file
Parameters: |
|
---|
Parameters: |
|
---|---|
Returns: | True if something was appended, otherwise False |
Get the first instance of the content of a xpath location.
Parameters: |
|
---|---|
Returns: | Element, or None |
Parameters: |
|
---|---|
Returns: | True if something was appended, otherwise False |
DANSE/SANS file reader
HFIR 1D 4-column data reader
Bases: object
Class to load HFIR 1D 4-column files
Load data file
Parameters: | path – file path |
---|---|
Returns: | Data1D object, or None |
Raises: |
|
Nexus reader for 2D data reduced by Mantid
TXT/IGOR 2D Q Map file reader
Simple data reader for Igor data files
Read file
Write to .dat
Parameters: |
|
---|
check point validity
Image reader. Untested.
Generic XML read and write utility
Usage: Either extend xml_reader or add as a class variable.
Generic XML read and write class. Mostly helper functions. Makes reading/writing XML a bit easier than calling lxml libraries directly.
Dependencies: | This class requires lxml 2.3 or higher. |
---|
Append an etree Element to an ElementTree.
Parameters: |
|
---|
Method to break a processing instruction string apart and add to a dict
Parameters: |
|
---|
Create an XML element for writing to file
Parameters: | name – The name of the element to be created |
---|
Create an element from an XML string
Parameters: | xml_string – A string of xml |
---|
Create an element tree for processing from an etree element
Parameters: | root – etree Element(s) |
---|
Use lxml E builder class with arbitrary inputs.
Parameters: |
|
---|
Finds the first offending element that should not be present in XML file
Creates a dictionary of the parsed schema and xml files.
Read in an XML file into memory and return an lxml dictionary
Get all processing instructions saved when loading the document
Parameters: | tree – etree.ElementTree object to write PIs to |
---|
Find the encoding in the xml declaration and save it as a string
Parameters: | attr_str – All attributes as a string e.g. “foo1=”bar1” foo2=”bar2” foo3=”bar3” ... foo_n=”bar_n”“ |
---|
Take out all processing instructions and create a dictionary from them If there is a default encoding, the value is also saved
Set the schema file and parse
Set the XML file and parse
Converts an etree element into a string
Checks to see if the XML file meets the schema
Write attributes to an Element
Parameters: |
|
---|
Write text to an etree Element
Parameters: |
|
---|
Return the location of the settings file for the data readers.