How to use the satpy.channel.GenericChannel function in satpy

To help you get started, we’ve selected a few satpy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pytroll / satpy / satpy / satin / nc_pps_l2.py View on Github external
"SAFNWC PPS PC likelihood of moderate precipitation",
                "SAFNWC PPS PC likelihood of light precipitation",
                ]


class InfoObject(object):

    """Simple data and info container.
    """

    def __init__(self):
        self.info = {}
        self.data = None


class NwcSafPpsChannel(satpy.channel.GenericChannel):

    def __init__(self, filename=None):
        satpy.channel.GenericChannel.__init__(self)
        self.mda = {}
        self._projectables = []
        self._keys = []
        self._refs = {}
        self.shape = None
        if filename:
            self.read(filename)

    def read(self, filename, load_lonlat=True):
        """Read the PPS v2014 formatet data"""
        LOG.debug("New netCDF CF file format!")

        import h5py
github pytroll / satpy / satpy / satin / msg_hdf.py View on Github external
class MsgPCData(object):

    """NWCSAF/MSG Precipitating Clouds data layer
    """

    def __init__(self):
        self.data = None
        self.scaling_factor = 1
        self.offset = 0
        self.num_of_lines = 0
        self.num_of_columns = 0
        self.product = ""
        self.id = ""


class MsgPC(satpy.channel.GenericChannel):

    """NWCSAF/MSG Precipitating Clouds data structure as retrieved from HDF5
    file. Resolution sets the nominal resolution of the data.
    """

    def __init__(self):
        satpy.channel.GenericChannel.__init__(self, "PC")
        self.filled = False
        self.name = "PC"
        self.package = ""
        self.saf = ""
        self.product_name = ""
        self.num_of_columns = 0
        self.num_of_lines = 0
        self.projection_name = ""
        self.pcs_def = ""
github pytroll / satpy / satpy / satin / msg_hdf.py View on Github external
class MsgCTTHData(object):

    """CTTH data object.
    """

    def __init__(self):
        self.data = None
        self.scaling_factor = 1
        self.offset = 0
        self.num_of_lines = 0
        self.num_of_columns = 0
        self.product = ""
        self.id = ""


class MsgCTTH(satpy.channel.GenericChannel):

    """CTTH channel.
    """

    def __init__(self, resolution=None):
        satpy.channel.GenericChannel.__init__(self, "CTTH")
        self.filled = False
        self.name = "CTTH"
        self.resolution = resolution
        self.package = ""
        self.saf = ""
        self.product_name = ""
        self.num_of_columns = 0
        self.num_of_lines = 0
        self.projection_name = ""
        self.region_name = ""
github pytroll / satpy / satpy / satin / pps_hdf.py View on Github external
self.cloudtype_lut = other.cloudtype_lut
        self.qualityflag_lut = other.qualityflag_lut
        self.phaseflag_lut = other.phaseflag_lut
        self.cloudtype = other.cloudtype
        self.qualityflag = other.qualityflag
        self.phaseflag = other.phaseflag
        
    def read(self, filename):
        import epshdf
        self.copy(epshdf.read_cloudtype(filename))
        
    def is_loaded(self):
        return self.cloudtype is not None


class PpsCTTH(satpy.channel.GenericChannel):
    def __init__(self):
        satpy.channel.GenericChannel.__init__(self, "CTTH")
        self.region = None
        self.des = ""
        self.ctt_des = ""
        self.cth_des = ""
        self.ctp_des = ""
        self.cloudiness_des = ""
        self.processingflag_des = ""
        self.sec_1970 = 0
        self.satellite_id = ""
        self.processingflag_lut = []

        self.temperature = None
        self.t_gain = 1.0
        self.t_intercept = 0.0
github pytroll / satpy / satpy / satin / modis_level2.py View on Github external
'nLw_678',
            ]

# Flags and quality (the two latter only for SST products):
FLAGS_QUALITY = ['l2_flags', 'qual_sst', 'qual_sst4']

SENSOR_BAND_PARAMS = ['wavelength', 'F0', 'vcal_offset', 'vcal_gain',
                      'Tau_r', 'k_oz']

# Navigation control points and tilt - no LONLAT:
NAVIGATION_TILT = ['tilt', 'cntl_pt_cols', 'cntl_pt_rows']
# Geo-location - Longitude,latitude:
LONLAT = ['longitude', 'latitude']


class ModisEosHdfLevel2(satpy.channel.GenericChannel):

    """NASA EOS-HDF Modis data struct"""

    def __init__(self, prodname, resolution=None):
        satpy.channel.GenericChannel.__init__(self, prodname)
        self.filled = False
        self.name = prodname
        self.resolution = resolution

        self.info = {}
        self._eoshdf_info = {}
        self.shape = None
        self.satid = ""
        self.orbit = None
        self.attr = None