Class to load cansas 1D XML files
Dependencies : | The CanSas reader requires PyXML 0.8.4 or later. |
---|
Parse a SASentry
Parameters: | node – SASentry node |
---|---|
Returns: | Data1D object |
Get the content of a xpath location and store the result. The value is treated as a string.
The xpath location might or might not exist. If it does not exist, nothing is done
Parameters: |
|
---|---|
Returns: | return a list of errors |
Get the content of a xpath location and store the result. Check that the units are compatible with the destination. The value is expected to be a float.
The xpath location might or might not exist. If it does not exist, nothing is done
Parameters: |
|
---|---|
Raises ValueError: | |
raised when the units are not recognized |
Create an XML document to contain the content of a Data1D
Parameters: | datainfo – Data1D object |
---|
Load data file
Parameters: | path – file path |
---|---|
Returns: | Data1D object if a single SASentry was found, or a list of Data1D objects if multiple entries were found, or None of nothing was found |
Raises: |
|
Write the content of a Data1D as a CanSAS XML file
Parameters: |
|
---|
Get the first instance of the content of a xpath location.
Parameters: |
|
---|---|
Returns: | Element, or None |
Get the content of a node as a float
Parameters: |
|
---|
Parameters: |
|
---|---|
Returns: | True if something was appended, otherwise False |