htrdrPy.postprocess module
- class htrdrPy.postprocess.Postprocess(script: Script = None, exposure=1, cmap='inferno', heatCapacity=None, rho=None, threshold=0, skip=False, localPath=False)[source]
Bases:
objectThe Postprocess module aims at processing the outputs of htrdr (based on the script launched or not). # Inputs: - script (optional, Script): Script object which as been called on a Data object - exposure (optional, float [s]): exposure time. Needed if the post-process operation consists in generating an image. - heatCapacity (optional, float [J/kg/K]): heat capacity. Neede if the post-process operation consists in temperature calculations from the flux divergence. - mmw (optional, float [kg/mol]): mean molecular weight. Needed if the post-process operation consists in temperature calculations from the flux divergence. - threshold (optional, float []): threshold limit below which the data are consider zero (expressed relatively to the data maximale value: threshold * max(data)). Default 0 - skip (optional, bool): whether or not to skip the default post-processing operation. Default is False - GCMmesh (optional, bool): whether or not the flux diveregnce calculation was realized on the original GCM mesh. Default is True (the other behavior is not implemented yet) # Note: Im most cases, the module recognize the kind of script and automatically apply the required post-process function. This is not the case for script based on “startMultipleObsGeometry”, as the post-processing rootine to be used is not trivial. A bunch of additional methods are therefore provided.
- extractMeanRadianceFromOutput(file, time=False)[source]
Calculate the average radiance and standard deviation over all pixels # Input: - file (str): path to htrdr output file containing the pixels information # Output: Average radiance and standard deviation over the pixel grid (units are similar to htrdr outputs)
- extractMeanRadiances(indices=False)[source]
Extract the mean radiances of all (or a subset) images generated by the Script. # Outputs: - dictionnary with mean radiances and standard deviations (c.f. extractMeanRadianceFromOutput()) for all required output files.
- getImage(file)[source]
Recover the image data from a htrdr output file. # Input: - file (str): path to the htrdr output file # Ouputs: - radiance (2-D array): radiances associated to each pixel - deviation (2-D array): corresponding standard deviation