Closed lspitler closed 5 years ago
OK @AnthonyHorton I can try! I'm going to move self.wcs.wcs.crval = [centre.icrs.ra.value, centre.icrs.dec.value]
out of get_pixel_coords
completely....
OK @AnthonyHorton please take a look at the new method.
OK @AnthonyHorton try the current version. CRVAL defaults to [0., 0.]
which I guess is technically valid, so I set it to [None, None]
in __init__
of Imager
to ensure it is set.
@AnthonyHorton OK will try... why did Travis fail? I can't see the error - do I need a login? Locally, 4 tests fail in test_imager.py
, but they did before I started coding.
@lee The test fail is in the docs build, you should be able to see it here: https://travis-ci.org/AstroHuntsman/gunagala/jobs/432334464
For some reason the Sphinx auto docs fails when you import something into a module namespace, unless you specifically exclude it from the docs. In this case it's the new import of InvalidTransformError
from astropy.wcs
that's tripped it up. You'll need to edit gunagala/docs/index.rst
and add a :skip: InvalidTransformError
line in the .. automodapi:: gunagala.imager
. You'll see there's a bunch of skip directives there I've already had to add. There's probably a way to avoid this, but I haven't found it yet.
Everything else is passing in Travis CI so I'm a bit concerned you're seeing local test failures. Which ones are failing, and how?
@AnthonyHorton thanks for the tip about Sphinx. Just pushed fix for it and a test function. The local test failures are actually xFails, so never mind them. Welcome feedback on the test.
@AnthonyHorton can you take a quick look to see if what I did with custom arg parsers is what you had in mind? Should be a quick one and will help @bazkiaei with mock galaxies.
Ok @AnthonyHorton is a bottleneck for @bazkiaei 's code so I've merged & closed this as its been 6 days and I'm sure you have more important things to do than this tiny, tiny issue. Please re-open if there any problems and I'll fix via a new branch.
As per https://github.com/AstroHuntsman/gunagala/issues/17 this is a simple fix to ensure CRVAL is always set at beginning of function call.