Powder difraction database — XRCEA 0.2 documentation

# Powder difraction database

`pddb.` `introduce`()

  Entry point. Declares menu items.

`pddb.` `terminate`()

  unloader

## Core functions

db interface

class `pddb.pddb.` `Database`(path)

  Powder diffraction database class

  Parameters

    path (string) – Path to database.

  `execute`(command, commit=True)
    Parameters

      - command (string) – SQL command

      - commit (boolean) – Whether to commit results.

    Return type

      list

  `select_bruqa`(req)

    Select bruto equation

    Parameters

      req (string) – Request

    Returns

      list of cards

  `select_bruto`(req)

    Select bruto equation

    Parameters

      req (string) – Request

    Returns

      list of cards

  `select_cards`(req)
    Parameters

      req (string) – Query to select cards

    Returns

      List of cards.

  `select_reflex`(req)

    Select by reflex

    Parameters

      req (string) – Request

    Returns

      list of cards

`pddb.pddb.` `formula_markup`(fstr, wiki=False)
  Parameters

    - fstr (string) – formula string

    - wiki (boolean) – print wiki (deprecated)

  Returns

    formula

  Return type

    string

`pddb.pddb.` `switch_number`(number)

  Adds defis to number.

  Parameters

    number (integer) – number in database

  Return type

    string

## GUI

class `pddb.browser.` `Browser`(db)
  `add_colored`(row, c=None)

    Add a card to colored

  `search`(query=None)

    Run search