sherlock.imports.veron (class)

class sherlock.imports.veron(log, settings=False, pathToDataFile=False, version=False, catalogueName='', coordinateList=[], radiusArcsec=False)[source]

Bases: sherlock.imports._base_importer._base_importer

importer object for the VERON AGN catalogue

Key Arguments:
  • dbConn – mysql database connection
  • log – logger
  • settings – the settings dictionary
  • pathToDataFIle – path to the veron data file
  • version – version of the veron catalogue

Usage:

To import the veron catalogue catalogue, run the following:

from sherlock.imports import veron
catalogue = veron(
    log=log,
    settings=settings,
    pathToDataFile="/path/to/veron.txt",
    version="1.0",
    catalogueName="veron"
)
catalogue.ingest()

Whenever downloading a version of the Veron catalogue from Vizier use the following column selection:

Veron column selection in Vizier

Todo

  • abstract this module out into its own stand alone script
  • add ppmxl to stand-alone import scripts
  • update key arguments values and definitions with defaults
  • update return values and definitions
  • update usage examples and text
  • update docstring text
  • check sublime snippet exists
  • clip any useful text to docs mindmap
  • regenerate the docs and check redendering of this docstring

Methods

add_data_to_database_table(dictList[, …]) Import data in the list of dictionaries in the requested database table
ingest() ingest the veron catalogue into the catalogues database
_add_htmids_to_database_table() Add HTMIDs to database table once all the data has been imported (HTM Levels 10,13,16)
_create_dictionary_of_veron() create a list of dictionaries containing all the rows in the veron catalogue
_update_database_helper_table() Update the sherlock catalogues database helper table with the time-stamp of when this catlogue was last updated
ingest()[source]

ingest the veron catalogue into the catalogues database

See class docstring for usage.

_create_dictionary_of_veron()[source]

create a list of dictionaries containing all the rows in the veron catalogue

Return:
  • dictList - a list of dictionaries containing all the rows in the veron catalogue

Todo

  • update key arguments values and definitions with defaults
  • update return values and definitions
  • update usage examples and text
  • update docstring text
  • check sublime snippet exists
  • clip any useful text to docs mindmap
  • regenerate the docs and check redendering of this docstring
_add_htmids_to_database_table()

Add HTMIDs to database table once all the data has been imported (HTM Levels 10,13,16)

Usage:

self._add_htmids_to_database_table()
_update_database_helper_table()

Update the sherlock catalogues database helper table with the time-stamp of when this catlogue was last updated

Usage:

self._update_database_helper_table()
add_data_to_database_table(dictList, createStatement=False)

Import data in the list of dictionaries in the requested database table

Also adds HTMIDs and updates the sherlock-catalogue database helper table with the time-stamp of when the imported catlogue was last updated

Key Arguments:
  • dictList - a list of dictionaries containing all the rows in the catalogue to be imported
  • createStatement - the table’s mysql create statement (used to generate table if it does not yet exist in database). Default False

Usage:

self.add_data_to_database_table(
    dictList=dictList,
    createStatement=createStatement
)

Todo

  • Write a checklist for creating a new sherlock database importer