Comments (10)
I'm going to try and fix it and PR it...
from gunagala.
@bazkiaei is this still an issue? @AnthonyHorton do you have a suggested fix for us to implement?
from gunagala.
@bazkiaei is this still an issue? @AnthonyHorton do you have a suggested fix for us to implement?
I believe it is solved due to clipping below zero pixel values
within "Fix axis 18 WIP" pull request and adding a warning
to the code.
from gunagala.
@bazkiaei I just tried running the jupyter notebook code using this branch and it fails on the 5th cell running:
sky_image = huntsman.make_noiseless_image(centre='14h41m -60d54m',
obs_time='2018-04-12T08:00',
filter_name='g')
I get this error:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-5-47b8d37b5389> in <module>()
----> 1 sky_image = huntsman.make_noiseless_image(centre='14h41m -60d54m',
2 obs_time='2018-04-12T08:00',
3 filter_name='g')
4
5 plt.imshow(sky_image)
AttributeError: 'Imager' object has no attribute 'make_noiseless_image'
Do you get the same error?
from gunagala.
@bazkiaei I just tried running the jupyter notebook code using this branch and it fails on the 5th cell running:
sky_image = huntsman.make_noiseless_image(centre='14h41m -60d54m', obs_time='2018-04-12T08:00', filter_name='g')
I get this error:
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-5-47b8d37b5389> in <module>() ----> 1 sky_image = huntsman.make_noiseless_image(centre='14h41m -60d54m', 2 obs_time='2018-04-12T08:00', 3 filter_name='g') 4 5 plt.imshow(sky_image) AttributeError: 'Imager' object has no attribute 'make_noiseless_image'
Do you get the same error?
I was getting that error at the first days I was working on Mock Image Generator
. I think the reason is that you are on develop
branch of gunagala
. In that case you should change the branch to image_sime
.
from gunagala.
@bazkiaei That axes order fix and CRVAL are unrelated. CRVAL is used to set the RA and dec of the 'reference pixel', i.e. it determines where on the sky the imager is pointing. Might be work checking the axis order of CRPIX, though...
@lee It doesn't get set until make_noiseless_image
is run because I was assuming that the on sky position of the imager would only become relevant when creating a simulated image, at which point it gets set from the centre
argument of the make_noiseless_image
call. There's not really any sensible default value, and (at the time, at least) there didn't seem to be any reason for setting it before the make_noiseless_image
call. Could add a method for pre-setting CRVAL if there is a need, though?
from gunagala.
@bazkiaei That axes order fix and CRVAL are unrelated. CRVAL is used to set the RA and dec of the 'reference pixel', i.e. it determines where on the sky the imager is pointing. Might be work checking the axis order of CRPIX, though...
@lee It doesn't get set until
make_noiseless_image
is run because I was assuming that the on sky position of the imager would only become relevant when creating a simulated image, at which point it gets set from thecentre
argument of themake_noiseless_image
call. There's not really any sensible default value, and (at the time, at least) there didn't seem to be any reason for setting it before themake_noiseless_image
call. Could add a method for pre-setting CRVAL if there is a need, though?
Oh, I thought this is related to the error that was arising. @AnthonyHorton thank you for informing me.
from gunagala.
@AnthonyHorton the trouble is that make_noiseless_image
make a call implying there is a WCS before one has been set if self.sky
doesn't have an attribute 'relative_brightness'
. The offending line is: pixel_coords = self.wcs.all_world2pix(((coords.ra.degree, coords.dec.degree),), 0) \
I think you just want to set pixel_coords = self.get_pixel_coords(centre)
no matter what?
from gunagala.
@lee Ah, OK. Probably quite a bit of scope for tidying up there. Rather too much setting things as a side effect of doing other things going on, which makes bugs like this more likely.
from gunagala.
Fixed by #25
from gunagala.
Related Issues (20)
- Replace ensure_unit() with astropy.units.quantity_input() HOT 1
- swapped self.wcs._naxis in make_noiseless_image? HOT 5
- something odd with offsets HOT 6
- function to convolve image using Imager PSF
- modify make_noiseless_image to take as input extended images HOT 1
- use spatially-varying PSFs
- track down `AstropyDeprecationWarning` and fix HOT 1
- Improve Pytest in test_psf.py HOT 3
- None value for MoffatPSF.n_pix and MoffatPSF.peak HOT 4
- Reduce memory usage for simulated images with analytic PSFs
- Getting the LTS test working again
- extended_source_signal_noise returning `None` without warning HOT 1
- pep8 cleanup
- become an astropy affiliated package HOT 1
- a whole lot of warnings when unit tests are run
- Adding the EUCLID Wright and Kelsall Zodiacal Light models
- Refactor PSF code - enable fitting of pixellated models to image data HOT 1
- Add Huntsman ETC example notebook HOT 1
- Refactor Imager instantiation
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 gunagala.