Ignore:
Timestamp:
Feb 22, 2019 9:35:29 AM (3 years ago)
Author:
toby
Message:

fix cif export w/unused histogram; switch 3.x imports to pickle w/warn if _pickle not available; doc fixes; scriptable enhancements

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/docs/source/imports.rst

    r3823 r3828  
    44Imports are implemented by deriving a class from
    55:class:`GSASIIobj.ImportPhase`, :class:`GSASIIobj.ImportStructFactor`,
    6 :class:`GSASIIobj.ImportPowderData`
    7 or :class:`GSASIIIO.ImportPowderData` (which are in turn
     6:class:`GSASIIobj.ImportPowderData` ,
     7:class:`GSASIIobj.ImportSmallAngleData`, 
     8:class:`GSASIIobj.ImportReflectometryData`, 
     9:class:`GSASIIobj.ImportPDFData`, 
     10or :class:`GSASIIobj.ImportImage` (which are in turn
    811derived from :class:`GSASIIobj.ImportBaseclass`)
    912to implement import of
     
    1114Module file names (`G2phase_`, `G2pwd_` and `G2sfact_`, etc.) are used to
    1215determine which menu an import routine should be placed into. (N.B. this
    13 was an unnecessary choice; this could be done from the class used.)
    14 
    15 This list may not include all currently defined formats, since modules
    16 may be loaded from anywhere in the path.
     16naming was an unnecessary choice; importer types could be determined
     17from the base class.)
     18
     19Most importers are listed below by type (provided this documentation is
     20up to date), but note that since modules
     21may be loaded from anywhere in the path, your installation could have
     22locally-defined importers as well.
    1723
    1824.. _import_routines:
     
    2228
    2329When writing a import routine, one should create a new class derived
    24 from :class:`GSASIIIO.ImportPhase`, :class:`GSASIIIO.ImportStructFactor`
    25 or :class:`GSASIIIO.ImportPowderData`. As described below,
     30from
     31:class:`GSASIIobj.ImportPhase`, :class:`GSASIIobj.ImportStructFactor`,
     32:class:`GSASIIobj.ImportPowderData` ,
     33:class:`GSASIIobj.ImportSmallAngleData`, 
     34:class:`GSASIIobj.ImportReflectometryData`, 
     35:class:`GSASIIobj.ImportPDFData`, 
     36or :class:`GSASIIobj.ImportImage`. As described below,
    2637all these classes will implement
    2738an ``__init__()`` and a ``Reader()`` method, and most will supply a
    2839``ContentsValidator()`` method, too.
    29 See the :class:`~GSASIIIO.ImportPhase`,
    30 :class:`~GSASIIIO.ImportStructFactor`,
    31 :class:`~GSASIIIO.ImportPowderData`
    32 or :class:`~GSASIIIO.ImportImage` class documentation
     40See the appropriate class documentation
    3341for details on what values each type of ``Reader()`` should set.
    3442
     
    112120
    113121If the file cannot be read,  the ``Reader`` routine should
    114 return False or raise an :class:`GSASIIIO.ImportBaseclass.ImportException`
     122return False or raise an :class:`GSASIIobj.ImportBaseclass.ImportException`
    115123exception. (Why either? Sometimes an exception is the easiest way to
    116124bail out of a called routine.) Place text in `self.errors` and/or use::
     
    173181  called.
    174182
    175 Note that :meth:`GSASIIIO.ImportBaseclass.CIFValidator` is a ContentsValidator
     183Note that :meth:`GSASIIobj.ImportBaseclass.CIFValidator` is a ContentsValidator
    176184for validating CIF files.
    177185
     
    300308-----------------------------------------------------
    301309Image import routines are classes derived from
    302 :class:`GSASIIIO.ImportImage`.
     310:class:`GSASIIobj.ImportImage`.
    303311See :ref:`Writing a Import Routine<import_routines>` for general
    304312information on importers and the :class:`GSASIIobj.ImportImage` for
     
    340348    :members:
    341349
     350.. automodule:: G2img_SFRM
     351    :members:
     352       
    342353PDF Import Routines
    343354-----------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.