GithubHelp home page GithubHelp logo

Comments (19)

esheldon avatar esheldon commented on June 24, 2024

We might want to launch a new git repository to host the config files and scripts for this sub-project.

from piff.

esheldon avatar esheldon commented on June 24, 2024

This might be a good start.

https://github.com/rmjarvis/DESWL/blob/master/sims/v005.yaml

It only outputs galaxies, so we need to add some ability to output the star field.

from piff.

esheldon avatar esheldon commented on June 24, 2024

Need advice from @mjarvis on which branch of galsim supports the new configuration files. Will master work?

from piff.

esheldon avatar esheldon commented on June 24, 2024

the config I linked doesn't seem to work. I tried on master and #774, so I think I just need to get the right branch from someone

Traceback (most recent call last):
  File "/astro/u/esheldon/envs/psfsim/bin/galsim", line 288, in <module>
    main()
  File "/astro/u/esheldon/envs/psfsim/bin/galsim", line 275, in main
    galsim.config.Process(config, logger, njobs=args.njobs, job=args.job, new_params=new_params)
  File "/astro/u/esheldon/envs/psfsim/lib/python2.7/site-packages/galsim/config/process.py", line 610, in Process
    ImportModules(config)
  File "/astro/u/esheldon/envs/psfsim/lib/python2.7/site-packages/galsim/config/process.py", line 445, in ImportModules
    exec('import '+module)
  File "<string>", line 1, in <module>
  File "./des_wcs.py", line 170, in <module>
    galsim.config.RegisterInputType('des_wcs', DES_FullFieldWCS, ['DES_LocalWCS'])
TypeError: RegisterInputType() takes exactly 2 arguments (3 given)

from piff.

rmjarvis avatar rmjarvis commented on June 24, 2024

That v005 config file was a strawman that isn't expected to work. In particular, there is currently no implementation of the epoch stuff yet, which will require some development (probably connected to issue #699).

However, the error you ran into is probably because you are using an old version of des_wcs.py. You should get the new one in the master branch of GalSim (which will soon be an official release as v1.4).

from piff.

esheldon avatar esheldon commented on June 24, 2024

I didn't realize this des_wcs.py was part of galsim

from piff.

esheldon avatar esheldon commented on June 24, 2024

I tried the v004.yaml, with the newer des_wcs.py, and it runs fine, thanks for the pointers.

Now for a star field

from piff.

esheldon avatar esheldon commented on June 24, 2024

I've put some config files here: https://github.com/esheldon/psfsim_config

The star field is in psfsim-stars-v001.yaml

I could use some help making this suitable for our tests; I've marked TODO some things in the file, but also

  • is this producing a variable psf across the field?
  • what is a good distribution function for flux?
  • are are the right DES image parameters?

from piff.

rmjarvis avatar rmjarvis commented on June 24, 2024

is this producing a variable psf across the field?

No. The psf.index_key = file_num means that this will keep a single PSF model for each output file. And most of the prescriptions for picking parameters are not appropriate for how to construct a reasonable PSF variation across a chip.

For useful tests of PSF interpolation, we'll want the various PSF parameters be functions of (x,y) with the meta-parameters fixed in each file. e.g.

astig1: 
    type: Eval
    str: "mean + a * image_pos.x + b * image_pos.y + c * image_pos.x**2 + d * image_pos.y**2 + e * image_pos.x*image_pos.y"
    fmean: { type: RandomGaussian, sigma: 0.13, index_key: file_num }
    fa: { type: RandomGaussian, sigma: 2.e-3, index_key: file_num }
    fb: { type: RandomGaussian, sigma: 2.e-3, index_key: file_num }
    fc: { type: RandomGaussian, sigma: 1.e-6, index_key: file_num }
    fd: { type: RandomGaussian, sigma: 1.e-6, index_key: file_num }
    fe: { type: RandomGaussian, sigma: 1.e-6, index_key: file_num }

Something like this at least. I don't really know what the right sigmas are here, but I think something around this order of magnitude. And if we do this for all the optical terms, then they will couple non-linearly, so a polynomial interpolation won't be trivially correct, so it will be an interesting test.

from piff.

rmjarvis avatar rmjarvis commented on June 24, 2024

gain: 2.1 # e- / ADU TODO: match to DES

I think this was the SV value. But Y1 is about 4. And Y3 will be 1.

from piff.

rmjarvis avatar rmjarvis commented on June 24, 2024

read_noise: 3.4 # Variance in ADU^2 TODO: match to DES

Again, I think I took this from the header of the FITS file for the SV image that we used in the GalSIm example, but I suspect it is different for Y1, and in fact probably varies somewhat from image to image. We should check what the right distribution for this is.

from piff.

esheldon avatar esheldon commented on June 24, 2024

Those values were from the lsst.yaml file

from piff.

rmjarvis avatar rmjarvis commented on June 24, 2024

Those values were from the lsst.yaml file

Oh. OK. Here are the values for one random Y1 image:

GAINA   =                4.039 / [electrons/adu] Gain for amp A         
RDNOISEA=                6.139 / [electrons] Read noise for amp A
GAINB   =                3.781 / [electrons/adu] Gain for amp B
RDNOISEB=                5.982 / [electrons] Read noise for amp B

I don't know how stable these values are...

from piff.

esheldon avatar esheldon commented on June 24, 2024

are those sigmas fractional or absolute?

from piff.

esheldon avatar esheldon commented on June 24, 2024

Framework for running these sims is here https://github.com/esheldon/psfsim

from piff.

rmjarvis avatar rmjarvis commented on June 24, 2024

are those sigmas fractional or absolute?

They're the normal definition of sigma for a Gaussian random deviate. N(mu, sigma). You can give a mean too if you like; the default is 0. cf.

https://github.com/GalSim-developers/GalSim/wiki/Config-Values#float_value

from piff.

esheldon avatar esheldon commented on June 24, 2024

What I meant, is, is sigma=0.13 a 13% scatter or is that the total scatter around the mean. Since it is fmean I thought maybe that was fractional.

from piff.

rmjarvis avatar rmjarvis commented on June 24, 2024

The f means float. The first letter for eval variables tells the config processing what type to use. cf. https://github.com/GalSim-developers/GalSim/wiki/Config-Values#user-defined-variables

So fmean defines a float variable called mean that is used in the eval string as just mean. Likewise fa, fb, etc. show up in the eval string as a, b, etc.

from piff.

esheldon avatar esheldon commented on June 24, 2024

I think we can close this issue, since the effort has begun. Let's continue over at https://github.com/esheldon/psfsim_config

from piff.

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.