Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.




::: {role=“main”}

Module sscws.tracing

::: {#section-intro .section} Module defining classes to represent tracing classes from https://sscweb.gsfc.nasa.gov/WebServices/REST/SSC.xsd.\

Copyright © 2013-2023 United States Government as represented by the National Aeronautics and Space Administration. No copyright is claimed in the United States under Title 17, U.S.Code. All Other Rights Reserved.

Expand source code

#!/usr/bin/env python3

#
# NOSA HEADER START
#
# The contents of this file are subject to the terms of the NASA Open
# Source Agreement (NOSA), Version 1.3 only (the "Agreement").  You may
# not use this file except in compliance with the Agreement.
#
# You can obtain a copy of the agreement at
#   docs/NASA_Open_Source_Agreement_1.3.txt
# or
#   https://sscweb.gsfc.nasa.gov/WebServices/NASA_Open_Source_Agreement_1.3.txt.
#
# See the Agreement for the specific language governing permissions
# and limitations under the Agreement.
#
# When distributing Covered Code, include this NOSA HEADER in each
# file and include the Agreement file at
# docs/NASA_Open_Source_Agreement_1.3.txt.  If applicable, add the
# following below this NOSA HEADER, with the fields enclosed by
# brackets "[]" replaced with your own identifying information:
# Portions Copyright [yyyy] [name of copyright owner]
#
# NOSA HEADER END
#
# Copyright (c) 2013-2023 United States Government as represented by
# the National Aeronautics and Space Administration. No copyright is
# claimed in the United States under Title 17, U.S.Code. All Other
# Rights Reserved.
#

"""
Module defining classes to represent tracing classes from
<https://sscweb.gsfc.nasa.gov/WebServices/REST/SSC.xsd>.<br>

Copyright &copy; 2013-2023 United States Government as represented by the
National Aeronautics and Space Administration. No copyright is claimed in
the United States under Title 17, U.S.Code. All Other Rights Reserved.
"""

# pylint: disable=duplicate-code

import xml.etree.ElementTree as ET
from enum import Enum

from sscws.regions import HemisphereRegions


class BFieldTraceDirection(Enum):
    """
    Enumerations representing the BFieldTraceDirection defined
    in <https://sscweb.gsfc.nasa.gov/WebServices/REST/SSC.xsd>.
    """
    SAME_HEMISPHERE = 'SameHemisphere'
    OPPOSITE_HEMISPHERE = 'OppositeHemisphere'
    NORTH_HEMISPHERE = 'NorthHemisphere'
    SOUTH_HEMISPHERE = 'SouthHemisphere'
    EITHER_HEMISPHERE = 'EitherHemisphere'


class TraceCoordinateSystem(Enum):
    """
    Enumerations representing the TraceCoordinateSystem defined
    in <https://sscweb.gsfc.nasa.gov/WebServices/REST/SSC.xsd>.
    """
    GEO = 'Geo'
    GM = 'Gm'


class TraceType(Enum):
    """
    Enumerations representing the TraceType defined
    in <https://sscweb.gsfc.nasa.gov/WebServices/REST/SSC.xsd>.
    """
    B_FIELD = 'BField'
    RADIAL = 'Radial'


class TraceRegions:
    """
    Class representing a TraceRegions from
    <https://sscweb.gsfc.nasa.gov/WebServices/REST/SSC.xsd>.

    Parameters
    ----------
    cusp
        Cusp region.
    cleft
        Cleft region.
    auroral_oval
        Auroral Oval region.
    polar_cap
        Polar Cap region.
    mid_latitude
        Mid-Latitude region.
    low_latitude
        Low-Latitude region.
    """
    def __init__(self,
                 cusp: HemisphereRegions = None,
                 cleft: HemisphereRegions = None,
                 auroral_oval: HemisphereRegions = None,
                 polar_cap: HemisphereRegions = None,
                 mid_latitude: HemisphereRegions = None,
                 low_latitude: bool = None,
                 ):  # pylint: disable=too-many-arguments

        self._cusp = cusp
        self._cleft = cleft
        self._auroral_oval = auroral_oval
        self._polar_cap = polar_cap
        self._mid_latitude = mid_latitude
        self._low_latitude = low_latitude


    @property
    def cusp(self) -> HemisphereRegions:
        """
        Gets the cusp value.

        Returns
        -------
        str
            cusp value.
        """
        return self._cusp


    @cusp.setter
    def cusp(self, value: HemisphereRegions):
        """
        Sets the cusp value.

        Parameters
        ----------
        value
            cusp value.
        """
        self._cusp = value


    @property
    def cleft(self) -> HemisphereRegions:
        """
        Gets the cleft value.

        Returns
        -------
        str
            cleft value.
        """
        return self._cleft


    @cleft.setter
    def cleft(self, value: HemisphereRegions):
        """
        Sets the cleft value.

        Parameters
        ----------
        value
            cleft value.
        """
        self._cleft = value


    @property
    def auroral_oval(self) -> HemisphereRegions:
        """
        Gets the auroral_oval value.

        Returns
        -------
        str
            auroral_oval value.
        """
        return self._auroral_oval


    @auroral_oval.setter
    def auroral_oval(self, value: HemisphereRegions):
        """
        Sets the auroral_oval value.

        Parameters
        ----------
        value
            auroral_oval value.
        """
        self._auroral_oval = value


    @property
    def polar_cap(self) -> HemisphereRegions:
        """
        Gets the polar_cap value.

        Returns
        -------
        str
            polar_cap value.
        """
        return self._polar_cap


    @polar_cap.setter
    def polar_cap(self, value: HemisphereRegions):
        """
        Sets the polar_cap value.

        Parameters
        ----------
        value
            polar_cap value.
        """
        self._polar_cap = value


    @property
    def mid_latitude(self) -> HemisphereRegions:
        """
        Gets the mid_latitude value.

        Returns
        -------
        str
            mid_latitude value.
        """
        return self._mid_latitude


    @mid_latitude.setter
    def mid_latitude(self, value: HemisphereRegions):
        """
        Sets the mid_latitude value.

        Parameters
        ----------
        value
            mid_latitude value.
        """
        self._mid_latitude = value


    @property
    def low_latitude(self) -> bool:
        """
        Gets the low_latitude value.

        Returns
        -------
        str
            low_latitude value.
        """
        return self._low_latitude


    @low_latitude.setter
    def low_latitude(self, value: bool):
        """
        Sets the low_latitude value.

        Parameters
        ----------
        value
            low_latitude value.
        """
        self._low_latitude = value


    def xml_element(self,
                    name: str) -> ET:
        """
        Produces the XML Element representation of this object.

        Parameters
        ----------
        name
            Name of this TraceRegion.

        Returns
        -------
        ET
            XML Element represenation of this object.
        """

        builder = ET.TreeBuilder()
        builder.start(name, {})
        builder.end(name)
        xml_element = builder.close()

        xml_element.append(self._cusp.xml_element('Cusp'))
        xml_element.append(self._cleft.xml_element('Cleft'))
        xml_element.append(self._auroral_oval.xml_element('AuroralOval'))
        xml_element.append(self._polar_cap.xml_element('PolarCap'))
        xml_element.append(self._mid_latitude.xml_element('MidLatitude'))
        builder = ET.TreeBuilder()
        builder.start('LowLatitude', {})
        builder.data(str(self._low_latitude).lower())
        builder.end('LowLatitude')
        xml_element.append(builder.close())

        return xml_element

:::

::: section :::

::: section :::

::: section :::

::: section

Classes

{.flex .name .class}class {.flex .name .class}[BFieldTraceDirection{.flex .name .class}]{.ident} {.flex .name .class}({.flex .name .class}value, names=None, *, module=None, qualname=None, type=None, start=1){.flex .name .class} {.flex .name .class}

: ::: desc Enumerations representing the BFieldTraceDirection defined in https://sscweb.gsfc.nasa.gov/WebServices/REST/SSC.xsd. :::

Expand source code

``` python
class BFieldTraceDirection(Enum):
    """
    Enumerations representing the BFieldTraceDirection defined
    in <https://sscweb.gsfc.nasa.gov/WebServices/REST/SSC.xsd>.
    """
    SAME_HEMISPHERE = 'SameHemisphere'
    OPPOSITE_HEMISPHERE = 'OppositeHemisphere'
    NORTH_HEMISPHERE = 'NorthHemisphere'
    SOUTH_HEMISPHERE = 'SouthHemisphere'
    EITHER_HEMISPHERE = 'EitherHemisphere'
```

### Ancestors

-   enum.Enum

### Class variables

`var `{.name}[`EITHER_HEMISPHERE`{.name}]{.ident}

:   ::: desc
    :::

`var `{.name}[`NORTH_HEMISPHERE`{.name}]{.ident}

:   ::: desc
    :::

`var `{.name}[`OPPOSITE_HEMISPHERE`{.name}]{.ident}

:   ::: desc
    :::

`var `{.name}[`SAME_HEMISPHERE`{.name}]{.ident}

:   ::: desc
    :::

`var `{.name}[`SOUTH_HEMISPHERE`{.name}]{.ident}

:   ::: desc
    :::

{.flex .name .class}class {.flex .name .class}[TraceCoordinateSystem{.flex .name .class}]{.ident} {.flex .name .class}({.flex .name .class}value, names=None, *, module=None, qualname=None, type=None, start=1){.flex .name .class} {.flex .name .class}

: ::: desc Enumerations representing the TraceCoordinateSystem defined in https://sscweb.gsfc.nasa.gov/WebServices/REST/SSC.xsd. :::

Expand source code

``` python
class TraceCoordinateSystem(Enum):
    """
    Enumerations representing the TraceCoordinateSystem defined
    in <https://sscweb.gsfc.nasa.gov/WebServices/REST/SSC.xsd>.
    """
    GEO = 'Geo'
    GM = 'Gm'
```

### Ancestors

-   enum.Enum

### Class variables

`var `{.name}[`GEO`{.name}]{.ident}

:   ::: desc
    :::

`var `{.name}[`GM`{.name}]{.ident}

:   ::: desc
    :::

{.flex .name .class}class {.flex .name .class}[TraceRegions{.flex .name .class}]{.ident} {.flex .name .class}({.flex .name .class}cusp: {.flex .name .class}HemisphereRegions{.flex .name .class} = None, cleft: {.flex .name .class}HemisphereRegions{.flex .name .class} = None, auroral_oval: {.flex .name .class}HemisphereRegions{.flex .name .class} = None, polar_cap: {.flex .name .class}HemisphereRegions{.flex .name .class} = None, mid_latitude: {.flex .name .class}HemisphereRegions{.flex .name .class} = None, low_latitude: bool = None){.flex .name .class} {.flex .name .class}

: ::: desc Class representing a TraceRegions from https://sscweb.gsfc.nasa.gov/WebServices/REST/SSC.xsd.

## Parameters

**`cusp`**
:   Cusp region.

**`cleft`**
:   Cleft region.

**`auroral_oval`**
:   Auroral Oval region.

**`polar_cap`**
:   Polar Cap region.

**`mid_latitude`**
:   Mid-Latitude region.

**`low_latitude`**
:   Low-Latitude region.
:::

Expand source code

``` python
class TraceRegions:
    """
    Class representing a TraceRegions from
    <https://sscweb.gsfc.nasa.gov/WebServices/REST/SSC.xsd>.

    Parameters
    ----------
    cusp
        Cusp region.
    cleft
        Cleft region.
    auroral_oval
        Auroral Oval region.
    polar_cap
        Polar Cap region.
    mid_latitude
        Mid-Latitude region.
    low_latitude
        Low-Latitude region.
    """
    def __init__(self,
                 cusp: HemisphereRegions = None,
                 cleft: HemisphereRegions = None,
                 auroral_oval: HemisphereRegions = None,
                 polar_cap: HemisphereRegions = None,
                 mid_latitude: HemisphereRegions = None,
                 low_latitude: bool = None,
                 ):  # pylint: disable=too-many-arguments

        self._cusp = cusp
        self._cleft = cleft
        self._auroral_oval = auroral_oval
        self._polar_cap = polar_cap
        self._mid_latitude = mid_latitude
        self._low_latitude = low_latitude


    @property
    def cusp(self) -> HemisphereRegions:
        """
        Gets the cusp value.

        Returns
        -------
        str
            cusp value.
        """
        return self._cusp


    @cusp.setter
    def cusp(self, value: HemisphereRegions):
        """
        Sets the cusp value.

        Parameters
        ----------
        value
            cusp value.
        """
        self._cusp = value


    @property
    def cleft(self) -> HemisphereRegions:
        """
        Gets the cleft value.

        Returns
        -------
        str
            cleft value.
        """
        return self._cleft


    @cleft.setter
    def cleft(self, value: HemisphereRegions):
        """
        Sets the cleft value.

        Parameters
        ----------
        value
            cleft value.
        """
        self._cleft = value


    @property
    def auroral_oval(self) -> HemisphereRegions:
        """
        Gets the auroral_oval value.

        Returns
        -------
        str
            auroral_oval value.
        """
        return self._auroral_oval


    @auroral_oval.setter
    def auroral_oval(self, value: HemisphereRegions):
        """
        Sets the auroral_oval value.

        Parameters
        ----------
        value
            auroral_oval value.
        """
        self._auroral_oval = value


    @property
    def polar_cap(self) -> HemisphereRegions:
        """
        Gets the polar_cap value.

        Returns
        -------
        str
            polar_cap value.
        """
        return self._polar_cap


    @polar_cap.setter
    def polar_cap(self, value: HemisphereRegions):
        """
        Sets the polar_cap value.

        Parameters
        ----------
        value
            polar_cap value.
        """
        self._polar_cap = value


    @property
    def mid_latitude(self) -> HemisphereRegions:
        """
        Gets the mid_latitude value.

        Returns
        -------
        str
            mid_latitude value.
        """
        return self._mid_latitude


    @mid_latitude.setter
    def mid_latitude(self, value: HemisphereRegions):
        """
        Sets the mid_latitude value.

        Parameters
        ----------
        value
            mid_latitude value.
        """
        self._mid_latitude = value


    @property
    def low_latitude(self) -> bool:
        """
        Gets the low_latitude value.

        Returns
        -------
        str
            low_latitude value.
        """
        return self._low_latitude


    @low_latitude.setter
    def low_latitude(self, value: bool):
        """
        Sets the low_latitude value.

        Parameters
        ----------
        value
            low_latitude value.
        """
        self._low_latitude = value


    def xml_element(self,
                    name: str) -> ET:
        """
        Produces the XML Element representation of this object.

        Parameters
        ----------
        name
            Name of this TraceRegion.

        Returns
        -------
        ET
            XML Element represenation of this object.
        """

        builder = ET.TreeBuilder()
        builder.start(name, {})
        builder.end(name)
        xml_element = builder.close()

        xml_element.append(self._cusp.xml_element('Cusp'))
        xml_element.append(self._cleft.xml_element('Cleft'))
        xml_element.append(self._auroral_oval.xml_element('AuroralOval'))
        xml_element.append(self._polar_cap.xml_element('PolarCap'))
        xml_element.append(self._mid_latitude.xml_element('MidLatitude'))
        builder = ET.TreeBuilder()
        builder.start('LowLatitude', {})
        builder.data(str(self._low_latitude).lower())
        builder.end('LowLatitude')
        xml_element.append(builder.close())

        return xml_element
```

### Instance variables

`var `{.name}[`auroral_oval`{.name}]{.ident}` : `{.name}[`HemisphereRegions`{.name}](regions.html#sscws.regions.HemisphereRegions "sscws.regions.HemisphereRegions")

:   ::: desc
    Gets the auroral_oval value.

    ## Returns

    `str`
    :   auroral_oval value.
    :::

    Expand source code

    ``` python
    @property
    def auroral_oval(self) -> HemisphereRegions:
        """
        Gets the auroral_oval value.

        Returns
        -------
        str
            auroral_oval value.
        """
        return self._auroral_oval
    ```

`var `{.name}[`cleft`{.name}]{.ident}` : `{.name}[`HemisphereRegions`{.name}](regions.html#sscws.regions.HemisphereRegions "sscws.regions.HemisphereRegions")

:   ::: desc
    Gets the cleft value.

    ## Returns {#returns}

    `str`
    :   cleft value.
    :::

    Expand source code

    ``` python
    @property
    def cleft(self) -> HemisphereRegions:
        """
        Gets the cleft value.

        Returns
        -------
        str
            cleft value.
        """
        return self._cleft
    ```

`var `{.name}[`cusp`{.name}]{.ident}` : `{.name}[`HemisphereRegions`{.name}](regions.html#sscws.regions.HemisphereRegions "sscws.regions.HemisphereRegions")

:   ::: desc
    Gets the cusp value.

    ## Returns {#returns}

    `str`
    :   cusp value.
    :::

    Expand source code

    ``` python
    @property
    def cusp(self) -> HemisphereRegions:
        """
        Gets the cusp value.

        Returns
        -------
        str
            cusp value.
        """
        return self._cusp
    ```

`var `{.name}[`low_latitude`{.name}]{.ident}` : bool`{.name}

:   ::: desc
    Gets the low_latitude value.

    ## Returns {#returns}

    `str`
    :   low_latitude value.
    :::

    Expand source code

    ``` python
    @property
    def low_latitude(self) -> bool:
        """
        Gets the low_latitude value.

        Returns
        -------
        str
            low_latitude value.
        """
        return self._low_latitude
    ```

`var `{.name}[`mid_latitude`{.name}]{.ident}` : `{.name}[`HemisphereRegions`{.name}](regions.html#sscws.regions.HemisphereRegions "sscws.regions.HemisphereRegions")

:   ::: desc
    Gets the mid_latitude value.

    ## Returns {#returns}

    `str`
    :   mid_latitude value.
    :::

    Expand source code

    ``` python
    @property
    def mid_latitude(self) -> HemisphereRegions:
        """
        Gets the mid_latitude value.

        Returns
        -------
        str
            mid_latitude value.
        """
        return self._mid_latitude
    ```

`var `{.name}[`polar_cap`{.name}]{.ident}` : `{.name}[`HemisphereRegions`{.name}](regions.html#sscws.regions.HemisphereRegions "sscws.regions.HemisphereRegions")

:   ::: desc
    Gets the polar_cap value.

    ## Returns {#returns}

    `str`
    :   polar_cap value.
    :::

    Expand source code

    ``` python
    @property
    def polar_cap(self) -> HemisphereRegions:
        """
        Gets the polar_cap value.

        Returns
        -------
        str
            polar_cap value.
        """
        return self._polar_cap
    ```

### Methods

` `{.name .flex}`def `{.name .flex}[`xml_element`{.name .flex}]{.ident}`(`{.name .flex}`self, name: str) ‑> `{.name .flex}` `{.name .flex}

:   ::: desc
    Produces the XML Element representation of this object.

    ## Parameters {#parameters}

    **`name`**
    :   Name of this TraceRegion.

    ## Returns {#returns}

    `ET`
    :   XML Element represenation of this object.
    :::

    Expand source code

    ``` python
    def xml_element(self,
                    name: str) -> ET:
        """
        Produces the XML Element representation of this object.

        Parameters
        ----------
        name
            Name of this TraceRegion.

        Returns
        -------
        ET
            XML Element represenation of this object.
        """

        builder = ET.TreeBuilder()
        builder.start(name, {})
        builder.end(name)
        xml_element = builder.close()

        xml_element.append(self._cusp.xml_element('Cusp'))
        xml_element.append(self._cleft.xml_element('Cleft'))
        xml_element.append(self._auroral_oval.xml_element('AuroralOval'))
        xml_element.append(self._polar_cap.xml_element('PolarCap'))
        xml_element.append(self._mid_latitude.xml_element('MidLatitude'))
        builder = ET.TreeBuilder()
        builder.start('LowLatitude', {})
        builder.data(str(self._low_latitude).lower())
        builder.end('LowLatitude')
        xml_element.append(builder.close())

        return xml_element
    ```

{.flex .name .class}class {.flex .name .class}[TraceType{.flex .name .class}]{.ident} {.flex .name .class}({.flex .name .class}value, names=None, *, module=None, qualname=None, type=None, start=1){.flex .name .class} {.flex .name .class}

: ::: desc Enumerations representing the TraceType defined in https://sscweb.gsfc.nasa.gov/WebServices/REST/SSC.xsd. :::

Expand source code

``` python
class TraceType(Enum):
    """
    Enumerations representing the TraceType defined
    in <https://sscweb.gsfc.nasa.gov/WebServices/REST/SSC.xsd>.
    """
    B_FIELD = 'BField'
    RADIAL = 'Radial'
```

### Ancestors

-   enum.Enum

### Class variables

`var `{.name}[`B_FIELD`{.name}]{.ident}

:   ::: desc
    :::

`var `{.name}[`RADIAL`{.name}]{.ident}

:   ::: desc
    :::

:::

Index

::: toc :::

SSC Python API Feedback.

Generated by pdoc 0.9.2 at 2024-04-05T09:03:43 EDT.