void PanDustSystem::setupSelfBefore() { DustSystem::setupSelfBefore(); // if there is no dust emission, turn off the irrelevant flags just to be sure if (!_dustemissivity) { setDustLib(0); setSelfAbsorption(false); setWriteTemperature(false); setWriteISRF(false); setWriteEmissivity(false); } // if there is dust emission, make sure that there is a dust library as well else { if (!_dustlib) throw FATALERROR("There should be a dust library when dust emission is turned on"); } // verify that the wavelength range includes the V-band center 0.55 micron (needed for normalization of dust) WavelengthGrid* lambdagrid = find<WavelengthGrid>(); if (lambdagrid->nearest(0.55e-6) < 0) throw FATALERROR("Wavelength range should include 0.55 micron for a panchromatic simulation with dust"); // cache size of wavelength grid _Nlambda = lambdagrid->Nlambda(); }