Comments (19)
We might want to launch a new git repository to host the config files and scripts for this sub-project.
from piff.
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.
Need advice from @mjarvis on which branch of galsim supports the new configuration files. Will master work?
from piff.
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.
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.
I didn't realize this des_wcs.py was part of galsim
from piff.
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.
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.
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.
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.
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.
Those values were from the lsst.yaml file
from piff.
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.
are those sigmas fractional or absolute?
from piff.
Framework for running these sims is here https://github.com/esheldon/psfsim
from piff.
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.
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.
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.
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)
- PSF wings HOT 2
- Reading WCS solution of ZTF images HOT 1
- Stars Center on the stamps HOT 7
- psf.draw | wcs is not a list for single chip fit HOT 5
- Add equality testing HOT 1
- very large PSF (after re-installation) | Bad fit HOT 6
- regularize in a hacky way HOT 3
- Examples in documentation & `examples/` fail for v1.2 HOT 3
- Piff catastrophically fails when PixelGrid size is larger than input star images HOT 3
- Inconsistent piff log message levels HOT 2
- Fix max_snr weight adjustment.
- Make it easy to run just the star selection without fitting a PSF model
- incorrect error message with missing keyword
- coadd_object_id in psf_stars extension is stored as an f8 instead of an i8 HOT 3
- Add optional high order moments to the HSM output file. HOT 4
- Let weight, badpix be different files from image.
- Strange PSF fitting HOT 5
- Request: Release new version
- test suite needs pytest<8 and galsim<2.5 HOT 1
- Add option to outlier-reject reserve stars at the end of the processing HOT 1
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 piff.