Display of a Multi Order Coverage (MOC)#

[1]:
from ipyaladin import Aladin
from mocpy import MOC
import astropy.units as u

aladin = Aladin(target="15 26 20.534 -57 02 14.74", fov=135, survey="P/Mellinger/color")
aladin
[1]:

From an URL#

[2]:
aladin.add_moc(
    "https://alasky.u-strasbg.fr/footprints/tables/vizier/II_337_vvv1/MOC?nside=256",
    color="violet",
    opacity=0.3,
)

From a dictionnary#

[3]:
moc = {
    "4": [
        32,
        33,
        36,
        51,
        54,
        55,
        98,
        99,
        102,
        112,
        113,
        116,
        117,
        1101,
        1118,
        1600,
        1638,
        2581,
        2582,
        2588,
        2590,
        2612,
        2614,
        2620,
        2622,
        2708,
        2710,
        2716,
        2718,
        2749,
    ],
    "5": [
        42,
        43,
        150,
        151,
        152,
        153,
        156,
        157,
        194,
        195,
        198,
        199,
        200,
        201,
        203,
        210,
        378,
        379,
        382,
        383,
        387,
        390,
        391,
        402,
        403,
        406,
        407,
        412,
        413,
        456,
        457,
        460,
        461,
        472,
        1470,
        1751,
        1755,
        1756,
        1757,
        1758,
        1766,
        1767,
        1769,
        1770,
        1771,
        1772,
        1773,
        1776,
        1777,
        1778,
        1811,
        1817,
        1818,
        1831,
        1835,
        1836,
        1838,
        1840,
        1920,
        1921,
        1922,
        4188,
        4189,
        4363,
        4366,
        4367,
        4389,
        4400,
        4401,
        4450,
        4451,
        4454,
        4456,
        4457,
        4460,
        4461,
        4463,
        4476,
        4478,
        4479,
        4561,
        4564,
        4565,
        6229,
        6408,
        6409,
        6411,
        6412,
        6414,
        6433,
        6436,
        6438,
        6439,
        6444,
        6445,
        6447,
        6533,
        6544,
        6546,
        6577,
        6579,
        6582,
        6588,
        6590,
        6591,
        6933,
        6935,
        6984,
        6986,
        7008,
        7011,
        7017,
        10321,
        10323,
        10332,
        10333,
        10334,
        10356,
        10358,
        10364,
        10366,
        10445,
        10447,
        10469,
        10477,
        10479,
        10821,
        10823,
        10878,
        10960,
        10961,
        10963,
        10964,
        10966,
        10969,
        10971,
        10972,
        10974,
        10975,
        11004,
        11005,
        11007,
        11176,
        11178,
        11370,
        11373,
        11405,
        11406,
        11407,
        11410,
        11411,
        11412,
        11413,
        11414,
        11416,
        11425,
        11426,
        11427,
        11428,
        11432,
    ],
}
[4]:
aladin.add_moc(moc)

From a mocpy object#

[5]:
moc = MOC.from_ring(
    lon=231.5855583 * u.deg,
    lat=-57.03742777 * u.deg,
    internal_radius=10 * u.deg,
    external_radius=20 * u.deg,
    max_depth=16,
)
aladin.add_moc(
    moc, color="teal", edge=True, line_width=3, fill_color="teal", opacity=0.5
)