Ejemplo n.º 1
0
    def __init__(self, *args, **kwargs):

        # Setup for checking.
        self.constraints = Constraint([
            Constraint_Target(association=self),
            Constraint([
                Constraint_TSO(),
            ], reduce=Constraint.notany),
            DMSAttrConstraint(
                name='bkgdtarg',
                sources=['bkgdtarg'],
                value=['T'],
            ),
            DMSAttrConstraint(
                name='allowed_bkgdtarg',
                sources=['exp_type'],
                value=['nrs_ifu'],
            ),
            SimpleConstraint(
                value=True,
                test=lambda value, item: nrsifu_valid_detector(item),
                force_unique=False),
            DMSAttrConstraint(
                name='opt_elem',
                sources=['grating'],
                force_unique=True,
            ),
        ])

        # Check and continue initialization.
        super(Asn_Lv3NRSIFUBackground, self).__init__(*args, **kwargs)
Ejemplo n.º 2
0
    def __init__(self, *args, **kwargs):

        # Setup constraints
        self.constraints = Constraint([
            Constraint_Base(),
            Constraint_Mode(),
            DMSAttrConstraint(name='exp_type',
                              sources=['exp_type'],
                              value='nrs_ifu'),
            SimpleConstraint(
                value=True,
                test=lambda value, item: nrsifu_valid_detector(item),
                force_unique=False),
            DMSAttrConstraint(
                name='expspcin',
                sources=['expspcin'],
            ),
            DMSAttrConstraint(name='patttype',
                              sources=['patttype'],
                              value=['2-point-nod|4-point-nod'],
                              force_unique=True)
        ])

        # Now check and continue initialization.
        super(Asn_Lv2NRSIFUNod, self).__init__(*args, **kwargs)
Ejemplo n.º 3
0
    def __init__(self, *args, **kwargs):
        # Setup for checking.
        self.constraints = Constraint([
            Constraint_Target(association=self),
            DMSAttrConstraint(name='exp_type',
                              sources=['exp_type'],
                              value=('nrs_autowave'
                                     '|nrs_ifu'),
                              force_unique=False),
            SimpleConstraint(
                value=True,
                test=lambda value, item: nrsifu_valid_detector(item),
                force_unique=False),
            DMSAttrConstraint(name='patttype',
                              sources=['patttype'],
                              required=True),
            Constraint([
                Constraint_TSO(),
            ], reduce=Constraint.notany),
            DMSAttrConstraint(
                name='opt_elem',
                sources=['grating'],
            )
        ])

        # Check and continue initialization.
        super(Asn_Lv3NRSIFU, self).__init__(*args, **kwargs)