sherlock.imports.veron module ∞
import veron catalogue into sherlock-catalogues database
- Author
David Young
-
class
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 connectionlog
– loggersettings
– the settings dictionarypathToDataFIle
– path to the veron data fileversion
– 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:
- 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
-
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
- 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
()[source] ∞ 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
()[source] ∞ 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)[source] ∞ 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 importedcreateStatement
- 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 )
- Write a checklist for creating a new sherlock database importer