Next / Previous / Contents / Shipman's homepage

32.5. BandNoField.flatten()

This method, a required part of the FieldItem interface, outputs the band number as a flat field. It is a static method, and if passed None, it will generate a string of spaces of the correct length.

baseclasses.py
# - - -   B a n d N o F i e l d . f l a t t e n   - - -   Static

    @staticmethod
    def flatten(bandNo):
        '''Return a flat-field band number.
        '''
        if  bandNo is None:
            return BLANK_BAND_NO
        else:
            return bandNo.value