neddy.conesearch module

Perform a conesearch on NED

Author

David Young

class conesearch(log, ra=False, dec=False, radiusArcsec=False, nearestOnly=False, unclassified=False, quiet=False, listOfCoordinates=False, outputFilePath=False, verbose=False, redshift=False)[source]

Bases: neddy._basesearch._basesearch

The NED conesearch object

Key Arguments

  • log – logger

  • ra – ra

  • dec – dec

  • radiusArcsec – the search radius in arcsecs

  • nearestOnly – return only the nearest object from NED

  • unclassified – include the unclassified sources in the search results

  • quiet – don’t print to stdout

  • listOfCoordinates – a list of ra, dec, and radiusArcsec (multiple sources)

  • outputFilePath – path of file to print results to. Default False (don’t print to file)

  • verbose – return more metadata for matches

  • redshift – require a redshift for a source to appear in search results

Usage

from neddy import conesearch
search = conesearch(
    log=log,
    ra=0.000,
    dec=0.000,
    radiusArcsec=5.0,
    nearestOnly=False,
    unclassified=True,
    outputFilePath=False,
    verbose=True,
    redshift=False
)
results = search.get()
get()[source]

return results of a NED conesearch

_get_ned_query_url(raDeg, decDeg, arcsec)[source]

build and return the NED conesearch URL for a single coordinate

Key Arguments

  • raDeg – conesearch centre RA

  • decDeg – conesearch centre DEC

  • arcsec – conesearch radius in arcsec

Return

  • url – the conesearch URL

get_crossmatch_names(listOfCoordinates=False, radiusArcsec=False)[source]

return a list of NED sources found within the conesearch radius

Key Arguments

  • listOfCoordinates – list of the coordinates to conesearch

  • radiusArcsec – the search radius

Return

  • names – the names of the sources matched within the search radius

  • searchParams – the parameters of the search as read from the command-line/method call

_convert_coordinates_to_decimal_degrees()[source]

convert coordinates to decimal degrees

_convert_html_to_csv()[source]

convert NED’s html output to csv format

_oversized_subqueries(coordinate, radiusArcsec)[source]

subdivide an oversized query (> 50,000 matches in NED get truncated to 50000) into finer search areas

Key Arguments

  • coordinate – the crowd-field RA and DEC.

  • radiusArcsec – the original search radius

Return

  • names – the matched names

  • searchParams – the new search parameters

_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