def get_midplane_tau(self, r):

        self._check_all_set()

        # Find the total combined optical depth through the midplane
        tau_midplane = np.zeros(r.shape)

        # IMPLEMENT: PAHs

        for i, disk in enumerate(self.disks):
            if disk.mass > 0.:
                if disk.dust is None:
                    raise Exception("Disk %i dust not set" % i)
                nu_min = disk.dust.optical_properties.nu[0]
                nu_max = disk.dust.optical_properties.nu[-1]
                nu, fnu = self.star.total_spectrum(bnu_range=[nu_min, nu_max])
                if np.any(0. > fnu):
                    tau_midplane += (disk.midplane_cumulative_density(r)
                                     * disk.dust.chi_nu_spectrum(nu, fnu))

        for i, envelope in enumerate(self.envelopes):
            if envelope.exists():
                if envelope.dust is None:
                    raise Exception("envelope %i dust not set" % i)
                nu_min = envelope.dust.optical_properties.nu[0]
                nu_max = envelope.dust.optical_properties.nu[-1]
                nu, fnu = self.star.total_spectrum(bnu_range=[nu_min, nu_max])
                if np.any(fnu > 0.):
                    tau_midplane += (envelope.midplane_cumulative_density(r)
                                     * envelope.dust.chi_nu_spectrum(nu, fnu))

        return tau_midplane
dataset/ETHPy150Open hyperion-rt/hyperion/hyperion/model/analytical_yso_model.py/AnalyticalYSOModel.get_midplane_tau/swapped operands of `>`