Skip to content

unit_tags.py

deg_to_arcmin(angle)

Convert degrees to arcminutes.

Parameters:

Name Type Description Default
angle float

Angle in units of degrees.

required

Returns:

Type Description
float

Angle in units of arcminutes.

Source code in vast_pipeline/utils/unit_tags.py
21
22
23
24
25
26
27
28
29
30
31
32
@register.filter
def deg_to_arcmin(angle: float) -> float:
    """
    Convert degrees to arcminutes.

    Args:
        angle: Angle in units of degrees.

    Returns:
        Angle in units of arcminutes.
    """
    return float(angle) * 60.

deg_to_arcsec(angle)

Convert degrees to arcseconds.

Parameters:

Name Type Description Default
angle float

Angle in units of degrees.

required

Returns:

Name Type Description
angle float

Angle in units of arcseconds.

Source code in vast_pipeline/utils/unit_tags.py
 7
 8
 9
10
11
12
13
14
15
16
17
18
@register.filter
def deg_to_arcsec(angle: float) -> float:
    """
    Convert degrees to arcseconds.

    Args:
        angle: Angle in units of degrees.

    Returns:
        angle: Angle in units of arcseconds.
    """
    return float(angle) * 3600.

Last update: March 2, 2022
Created: March 2, 2022