I was trying to install the LSST stack via EUPS on macOS 10.12 (Sierra); however, I am trying to do it against a python.org framework build rather than *conda. (So I will accept that an appropriate response may be “don’t do that”.)
During the install, meas_base-13.0 fails during the tests, which is due to the following code in testVariance.py:
bad = size//2 + i*width
var.getArray()[bad, :] = float("nan")
width=2.0 – a float, not an integer, and hence
bad is a float, which means that we are trying to index a numpy array with a float – this used to be OK, but in recent versions is a bug.
The patch is simple:
bad = int(size//2 + i*width).
What version of python and what version of numpy are you using?
Sorry, should have included that in the original query: python 2.7.13, numpy 1.12.1.
The original code gives the error “IndexError: only integers, slices (
:), ellipsis (
...), numpy.newaxis (
None) and integer or boolean arrays are valid indices”.
And my proposed patch does work; I’ve tested it but I don’t know enough about eups etc to actually get it to install correctly so
eups distrib install -t v13_0 lsst_distrib succeeds.
This is strange, because
width are all integers:
Python 3.6.0 (default, Mar 14 2017, 15:06:43)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> size = 128
>>> width =2
>>> i = -5
>>> type(size//2 + i*width)
Thanks for the report!
In fact, I believe this is already fixed in the current development version, but that hasn’t made it as far as a full release. Relevant ticket was DM-9316; patch is here. It should be in our next release.
Also, I will be very, very sad the day “thou shalt use Conda” becomes a requirement.
Actually, the source has
width=2.0, which is a float (which happens to have an integral value), not an integer.
Yes, as @swinbank points out above, that was fixed recently and I was looking at the current code and not the v13.0 code.
Does this solve your problem now though - for getting the stack installed?
We can probably do an eups tag for w.2017.18 so you could do an eups distrib install of that.
What was your install command, btw?
eups distrib install -t v13_0 lsst_distrib ?
A more recent weekly should indeed be available.
FYep, I was doing
eups distrib install -t v13_0 lsst_distrib. I don’t know much about eups/lsst versioning but I assume it’s not hard to figure out the right way to get the revised version of
w_2017_18 instead of
And, indeed, for future reference, you need the
master version of
lsst_dm_stack_demo to work with this. Otherwise you get the following…
For what it’s worth, it installs fine but the SDSS demo gives an error (but I suppose the v13.0 demo isn’t in sync with the weekly build, so perhaps not too surprising):
processCcd.calibrate.photoCal INFO: Not applying color terms because config.applyColorTerms is None and data is not available and photoRefCat is None
processCcd.calibrate.photoCal INFO: Magnitude zero point: 28.010880 +/- 0.000643 from 35 stars
processCcd.calibrate INFO: Photometric zero-point: 28.010880
Unable to locate registry registry in root: registry.sqlite3
Unable to locate registry registry in current dir: ./registry.sqlite3
Traceback (most recent call last):
File "./bin/export-results", line 78, in <module>
v = srcs.get(col)
File "/Users/jaffe/Desktop/Projects/LSST/lsst_stack/DarwinX86/afw/13.0-39-g3deb52d/python/lsst/afw/table/baseColumnView/baseColumnViewContinued.py", line 62, in __getitem__
keyobj = self.schema.find(key).key
KeyError: "Field with name 'flags_negative' not found"