Comments (12)
My best guess is that you have python <= 2.7.8. There was a bug related to this that was fixed in python 2.7.9.
from piff.
Sounds like you're also missing the nosetests package. You should be able to install this via pip install nose
, or if you're using Anaconda python, conda install nose
.
@rmjarvis, is it worth adding nose to requirements.txt
? It's not strictly required outside of tests I suppose, but I think it's unlikely to cause problems if we do add it.
from piff.
I think technically, that kind of thing should be in a dev-requirements.txt file.
cf. http://setupext-pip.readthedocs.io/en/latest/requirements-files.html
I have no objection to adding it there.
from piff.
I was using the version of python that came with my mac (which was 2.7.6). I installed python version 2.7.13 from the python website. It seems that Galsim and other python packages from my old python did not migrate to the new version of python I just installed.
If I decide to install Galsim (and all of the python packages it requires) again is there anything I have to do when re-installing it to make sure it will install on python 2.7.13 rather than the old 2.7.6 (which already has Galsim)? Alternatively, is there a way to automatically migrate all of the python packages I have from python 2.7.6 (which came with my mac) to the new version of python I just installed?
from piff.
from piff.
Yes, the PYTHONPATH environment variable should be set correctly.
And you will need to reinstall all the various packages you need. numpy, fitsio, astropy, etc. Using pip is usually a good way to go with that, since many of the more popular packages have binary installations, so it's not usually too onerous to install them.
While you're at it, install nose as well, so you can use nosetests to run the tests.
from piff.
Galsim, Piff, and Nose packages are successfully installed. I ran the nosetests for Piff. It mostly worked but it failed one test out of 56. Specifically,
FAIL: Initial simple test of Gaussian, Kolmogorov, and Moffat PSFs.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/areshernandez/lsstsw/miniconda/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/Users/areshernandez/Piff-master/tests/piff_test_helper.py", line 78, in f2
result = f(*args, **kwargs)
File "/Users/areshernandez/Piff-master/tests/test_gsobject_model.py", line 189, in test_simple
np.testing.assert_allclose(fit.params[2], g2, rtol=0, atol=1e-6)
File "/Users/areshernandez/lsstsw/miniconda/lib/python2.7/site-packages/numpy/testing/utils.py", line 1392, in assert_allclose
verbose=verbose, header=header)
File "/Users/areshernandez/lsstsw/miniconda/lib/python2.7/site-packages/numpy/testing/utils.py", line 739, in assert_array_compare
raise AssertionError(msg)
AssertionError:
Not equal to tolerance rtol=0, atol=1e-06
(mismatch 100.0%)
x: array(-0.16999878078849628)
y: array(-0.17)
It seems that this failure was due to something being only slightly off (but out of the strict tolerance range it had). Do you have an idea as to why this test failed? Have you encountered this nosetest failure before?
from piff.
Do you have an idea as to why this test failed?
Yes. This was related to a change in the precision of some GalSim operations. I ran into this and fixed it on branch alternate_wcs
, currently in PR. If you want to install that branch, feel free. Or just ignore this error, since it will eventually be merged into master.
from piff.
After installing Piff on my personal laptop I tried installing it on my work computer as well. I tried to do it using the LSST stack method. I ran (in my home directory):
git clone https://github.com/lsst/lsstsw.git
cd lsstsw
./bin/deploy
I confirmed that a new lsstsw directory appeared in my home directory, as expected. However, something went wrong when I used "./bin/deploy." It gave me this error:
Output written on eups.pdf (43 pages, 351429 bytes).
Transcript written on eups.log.
Running latex2html
/bin/sh: latex2html: command not found
latex2html failed; writing dummy eups.html
make[1]: Leaving directory `/afs/slac.stanford.edu/u/ec/aresh/lsstsw/sources/eups-2.1.3/doc'
cp Makefile README Release_Notes gpl.txt "/u/ec/aresh/lsstsw/eups/2.1.3"
echo "`env EUPS_DIR=. PYTHONPATH=python bin/eups --version 2>&1 | awk '/Version/ {print $3}'`" > "/u/ec/aresh/lsstsw/eups/2.1.3/git.version"
Remember to source /u/ec/aresh/lsstsw/eups/2.1.3/bin/setups.{c,z,}sh
::: Making eups 2.1.3 the default
::: Deploying manifest.remap
::: Deploying versiondb
Cloning into 'versiondb'...
remote: Counting objects: 117813, done.
remote: Compressing objects: 100% (325/325), done.
remote: Total 117813 (delta 252), reused 253 (delta 100), pack-reused 117388
Receiving objects: 100% (117813/117813), 57.73 MiB | 18.86 MiB/s, done.
Resolving deltas: 100% (108096/108096), done.
fatal: fsync error on '/afs/slac.stanford.edu/u/ec/aresh/lsstsw/versiondb/.git/objects/pack/tmp_pack_5JldJf': Disk quota exceeded
fatal: index-pack failed
I'm not sure what went wrong. It said "disk quota exceeded." Does that mean there was not enough room remaining on the computer for something from lsst?
from piff.
from piff.
There's a GalSim installation at slac at /nfs/slac/g/ki/ki19/jmeyers3/src/GalSim/. If you add
export PATH=/nfs/slac/g/ki/ki19/jmeyers3/miniconda2/bin:$PATH
source eups-setups.sh
setup galsim
to your .bash_profile
, I think it should work. I too will be in tomorrow for potential debugging if that doesn't do it.
from piff.
I'm not sure what any of this has to do with Piff. Piff doesn't require the lsst stack. Aside from GalSim, you should be able to get all dependencies of Piff installed with pip install piff
. (And GalSim will soon be similarly installable...)
from piff.
Related Issues (20)
- Add calculate_moments function to util and associated unit tests. HOT 1
- PSF wings HOT 2
- Reading WCS solution of ZTF images HOT 1
- Stars Center on the stamps HOT 7
- psf.draw | wcs is not a list for single chip fit HOT 5
- Add equality testing HOT 1
- very large PSF (after re-installation) | Bad fit HOT 6
- regularize in a hacky way HOT 3
- Examples in documentation & `examples/` fail for v1.2 HOT 3
- Piff catastrophically fails when PixelGrid size is larger than input star images HOT 3
- Inconsistent piff log message levels HOT 2
- Fix max_snr weight adjustment.
- Make it easy to run just the star selection without fitting a PSF model
- incorrect error message with missing keyword
- coadd_object_id in psf_stars extension is stored as an f8 instead of an i8 HOT 3
- Add optional high order moments to the HSM output file. HOT 4
- Let weight, badpix be different files from image.
- Strange PSF fitting HOT 5
- Request: Release new version
- test suite needs pytest<8 and galsim<2.5 HOT 1
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 piff.