CoordinateParser

class regions.CoordinateParser[source]

Bases: object

Helper class to structure coordinate parser

Methods Summary

parse_angular_length_quantity(string_rep[, unit]) Given a string that is either a number or a number and a unit, return a Quantity of that string.
parse_coordinate(string_rep, unit) Parse a single coordinate

Methods Documentation

static parse_angular_length_quantity(string_rep, unit=Unit("deg"))[source]

Given a string that is either a number or a number and a unit, return a Quantity of that string. e.g.:

23.9 -> 23.9*u.deg 50” -> 50*u.arcsec
static parse_coordinate(string_rep, unit)[source]

Parse a single coordinate