<commit_before># -*- coding: utf-8 -*-
"""Functions to work with ASTER L1B satellite data.
"""
import datetime
import logging
import os
from collections import namedtuple

import gdal
import numpy as np
from scipy import interpolate
from skimage.measure import block_reduce

from typhon.math import multiple_logical


__all__ = [
    "ASTERimage",
    "lapserate_modis",
    "lapserate_moist_adiabate",
    "cloudtopheight_IR",
]

logger = logging.getLogger(__name__)

CONFIDENTLY_CLOUDY = 5
PROBABLY_CLOUDY = 4
PROBABLY_CLEAR = 3
CONFIDENTLY_CLEAR = 2


class ASTERimage:
    """ASTER L1B image object."""

    channels = (
        "1",
        "2",
        "3N",
        "3B",  # VNIR
        "4",
        "5",
        "6",
        "7",
        "8",
        "9",  # SWIR
        "10",
        "11",
        "12",
        "13",
        "14",  # TIR
    )<commit_msg>Add subsensor information to ASTERimage class<commit_after># -*- coding: utf-8 -*-
"""Functions to work with ASTER L1B satellite data.
"""
import datetime
import logging
import os
from collections import namedtuple

import gdal
import numpy as np
from scipy import interpolate
from skimage.measure import block_reduce

from typhon.math import multiple_logical


__all__ = [
    "ASTERimage",
    "lapserate_modis",
    "lapserate_moist_adiabate",
    "cloudtopheight_IR",
]

logger = logging.getLogger(__name__)

CONFIDENTLY_CLOUDY = 5
PROBABLY_CLOUDY = 4
PROBABLY_CLEAR = 3
CONFIDENTLY_CLEAR = 2


class ASTERimage:
    """ASTER L1B image object."""

    subsensors = {
        "VNIR": ("1", "2", "3N", "3B"),
        "SWIR": ("4", "5", "6", "7", "8", "9"),
        "TIR": ("10", "11", "12", "13", "14"),
    }
    # list of ASTER channels
    channels = [c for sc in subsensors.values() for c in sc]
    # dictionary with keys=channels and values=subsensors
    channel2sensor = {c: s for s, sc in subsensors.items() for c in sc}
{'fraction_non_alphanumeric': 0.12434141201264488, 'fraction_numerical': 0.02897787144362487, 'mean_word_length': 2.8993839835728954, 'pattern_counts': {'":': 3, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '485404', 'n_tokens_mistral': 688, 'n_tokens_neox': 657, 'n_words': 194}