Beispiel #1
0
    def post_process(self):
        """
        Optionally generates aggregate curves, hazard maps and
        uniform_hazard_spectra.
        """
        # means/quantiles:
        if self.hc.mean_hazard_curves or self.hc.quantile_hazard_curves:
            self.do_aggregate_post_proc()

        # hazard maps:
        # required for computing UHS
        # if `hazard_maps` is false but `uniform_hazard_spectra` is true,
        # just don't export the maps
        if self.hc.hazard_maps or self.hc.uniform_hazard_spectra:
            with self.monitor('generating hazard maps'):
                hazard_curves = models.HazardCurve.objects.filter(
                    output__oq_job=self.job, imt__isnull=False)
                tasks.apply_reduce(
                    hazard_curves_to_hazard_map,
                    (self.job.id, hazard_curves, self.hc.poes))

        if self.hc.uniform_hazard_spectra:
            individual_curves = self.job.get_param(
                'individual_curves', missing=True)
            if individual_curves is False:
                logs.LOG.warn('The parameter `individual_curves` is false, '
                              'cannot compute the UHS curves')
            else:
                do_uhs_post_proc(self.job)
Beispiel #2
0
    def post_process(self):
        """
        Optionally generates aggregate curves, hazard maps and
        uniform_hazard_spectra.
        """
        # means/quantiles:
        if self.mean_hazard_curves or self.quantile_hazard_curves:
            self.do_aggregate_post_proc()

        # hazard maps:
        # required for computing UHS
        # if `hazard_maps` is false but `uniform_hazard_spectra` is true,
        # just don't export the maps
        if (self.oqparam.hazard_maps or self.oqparam.uniform_hazard_spectra):
            with self.monitor('generating hazard maps', autoflush=True) as mon:
                tasks.apply_reduce(
                    hazard_curves_to_hazard_map,
                    (self._hazard_curves, self.oqparam.poes, mon))
        if self.oqparam.uniform_hazard_spectra:
            do_uhs_post_proc(self.job)
Beispiel #3
0
    def post_process(self):
        """
        Optionally generates aggregate curves, hazard maps and
        uniform_hazard_spectra.
        """
        # means/quantiles:
        if self.mean_hazard_curves or self.quantile_hazard_curves:
            self.do_aggregate_post_proc()

        # hazard maps:
        # required for computing UHS
        # if `hazard_maps` is false but `uniform_hazard_spectra` is true,
        # just don't export the maps
        if (self.oqparam.hazard_maps or self.oqparam.uniform_hazard_spectra):
            with self.monitor('generating hazard maps', autoflush=True) as mon:
                tasks.apply_reduce(
                    hazard_curves_to_hazard_map,
                    (self._hazard_curves, self.oqparam.poes, mon))
        if self.oqparam.uniform_hazard_spectra:
            do_uhs_post_proc(self.job)