Project

General

Profile

Revision 834:d989df597b80

IDd989df597b80
Parent 833:354ddca04053
Child 835:d623d705abd3

Added by Maarten Sneep about 2 years ago

Use the exclude parameter when ingesting existing files

View differences:

src/pycama/AlongTrackPlot.py
230 230
    #
231 231
    #  This method reads the date from file to restore itself for plotting.
232 232
    #  The exected format is as written by the pycama.AlongTrackPlot.AlongTrackPlot.dump() method.
233
    def ingest(self, fname, time_step):
233
    def ingest(self, fname, time_step, exclude=None):
234 234
        self.time_index_in_output = time_step
235 235
        with h5py.File(fname, mode='r') as ref:
236 236
            try:
......
241 241
            self.variables = {k.decode('utf-8'): {} for k in ref['variable_names'][:]}
242 242

  
243 243
            for key in self.variable_names:
244
                if exclude is not None and key in exclude:
245
                    continue
244 246
                for value in ('mean', 'min', 'max', 'standard_deviation',
245 247
                              'q01', 'q05', 'q10', 'q25', 'q75', 'q90', 'q95', 'q99',
246 248
                              'inter_quartile_range', 'median', 'mode', 'count'):

Also available in: Unified diff