Demeter

Description Perl tools for X-ray Absorption Spectroscopy
Demeter > Perl Modules > Demeter::Data::Beamlines
Source

NAME

Demeter::Data::Beamlines - Role for identifying the beamline provenance of data

VERSION

This documentation refers to Demeter version 0.9.26.

DESCRIPTION

Using plugins found in Demeter/Plugins/Beamlines, attempt to identify the beamline of origin of the data file. If identified, attempt to glean metadata from the file header.

ATTRIBUTES

daq (string)

The name of the data acquisition program used to collect the data.

beamline (string)

The designation of the beamline at which the data were collected.

beamline_identified (boolean)

Set to true once the beamline has been positively identified.

METHODS

There is only one method -- identify_beamline. This steps through the plugins found in Demeter/Plugins/Beamlines, each of which must provide a method called is. Each plugin's is method is called in turn. Once one returns a positive, metadata is set and this method returns.

These checks can be completely disabled by setting the operations-identify_beamline> configuration parameter to 0.

A beamline plugin provides one (and only one) method. This method must be called is.

This method is called like so:

    Demeter::Plugin::Beamlines::MX->is($data, $file);

where $data is the Demeter::Data object that represents the data in the file and $file is the fully resolved filename of the file being tested.

Each is method must perform the following chores:

  1. Very quickly recognize whether a file comes from the beamline. Speed is essential as every file will be checked sequentially against every beamline plugin. If a beamline plugin is slow to determine this, then the use of Athena or other applications will be noticeably affected.

  2. Recognize semantic content from the file header. Where possible, map this content onto defined XDI headers. Other semantic content should be placed into extension headers.

  3. Add versioning information for the data acquisition program into the XDI extra_version attribute.

  4. Set the daq and beamline attributes of the Demeter::Data object with the names of the data acquisition software and the designation of the beamline.

is is not required to read the data table and is encouraged not to do so. Of course, if there is semantic content in the data table intended to be interpreted as metadata, then it would be appropriate. But ... ick ...!

Hints for plugin writers

BUGS AND LIMITATIONS

Please report problems to the Ifeffit Mailing List (http://cars9.uchicago.edu/mailman/listinfo/ifeffit/)

Patches are welcome.

AUTHOR

Bruce Ravel, http://bruceravel.github.io/home

http://bruceravel.github.io/demeter/

LICENCE AND COPYRIGHT

Copyright (c) 2006-2018 Bruce Ravel (http://bruceravel.github.io/home). All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlgpl.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.