Astronomical Modules

hedwig.astro.catalog

class hedwig.astro.catalog.CSVDialectCatalog

Define CSV “dialect” with space-separated columns.

delimiter = ' '
quoting = 0
hedwig.astro.catalog.parse_source_list(source_list, number_from=1, as_object_list=False)

Parse a plain text source list and return a TargetCollection.

hedwig.astro.catalog.write_source_list(catalog)

hedwig.astro.coord

class hedwig.astro.coord.CoordSystem

Coordinate system enumeration class.

ICRS = 1
GAL = 2
class SystemInfo(name, frame, unit, decimal)
_asdict()

Return a new dict which maps field names to their values.

_field_defaults = {}
_fields = ('name', 'frame', 'unit', 'decimal')
classmethod _make(iterable)

Make a new SystemInfo object from a sequence or iterable

_replace(**kwds)

Return a new SystemInfo object replacing specified fields with new values

decimal

Alias for field number 3

frame

Alias for field number 1

name

Alias for field number 0

unit

Alias for field number 2

_info = {1: ('ICRS', <Mock name='mock.coordinates.ICRS' id='140070953530960'>, (<Mock name='mock.hourangle' id='140070955500560'>, <Mock name='mock.degree' id='140070954519696'>), False), 2: ('Galactic', <Mock name='mock.coordinates.Galactic' id='140070953973904'>, (<Mock name='mock.degree' id='140070954519696'>, <Mock name='mock.degree' id='140070954519696'>), True)}
classmethod is_valid(system)

Determine whether a coordinate system number is part of this enumeration.

classmethod get_options()

Returns an OrderedDict of names by system number.

classmethod get_name(system)

Get the displayable name of a coordinate system.

classmethod _get_info(system)

Get the information tuple for a coordinate system.

This is a semi-private method – only the functions in this module ought to use it as the details of the tuple can change.

hedwig.astro.coord.parse_coord(system, x, y, name)

Parse coordinate information (strings) as entered by a user and return an astropy SkyCoord object.

The target name is taken just for use in error messages: parsing errors are raised as UserError and include the target name to help the user track down the problem.

hedwig.astro.coord.format_coord(system, coord)

Format coordinates for display.

hedwig.astro.coord.coord_to_dec_deg(coord)

Convert a coordinate to a pair of floating point numbers in degrees.

hedwig.astro.coord.coord_from_dec_deg(system, x_deg, y_deg)

Convert a pair of numbers in degress back to a coordinate object.

hedwig.astro.coord.concatenate_coord_objects(objects)

Convert a list of TargetObject instances to a single coordinate object.

hedwig.astro.coord.get_earth_location(obs_info)

Construct Astropy EarthLocation object based on a FacilityObsInfo object (with geo_x, geo_y and geo_z attributes).