Comments (2)
The issue here is just that the pupil plane image you are providing is quite a lot larger than the image that gets made automatically from struts and obscuration. More than 2x larger in each dimension. The tall pole numerical computation in phase_screen scales with the number of pixels in the illumination image (based on this image), so that's the 4x you're seeing.
I think the solution (i.e. to make it faster at the expense of some precision) is probably to rebin the input image before passing it to Aperture. If I add the line:
pupil_plane_uv = pupil_plane_uv.bin(2,2)
in getAperture
, then the speed comes out much closer to the same:
Parametrized Aperture, 500 stars
time for make_images = 4.01
Image File Aperture, 500 stars
time for make_images = 4.87
If you're willing to cut the resolution even more at the expense of still more precision, you can use bin(4,4). Then GalSim will complain, but it will run nonetheless:
Parametrized Aperture, 500 stars
time for make_images = 3.93
Image File Aperture, 500 stars
/Users/Mike/mambaforge/envs/py3.8/lib/python3.8/site-packages/galsim/errors.py:416: GalSimWarning: The calculated stepk (1.04824) for PhaseScreenPSF is smaller than what was used to build the wavefront (1.48892). This could lead to aliasing problems. Increasing pad_factor is recommended.
warnings.warn(message, GalSimWarning)
time for make_images = 2.15
The rendered stars still look visually identical to me with the 4,4 binning, so this might be acceptable. But I didn't try too hard to find where there might be aliasing issues with that.
from galsim.
from galsim.
Related Issues (20)
- Small Discrepancy between Real and Fourier Space Shift HOT 4
- Colab install failed error: metadata-generation-failed HOT 1
- Monochromatic SED HOT 2
- BUG in FFTs? HOT 5
- Remove hidden scipy dependency
- SED flux type units lost in translation HOT 2
- Installation issue (FFTW problem with Apple ARM) HOT 2
- define `origin` and `world_origin` for CelestialWCS classes? HOT 8
- CelestialWCS method docstring erratum?
- Quintic interpolant (ALT_QUINTIC) uval: sign pb HOT 2
- Construct images without sanity checks in `_convertMask` function in the HSM module HOT 5
- New quintic kernel for interpolation in Fourier Space
- Sum over ghosts or use a diffrent formula for periodic cardinal sinus.
- maxk approximation used in Exponential profile HOT 2
- Spergel shoot photon for nu<0 HOT 2
- Accept pathlib.PosixPath in places where a basestring file_name is currently allowed.
- `save_photons` does not work for `ChromaticAiry` HOT 1
- Image array throws error about having no setter but still performs operation HOT 9
- numerical issue for some realizations of atmosphere HOT 29
- DoubleZernike.__call__ ought to handle integers
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 galsim.