ned_d (class) ∞
-
class
ned_d
(log, settings=False, pathToDataFile=False, version=False, catalogueName='', coordinateList=[], radiusArcsec=False)[source] ∞ Bases:
sherlock.imports._base_importer._base_importer
Import the * `NED-D <https://ned.ipac.caltech.edu/Library/Distances/>`_ *galaxy catalogue in to the sherlock-catalogues database
Key Arguments
log
– loggersettings
– the settings dictionarypathToDataFile
– path to the ned_d data fileversion
– version of the ned_d cataloguecatalogueName
– the name of the catalogue
Usage
To import the ned_d catalogue catalogue, run the following:
from sherlock.imports import ned_d catalogue = ned_d( log=log, settings=settings, pathToDataFile="/path/to/ned_d.txt", version="1.0", catalogueName="ned_d" ) catalogue.ingest()
- abstract this module out into its own stand alone script
Methods
add_data_to_database_table
(dictList[, …])Import data in the list of dictionaries in the requested database table
ingest
()Import the ned_d catalogue into the catalogues database
-
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
-
ingest
()[source] ∞ Import the ned_d catalogue into the catalogues database
The method first generates a list of python dictionaries from the ned_d datafile, imports this list of dictionaries into a database table and then generates the HTMIDs for that table.
Usage
See class docstring for usage
- update docstring text - check sublime snippet exists - clip any useful text to docs mindmap - regenerate the docs and check redendering of this docstring