Git Product home page Git Product logo

Comments (3)

rmjarvis avatar rmjarvis commented on September 26, 2024 3

Yes, there are various numerical approximations made throughout GalSim, which are usually controllable via GSParams objects. Doing all the math to machine precision is overkill for almost all use cases. Our default accuracy/speed trade-off tries to target plausible accuracy requirements from typical weak lensing surveys (e.g. LSST). But we allow users to tune things differently, either for more accuracy or faster rendering. cf GSParams docs

It's not always obvious a priori which parameter is the most relevant for any particular imaging artifact. Before I tested, I expected maxk_threshold to be the one, since that controls the size of the FFT image that gets made. But in fact, in this case kvalue_accuracy is the relevant one. If you lower that from the default of 1.e-5 to 1.e-8, here is what I get back:

kvalue

from galsim.

rmjarvis avatar rmjarvis commented on September 26, 2024 3

BTW, the easiest way to adjust the GSParams of an object that is already made is to use the withGSParams method. E.g.

gal_high_flux = gal_high_flux.withGSParams(kvalue_accuracy=1.e-8)

You can include multiple parameters here. Or do it multiple times with different parameters if you prefer. This can make it easier to comment in or out particular choices to see which ones matter.

If you know what you want in advance, you can also create a gsparams instance and pass it as a parameter to the GSObject (Gaussian in this case) when you initially make it.

from galsim.

jecampagne avatar jecampagne commented on September 26, 2024

Thanks !

from galsim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.