Comments (3)
MWE--
from desisim.templates import ELG
ELG().make_templates()
INFO:io.py:959:read_basis_templates: Reading /Users/ioannis/work/desi/spectro/templates/basis_templates/v3.2/elg_templates_v2.2.fits
/Users/ioannis/repos/desihub/desisim/py/desisim/templates.py:847: RuntimeWarning: divide by zero encountered in true_divide
magnorm = 10**(-0.4*mag[ii]) / normmaggies
from desisim.
Setting mask_invalid=False
in the call to the get_ab_maggies
returns the traceback below. Previously, mask_invalid=True
was used to capture the case where the filter response function extended outside the wavelength range of the spectrum, but that's not the case here.
Oddly, using the example in the speclite documentation without specifying the units does not raise the same error, so I'm somewhat confused--
https://github.com/dkirkby/speclite/blob/master/speclite/filters.py#L7-L46
from desisim.templates import ELG
ELG().make_templates()
[snip]
~/repos/desihub/speclite/speclite/filters.py in get_ab_maggies(self, spectrum, wavelength, axis)
1083 else:
1084 # Allow interpolation since this is a convenience method.
-> 1085 convolution = self.convolve_with_array(
1086 wavelength, spectrum, photon_weighted=True,
1087 interpolate=True, axis=axis, units=default_flux_unit)
~/repos/desihub/speclite/speclite/filters.py in convolve_with_array(self, wavelength, values, photon_weighted, interpolate, axis, units, method)
1039 convolution = FilterConvolution(
1040 self, wavelength, photon_weighted, interpolate, units)
-> 1041 return convolution(values, axis, method)
1042
1043
~/repos/desihub/speclite/speclite/filters.py in __call__(self, values, axis, method, plot)
1452 'Must specify expected units for values with units.')
1453 except astropy.units.UnitConversionError:
-> 1454 raise ValueError(
1455 'Values units {0} not convertible to {1}.'
1456 .format(values.unit, self.input_units))
ValueError: Values units None not convertible to erg / (Angstrom cm2 s).
from desisim.
Fixed in #536.
Fortunately the fix was much easier than originally thought. Briefly, a flux array was inadvertently being passed to speclite
as an astropy.table.Column
, which astropy
(internally to speclite
) interpreted as something with inconsistent units (definitely something that used to work with earlier versions of astropy). So, closing this ticket for now--until the next problem!
from desisim.
Related Issues (20)
- Change default pixel width of DESI mocks to 0.8A HOT 8
- desisim sky level test failure HOT 16
- desisim.templates should fail if a template that satisfies the colorcuts cannot be generated HOT 1
- quicktransients should catch failed template generation HOT 1
- Save true continuum in quickquasars
- TestPixsim negative flux failure
- desisim.templates failing with new version of desitarget HOT 2
- Formalize basis_templates tagging procedure HOT 3
- Modify specsim / quickquasars to mimic how the real pipeline estimates the noise variance HOT 1
- "Refraction model is inaccurate for altitudes below 5.0 deg" warning in test_quickquasars unit test HOT 6
- several quickgen unit tests are failing HOT 1
- RuntimeWarning: numpy.ndarray size changed, may indicate binary incompatibility. Expected 80 from C header, got 88 from PyObject
- Test failure at NERSC due to basis template configuration HOT 3
- argument type error in pixsim HOT 2
- desisim.simexp.simulate_spectra not varying exposure time HOT 9
- problem interpolating atmosphere in desisim.specsim.get_simulator HOT 1
- Error while running redrock in mock spectra HOT 1
- Failure on jupyter at nersc trying to run redrock on desisim outputs HOT 2
- io.py find_basis_template does not select most recent template file
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from desisim.