Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,7 @@ API Reference
.. automodapi:: hvpy.datasource
:no-inheritance-diagram:

.. automodapi:: hvpy.event
:no-inheritance-diagram:

.. automodapi:: hvpy.utils
5 changes: 3 additions & 2 deletions hvpy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from .facade import *
from .config import set_api_url
from .version import __version__
from .datasource import *
from .event import *
from .facade import *
from .utils import create_layers
from .version import __version__
30 changes: 30 additions & 0 deletions hvpy/event.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
from enum import Enum

__all__ = ["EventType"]


class EventType(Enum):
"""
Enum for the event types supported by Helioviewer.
"""

ACTIVE_REGION = "AR"
CORONAL_CAVITY = "CC"
CORONAL_DIMMING = "CD"
CORONAL_HOLE = "CH"
CORONAL_JET = "CJ"
CORONAL_MASS_EJECTION = "CE"
CORONAL_RAIN = "CR"
CORONAL_WAVE = "CW"
EMERGING_FLUX = "EF"
ERUPTION = "ER"
FILAMENT = "FI"
FILAMENT_ACTIVATION = "FA"
FILAMENT_ERUPTION = "FE"
FLARE = "FL"
LOOP = "LP"
OSCILLATION = "OS"
PLAGE = "PG"
SIGMOD = "SG"
SPRAY_SURGE = "SP"
SUNSPOT = "SS"
28 changes: 28 additions & 0 deletions hvpy/tests/test_event.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
from hvpy import EventType

helioviewer_event_types = {
"Active Region": "AR",
"Coronal Cavity": "CC",
"Coronal Dimming": "CD",
"Coronal Hole": "CH",
"Coronal Jet": "CJ",
"Coronal Mass Ejection": "CE",
"Coronal Rain": "CR",
"Coronal Wave": "CW",
"Emerging Flux": "EF",
"Eruption": "ER",
"Filament": "FI",
"Filament Activation": "FA",
"Filament Eruption": "FE",
"Flare": "FL",
"Loop": "LP",
"Oscillation": "OS",
"Plage": "PG",
"Sigmod": "SG",
"Spray Surge": "SP",
"Sunspot": "SS",
}


def test_event_types():
assert [x.value for x in EventType] == list(helioviewer_event_types.values())