neddy.namesearch module

Perform a NED name-search and return the metadata for the matched sources

Author

David Young

class namesearch(log, names, quiet=False, verbose=False, searchParams=False, outputFilePath=False)[source]

Bases: neddy._basesearch._basesearch

Perform a NED name-search and return the metadata for the matched sources

Key Arguments

  • log – logger

  • name – name

  • quiet – don’t print to stdout

  • verbose – return more metadata for matches

  • searchParams – list of dictionaries to prepend to results

  • outputFilePath – path to file to output results to

Usage

from neddy import namesearch
search = namesearch(
    log=log,
    names=objectName,
    verbose=True,
    outputFilePath="/path/to/output.csv"
)
results = search.get()
get()[source]

perform NED name searches and return the results

Return

  • results – the search results (list of dictionaries)

_build_api_url_and_download_results()[source]

build an API URL call for NED to perform batch name queries and download results

_convert_coordinates_to_decimal_degrees()[source]

convert coordinates to decimal degrees

_convert_html_to_csv()[source]

convert NED’s html output to csv format

_output_results()[source]

print the NED search results to STDOUT and/or an output file

_parse_the_ned_list_results()[source]

parse the NED results

Return:
  • results

  • headers – description. Default **. [opt1|opt2]

- @review: when complete, clean _parse_the_ned_results method
- @review: when complete add logging
_parse_the_ned_position_results(ra, dec, nedResults)[source]

parse the results of a NED conesearch and return as python dicts

Key Arguments:
  • ra – the search ra

  • dec – the search dec

Return:
  • results – list of result dictionaries

  • resultLen – the number of matches returned

_split_incoming_queries_into_batches(sources, searchParams=False)[source]

split incoming queries into batches

Key Arguments:
  • sources – sources to split into batches

  • searchParams – search params associated with batches

Return:
  • theseBatches – list of batches

  • theseBatchParams – params associated with batches