TNO Intern

Commit 50c11158 authored by Arjo Segers's avatar Arjo Segers
Browse files

Extra info on pixel selection.

parent f535af85
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -46,6 +46,9 @@
# 2024-08, Arjo Segers
#   Added support for ozone profile product.
#
# 2024-08, Arjo Segers
#   Show info on number of remaining pixels after applying filter.
#

########################################################################
###
@@ -449,6 +452,8 @@ class S5p_File(object):

        # init selection, by default accept all:
        selected = numpy.ones((self.ntime, self.nscan, self.ngpix), "bool")
        # info ...
        logging.info(f"{indent}  processing {selected.sum()} pixels ...")

        # init history:
        history = []
@@ -634,6 +639,13 @@ class S5p_File(object):
            # endif
            # info ...
            logging.info(f"{indent}    kept {selected.sum()} pixels ...")
            # empty?
            if selected.sum() == 0 :
                # info ...
                logging.info(f"{indent}    leave ...")
                # leave:
                break
            # endif   # no pixels left
        # endfor # filters

        ## if ncecessary, convert from a masked to a normal array: