converters.py
AngleConverter
¶
Accept any valid input value for an astropy.coordinates.Angle and ensure the returned value is a float in decimal degrees. The unit should be included in the input value.
Source code in vast_pipeline/converters.py
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
|
to_python(value)
¶
Return the decimal degrees from the coordinate input as an Angle object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value | Angle | The value of the angle input. | required |
Returns:
Type | Description |
---|---|
float | The angle returned as an Angle object. |
Source code in vast_pipeline/converters.py
74 75 76 77 78 79 80 81 82 83 84 |
|
to_url(value)
¶
Return the string format of an Angle object from the coordinate input.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value | Angle | The value of the angle input. | required |
Returns:
Type | Description |
---|---|
str | The string representation of the Angle object created from the input. |
Source code in vast_pipeline/converters.py
86 87 88 89 90 91 92 93 94 95 96 |
|
DeclinationConverter
¶
Accept both decimal and sexigesimal representations of Dec and ensure the returned value is a float in decimal degrees. The input units are always assumed to be degrees.
Source code in vast_pipeline/converters.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
|
to_python(value)
¶
Return the decimal degrees from the coordinate input as a python float object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value | str | The value of the declination input. | required |
Returns:
Type | Description |
---|---|
float | The decimal degrees value. |
Source code in vast_pipeline/converters.py
42 43 44 45 46 47 48 49 50 51 52 53 |
|
to_url(value)
¶
Return the decimal degrees from the coordinate input in a URL format.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value | str | The value of the declination input. | required |
Returns:
Type | Description |
---|---|
str | The decimal degrees value as a string. |
Source code in vast_pipeline/converters.py
55 56 57 58 59 60 61 62 63 64 65 |
|
RightAscensionConverter
¶
Accept both decimal and sexigesimal representations of RA and ensure the returned value is a float in decimal degrees. If the input is in sexigesimal format, assume it is in units of hourangle.
Source code in vast_pipeline/converters.py
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
|
to_python(value)
¶
Return the decimal degrees from the coordinate input as a python float object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value | str | The value of the RA input. | required |
Returns:
Type | Description |
---|---|
float | The decimal degrees value. |
Source code in vast_pipeline/converters.py
10 11 12 13 14 15 16 17 18 19 20 21 22 |
|
to_url(value)
¶
Return the decimal degrees from the coordinate input in a URL format.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value | str | The value of the RA input. | required |
Returns:
Type | Description |
---|---|
str | The decimal degrees value as a string. |
Source code in vast_pipeline/converters.py
24 25 26 27 28 29 30 31 32 33 34 |
|