pyrfume.dbtables module

Definitions of datajoint tables and functions for operating the datajoint schema.

class pyrfume.dbtables.Block[source]

Bases: datajoint.user_tables.Manual

class Trials[source]

Bases: datajoint.user_tables.Part

definition = '\n -> Block\n -> Trial\n ---\n '
definition = '\n block_id: int auto_increment\n ---\n -> Technician\n -> Design\n '
class pyrfume.dbtables.Compound[source]

Bases: datajoint.user_tables.Manual

definition = '\n -> Product\n date_delivered : datetime\n location = "" : varchar(64)\n ---\n date_opened = NULL : datetime\n '
class pyrfume.dbtables.Design[source]

Bases: datajoint.user_tables.Manual

definition = '\n design_id: int auto_increment\n ---\n name : varchar(64)\n '
class pyrfume.dbtables.Experiment[source]

Bases: datajoint.user_tables.Manual

class Blocks[source]

Bases: datajoint.user_tables.Part

definition = '\n -> Experiment\n -> Block\n ---\n '
definition = '\n experiment_id: int auto_increment\n ---\n -> Investigator\n '
class pyrfume.dbtables.Investigator[source]

Bases: datajoint.user_tables.Manual

definition = '\n investigator_id: int auto_increment\n ---\n first_name : varchar(64)\n last_name : varchar(64)\n -> Site\n '
class pyrfume.dbtables.Molecule[source]

Bases: datajoint.user_tables.Manual

definition = '\n smiles : varchar(25)\n ---\n inchi = NULL : varchar(128)\n inchikey = "" : varchar(256)\n pubchem_id = NULL : int\n name = "" : varchar(128)\n iupac = "" : varchar(128)\n '
class pyrfume.dbtables.Odorant[source]

Bases: datajoint.user_tables.Manual

class Solutions[source]

Bases: datajoint.user_tables.Part

definition = '\n -> Odorant\n -> Solution\n ---\n '
definition = '\n odorant_id: int auto_increment\n ---\n -> Vessel\n date_prepared = NULL : datetime\n '
class pyrfume.dbtables.Product[source]

Bases: datajoint.user_tables.Manual

definition = '\n -> Vendor \n catalog = 0 : int\n ---\n -> Molecule\n purity = "" : varchar(64)\n batch = "" : varchar(64)\n '
class pyrfume.dbtables.Publication[source]

Bases: datajoint.user_tables.Manual

definition = '\n publication_id: int auto_increment\n ---\n name : varchar(512)\n kind : varchar(32)\n -> Investigator\n '
class pyrfume.dbtables.QuantityAdapter[source]

Bases: datajoint.attribute_adapter.AttributeAdapter

The datajoint adapter class that puts and gets Python Quantity objects to and from the datajoint database server.

attribute_type = 'float'
get(value: float)[source]

convert value retrieved from the the attribute in a table into the adapted type :param value: value from the database :return: object of the adapted type

put(obj: quantities.quantity.Quantity)[source]

convert an object of the adapted type into a value that DataJoint can store in a table attribute :param obj: an object of the adapted type :return: value to store in the database

class pyrfume.dbtables.Report[source]

Bases: datajoint.user_tables.Manual

definition = '\n report_id: int auto_increment\n ---\n title : varchar(512)\n year : smallint\n -> Publication\n doi : varchar(128)\n \n last_name : varchar(64)\n -> Investigator\n '
class pyrfume.dbtables.Route[source]

Bases: datajoint.user_tables.Manual

definition = '\n route_id: int auto_increment\n ---\n name = "" : varchar(64)\n '
class pyrfume.dbtables.Site[source]

Bases: datajoint.user_tables.Manual

definition = '\n site_id: int auto_increment\n ---\n name : varchar(64)\n kind : varchar(16)\n '
class pyrfume.dbtables.Solution[source]

Bases: datajoint.user_tables.Manual

class Compounds[source]

Bases: datajoint.user_tables.Part

definition = '\n -> Solution\n -> Compound\n ---\n '
definition = '\n solution_id: int auto_increment\n ---\n diution = NULL : int\n concentration = NULL : float\n value = NULL : <quantity_adapter>\n mixing_data = NULL : date\n '
class pyrfume.dbtables.Stimulus[source]

Bases: datajoint.user_tables.Manual

class Odorants[source]

Bases: datajoint.user_tables.Part

definition = '\n -> Stimulus\n -> Odorant\n ---\n '
definition = '\n stimulus_id: int auto_increment\n ---\n -> Route\n '
class pyrfume.dbtables.Subject[source]

Bases: datajoint.user_tables.Manual

definition = '\n subject_id: int auto_increment\n ---\n age : tinyint\n gender : tinyint\n detail_info : varchar(512)\n '
class pyrfume.dbtables.Summary[source]

Bases: datajoint.user_tables.Manual

class Odorants[source]

Bases: datajoint.user_tables.Part

definition = '\n -> Summary\n -> Odorant\n ---\n '
definition = '\n summary_id: int auto_increment\n ---\n -> Publication\n -> Design\n '
class pyrfume.dbtables.Technician[source]

Bases: datajoint.user_tables.Manual

definition = '\n technician_id: int auto_increment\n ---\n first_name : varchar(64)\n last_name : varchar(64)\n -> Investigator\n '
class pyrfume.dbtables.Trial[source]

Bases: datajoint.user_tables.Manual

definition = '\n trial_id: int auto_increment\n ---\n -> Stimulus\n -> Subject\n time : timestamp\n '
class pyrfume.dbtables.Vendor[source]

Bases: datajoint.user_tables.Manual

definition = '\n name = "" : varchar(256)\n ---\n '
class pyrfume.dbtables.Vessel[source]

Bases: datajoint.user_tables.Manual

definition = '\n name = "" : varchar(64)\n height = 0 : float\n base_area = "" : varchar(64)\n ---\n '
pyrfume.dbtables.drop_schema(force=False) → None[source]

Drop the datajoint schema.

Args:
force (bool, optional): Dropping it without a pop up confirmation. Defaults to False.
pyrfume.dbtables.get_table(table_name: str) → datajoint.user_tables.UserTable[source]

Get a single datajoint table by table name.

Args:
table_name (str): The name of the datajoint table.
Returns:
UserTable: The datajoint table.
pyrfume.dbtables.get_tables() → Dict[str, datajoint.user_tables.UserTable][source]

Get all datajoint tables in this module.

Returns:
Dict[str, UserTable]: The dict that contains all the table classes.
pyrfume.dbtables.init_schema() → None[source]

Get the name of schema from the config file and initialize the schema with it.

pyrfume.dbtables.set_schema_name(new_schema_name: str) → None[source]
Set a new schema name into the config file. The data saved
into the old schema will be keeped on the server unless drop_schema was called.
Args:
new_schema_name (str): The new name of the schema.