Closed dkirkby closed 9 years ago
@weaverba137 TravisCI tests are failing with an error I have not seen before, but which does not seem to be related to any changes I made:
...
$ conda update --yes conda
/home/travis/build.sh: line 41: conda: command not found
The command "conda update --yes conda" failed and exited with 127 during .
Have you seen this before, or any suggestions?
@sbailey The following test now gives more reasonable results:
import specsim
import astropy.units as u
import os
model = os.environ['SPECSIM_MODEL']
atmosphere = specsim.atmosphere.Atmosphere(skyConditions='dark', basePath=model)
qsim = specsim.quick.Quick(atmosphere=atmosphere, basePath=model)
qsim.setWavelengthGrid(5000.1, 5010-0.1, 0.1)
w = np.arange(5000, 5010, 0.1)
influx = np.ones(len(w)) * 1e-17
influx[50] = 10e-17
spectrum = specsim.spectrum.SpectralFluxDensity(
w, influx, fluxUnits=u.erg/(u.s*u.cm**2*u.angstrom))
results = qsim.simulate('elg', spectrum, downsampling=1)
plt.plot(results.wave, results.srcflux / 10, label='Template / 10')
plt.plot(results.wave, results.obsflux, label='Observed')
plt.legend()
You should generally specify a simulation wavelength grid that extends ~5 sigma beyond the camera coverage, otherwise you get the unphysical edge effects seen here.
In the build script, where you have the line:
./miniconda.sh -b
Replace that with
./miniconda.sh -b -p $HOME/miniconda
@weaverba137 That works, thanks!
@sbailey I am ready to merge this, but let me know if you want to review the changes first.
Whoops, sorry, I had missed that you had assigned it to me to review. Go ahead and merge. Thanks.
Fixes #12
Use the following regression test for changes: