Пример #1
0
    'Constraint_Base',
    'Constraint_ExtCal',
    'Constraint_Image_Nonscience',
    'Constraint_Image_Science',
    'Constraint_Mode',
    'Constraint_Single_Science',
    'Constraint_Special',
    'Constraint_Spectral_Science',
    'Constraint_Target',
    'DMSLevel2bBase',
    'DMSAttrConstraint',
    'Utility'
]

# The schema that these associations must adhere to.
ASN_SCHEMA = RegistryMarker.schema(libpath('asn_schema_jw_level2b.json'))

# Flag to exposure type
FLAG_TO_EXPTYPE = {
    'background': 'background',
}

# File templates
_DMS_POOLNAME_REGEX = r'jw(\d{5})_(\d{3})_(\d{8}[Tt]\d{6})_pool'
_LEVEL1B_REGEX = r'(?P<path>.+)(?P<type>_uncal)(?P<extension>\..+)'

# Key that uniquely identifies items.
KEY = 'expname'


class DMSLevel2bBase(DMSBaseMixin, Association):
Пример #2
0
"""Association Definitions: DMS-specific

Notes
-----
These associations are specifically defined for use in DMS.
"""
from jwst.associations import Association
from jwst.associations.registry import RegistryMarker

from jwst.associations.lib import (rules_level2b, rules_level3)
RegistryMarker.mark(rules_level2b)
RegistryMarker.mark(rules_level3)
Пример #3
0
        super(Asn_DMS_Base, self).__init__(version_id=version_id)
        self.data['members'] = list()

    def make_member(self, item):
        return item

    def _add(self, item):
        self.data['members'].append(item)

    def finalize(self):
        """Peform finalization steps"""
        return [self]


# Use the generic finalization
RegistryMarker.callback('finalize')(general_asn_finalize)


class Utility:
    """Should not be part of the utilities"""

    @staticmethod
    def not_valid_function():
        """Should not be part of the utilities"""


@RegistryMarker.utility
class ValidUtility:
    """Yea, valid!"""

    @staticmethod
Пример #4
0
    'AsnMixin_Lv2Spectral',
    'Constraint_Base',
    'Constraint_Image_Nonscience',
    'Constraint_Image_Science',
    'Constraint_Mode',
    'Constraint_Single_Science',
    'Constraint_Special',
    'Constraint_Spectral_Science',
    'Constraint_Target',
    'DMSLevel2bBase',
    'DMSAttrConstraint',
    'Utility'
]

# The schema that these associations must adhere to.
ASN_SCHEMA = RegistryMarker.schema(libpath('asn_schema_jw_level2b.json'))

# Flag to exposure type
FLAG_TO_EXPTYPE = {
    'background': 'background',
}

# File templates
_DMS_POOLNAME_REGEX = 'jw(\d{5})_(\d{3})_(\d{8}[Tt]\d{6})_pool'
_LEVEL1B_REGEX = '(?P<path>.+)(?P<type>_uncal)(?P<extension>\..+)'

# Key that uniquely identfies items.
KEY = 'expname'


class DMSLevel2bBase(DMSBaseMixin, Association):
Пример #5
0
"""Association Definitions: DMS-specific

Notes
-----
These associations are specifically defined for use in DMS.
"""
from jwst.associations import Association
from jwst.associations.registry import RegistryMarker

from jwst.associations.lib import (rules_level2b, rules_level3)

RegistryMarker.mark(rules_level2b)
RegistryMarker.mark(rules_level3)
Пример #6
0
        super(Asn_DMS_Base, self).__init__(version_id=version_id)
        self.data['members'] = list()

    def make_member(self, item):
        return item

    def _add(self, item):
        self.data['members'].append(item)

    def finalize(self):
        """Peform finalization steps"""
        return [self]


# Use the generic finalization
RegistryMarker.callback('finalize')(general_asn_finalize)


class Utility:
    """Should not be part of the utilities"""
    @staticmethod
    def not_valid_function():
        """Should not be part of the utilities"""


@RegistryMarker.utility
class ValidUtility:
    """Yea, valid!"""
    @staticmethod
    def valid_function():
        "yes, i'm good"