コード例 #1
0
ファイル: sgr.py プロジェクト: zilishen/gala
    """
    return R


# Sgr to Galactic coordinates
@frame_transform_graph.transform(coord.StaticMatrixTransform, SagittariusLaw10,
                                 coord.Galactic)
def sgr_to_galactic():
    """ Compute the transformation from heliocentric Sagittarius coordinates to
        spherical Galactic.
    """
    return matrix_transpose(galactic_to_sgr())


# TODO: remove this in next version
class Sagittarius(SagittariusLaw10):
    def __init__(self, *args, **kwargs):
        import warnings
        warnings.warn(
            "This frame is deprecated. Use SagittariusLaw10 "
            "instead.", DeprecationWarning)
        super().__init__(*args, **kwargs)


trans = frame_transform_graph.get_transform(SagittariusLaw10,
                                            coord.Galactic).transforms[0]
frame_transform_graph.add_transform(Sagittarius, coord.Galactic, trans)
trans = frame_transform_graph.get_transform(coord.Galactic,
                                            SagittariusLaw10).transforms[0]
frame_transform_graph.add_transform(coord.Galactic, Sagittarius, trans)
コード例 #2
0
ファイル: orphan.py プロジェクト: nstarman/gala
                  [-0.84246097, 0.37511331, 0.38671632],
                  [0.29983786, 0.92280606, -0.2419219]])
    return R


# Oph to Galactic coordinates
@frame_transform_graph.transform(coord.StaticMatrixTransform,
                                 OrphanKoposov19, coord.ICRS)
def oph19_to_icrs():
    """ Compute the transformation from heliocentric Orphan coordinates to
        spherical ICRS.
    """
    return matrix_transpose(galactic_to_orp())


# TODO: remove this in next version
class Orphan(OrphanNewberg10):
    def __init__(self, *args, **kwargs):
        import warnings
        warnings.warn("This frame is deprecated. Use OrphanNewberg10 or "
                      "OrphanKoposov19 instead.", DeprecationWarning)
        super().__init__(*args, **kwargs)


trans = frame_transform_graph.get_transform(OrphanNewberg10,
                                            coord.Galactic).transforms[0]
frame_transform_graph.add_transform(Orphan, coord.Galactic, trans)
trans = frame_transform_graph.get_transform(coord.Galactic,
                                            OrphanNewberg10).transforms[0]
frame_transform_graph.add_transform(coord.Galactic, Orphan, trans)
コード例 #3
0
        heliocentric Ophiuchus coordinates.
    """
    return R


@frame_transform_graph.transform(coord.StaticMatrixTransform,
                                 OphiuchusPriceWhelan16, coord.Galactic)
def oph_to_gal():
    """ Compute the transformation from heliocentric Ophiuchus coordinates to
        spherical Galactic.
    """
    return matrix_transpose(gal_to_oph())


# TODO: remove this in next version
class Ophiuchus(OphiuchusPriceWhelan16):
    def __init__(self, *args, **kwargs):
        import warnings
        warnings.warn(
            "This frame is deprecated. Use OphiuchusPriceWhelan16"
            " instead.", DeprecationWarning)
        super().__init__(*args, **kwargs)


trans = frame_transform_graph.get_transform(OphiuchusPriceWhelan16,
                                            coord.ICRS).transforms[0]
frame_transform_graph.add_transform(Ophiuchus, coord.ICRS, trans)
trans = frame_transform_graph.get_transform(
    coord.ICRS, OphiuchusPriceWhelan16).transforms[0]
frame_transform_graph.add_transform(coord.ICRS, Ophiuchus, trans)
コード例 #4
0
def icrs_to_pal5():
    """ Compute the transformation from Galactic spherical to
        heliocentric Pal 5 coordinates.
    """
    return R

@frame_transform_graph.transform(coord.StaticMatrixTransform, Pal5PriceWhelan18,
                                 coord.ICRS)
def pal5_to_icrs():
    """ Compute the transformation from heliocentric Pal 5 coordinates to
        spherical Galactic.
    """
    return matrix_transpose(icrs_to_pal5())


# TODO: remove this in next version
class Pal5(Pal5PriceWhelan18):
    def __init__(self, *args, **kwargs):
        import warnings
        warnings.warn("This frame is deprecated. Use Pal5PriceWhelan18 "
                      "instead.", DeprecationWarning)
        super().__init__(*args, **kwargs)


trans = frame_transform_graph.get_transform(Pal5PriceWhelan18,
                                            coord.ICRS).transforms[0]
frame_transform_graph.add_transform(Pal5, coord.ICRS, trans)
trans = frame_transform_graph.get_transform(coord.ICRS,
                                            Pal5PriceWhelan18).transforms[0]
frame_transform_graph.add_transform(coord.ICRS, Pal5, trans)
コード例 #5
0
def icrs_to_gd1():
    """ Compute the transformation from Galactic spherical to
        heliocentric GD1 coordinates.
    """
    return R

@frame_transform_graph.transform(coord.StaticMatrixTransform, GD1Koposov10,
                                 coord.ICRS)
def gd1_to_icrs():
    """ Compute the transformation from heliocentric GD1 coordinates to
        spherical Galactic.
    """
    return matrix_transpose(icrs_to_gd1())


# TODO: remove this in next version
class GD1(GD1Koposov10):
    def __init__(self, *args, **kwargs):
        import warnings
        warnings.warn("This frame is deprecated. Use GD1Koposov10 instead.",
                      DeprecationWarning)
        super().__init__(*args, **kwargs)


trans = frame_transform_graph.get_transform(GD1Koposov10,
                                            coord.ICRS).transforms[0]
frame_transform_graph.add_transform(GD1, coord.ICRS, trans)
trans = frame_transform_graph.get_transform(coord.ICRS,
                                            GD1Koposov10).transforms[0]
frame_transform_graph.add_transform(coord.ICRS, GD1, trans)
コード例 #6
0
ファイル: orphan.py プロジェクト: adrn/gala
    pm_phi1_cosphi2 : `~astropy.units.Quantity`
        Proper motion in longitude.
    pm_phi2 : `~astropy.units.Quantity`
        Proper motion in latitude.
    radial_velocity : `~astropy.units.Quantity`
        Line-of-sight or radial velocity.
    """

    pole = coord.ICRS(ra=72.2643 * u.deg,
                      dec=-20.6575 * u.deg)
    ra0 = 160 * u.deg
    rotation = 0 * u.deg


# TODO: remove this in next version
class Orphan(OrphanNewberg10):
    def __init__(self, *args, **kwargs):
        import warnings
        warnings.warn("This frame is deprecated. Use OrphanNewberg10 or "
                      "OrphanKoposov19 instead.", DeprecationWarning)
        super().__init__(*args, **kwargs)


trans = frame_transform_graph.get_transform(OrphanNewberg10,
                                            coord.Galactic).transforms[0]
frame_transform_graph.add_transform(Orphan, coord.Galactic, trans)
trans = frame_transform_graph.get_transform(coord.Galactic,
                                            OrphanNewberg10).transforms[0]
frame_transform_graph.add_transform(coord.Galactic, Orphan, trans)
コード例 #7
0
ファイル: oph.py プロジェクト: adrn/gala
def gal_to_oph():
    """ Compute the transformation from Galactic spherical to
        heliocentric Ophiuchus coordinates.
    """
    return R

@frame_transform_graph.transform(coord.StaticMatrixTransform,
                                 OphiuchusPriceWhelan16, coord.Galactic)
def oph_to_gal():
    """ Compute the transformation from heliocentric Ophiuchus coordinates to
        spherical Galactic.
    """
    return matrix_transpose(gal_to_oph())


# TODO: remove this in next version
class Ophiuchus(OphiuchusPriceWhelan16):
    def __init__(self, *args, **kwargs):
        import warnings
        warnings.warn("This frame is deprecated. Use OphiuchusPriceWhelan16"
                      " instead.", DeprecationWarning)
        super().__init__(*args, **kwargs)


trans = frame_transform_graph.get_transform(OphiuchusPriceWhelan16,
                                            coord.ICRS).transforms[0]
frame_transform_graph.add_transform(Ophiuchus, coord.ICRS, trans)
trans = frame_transform_graph.get_transform(coord.ICRS,
                                            OphiuchusPriceWhelan16).transforms[0]
frame_transform_graph.add_transform(coord.ICRS, Ophiuchus, trans)
コード例 #8
0
ファイル: sgr.py プロジェクト: adrn/gala
    """ Compute the transformation from Galactic spherical to
        heliocentric Sagittarius coordinates.
    """
    return R

# Sgr to Galactic coordinates
@frame_transform_graph.transform(coord.StaticMatrixTransform, SagittariusLaw10,
                                 coord.Galactic)
def sgr_to_galactic():
    """ Compute the transformation from heliocentric Sagittarius coordinates to
        spherical Galactic.
    """
    return matrix_transpose(galactic_to_sgr())


# TODO: remove this in next version
class Sagittarius(SagittariusLaw10):
    def __init__(self, *args, **kwargs):
        import warnings
        warnings.warn("This frame is deprecated. Use SagittariusLaw10 "
                      "instead.", DeprecationWarning)
        super().__init__(*args, **kwargs)


trans = frame_transform_graph.get_transform(SagittariusLaw10,
                                            coord.Galactic).transforms[0]
frame_transform_graph.add_transform(Sagittarius, coord.Galactic, trans)
trans = frame_transform_graph.get_transform(coord.Galactic,
                                            SagittariusLaw10).transforms[0]
frame_transform_graph.add_transform(coord.Galactic, Sagittarius, trans)