GalSim | Documentation
kandi X-RAY | GalSim Summary
kandi X-RAY | GalSim Summary
The modular galaxy image simulation toolkit. Documentation:
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Main function .
- Compute comparison between two DFTs .
- Build a grid .
- Perform the interpolant test .
- Wrapper for multiprocessing .
- Write an image list to a file .
- Random interpolant test .
- Interleave two images .
- Get the WCS for a given world position .
- Compute the difference between two DFTs .
GalSim Key Features
GalSim Examples and Code Snippets
Community Discussions
Trending Discussions on GalSim
QUESTION
I'm trying to import galaxy values (Sersic index, half light radius, etc) from an external ascii file in to GalSim. I'm having trouble reading in the position angle value 'beta', and would like to know if this is possible using the YAML format.
When I try I get the error message:
galsim.errors.GalSimConfigValueError: Invalid value_type specified for parameter beta with type=Catalog. Value not in (, , , )
I realise that I'm getting this error message because I'm unable to append the string 'deg' after the input to specify that the units of this input are in degrees.
I've tried adding 'deg' directly in to the input catalogue (inside "" speech marks), with no success. I've also tried adding 'deg' after the catalogue read statement directly in the code, also to no success.
A minimum working example is below. This relies on a file named 'input.dat' in the same directory with a single number inside (45, for example). Then, save the code below as 'test.yaml' and run on the command line as $ galsim test.yaml
:
ANSWER
Answered 2019-Jan-28 at 19:18Try this:
QUESTION
Setup
- MacOS 10.12.6
- Python 2.7
- Galsim 1.4.4
Goal
I want to insert two SEDs (Balge and Disk) and using them to make WFIRST PSFs.
So far I am able to import SEDs by applying galsim.SED() and produce a PSF using wfirst.getPSF()
Problem
By applying the wfirst.getPSF(), I cannot take my desired SED into account.
I even tried:
I also tried using galsim.Bandpass()
More details:
Based on the recipe provided in Example(#13) One may produce PSF using wfirst.getPSF() and then convolve it the SED.
I followed this routine:
...ANSWER
Answered 2018-Mar-04 at 15:15The key point of confusion is that the PSF does not have an SED; only astronomical objects such as stars and galaxies have SEDs. The process that you've pointed to in demo13.py is the correct way to include an SED: you attach it to the astronomical object in question (in this case a star, but you could also assign an SED to a galaxy, or assign different SEDs to separate components of a galaxy).
So if you had achromatic galsim.GSObjects called bulge
and disk
for two galaxy components, and separate SEDs for each one (bulge_sed
and disk_sed
), a chromatic WFIRST PSF called psf
, and a galsim.Bandpass filter
, then you simply do:
QUESTION
Setup
- MacOS 10.12.6
- Python 2.7
- Galsim 1.4.4
- Numpy 1.13.1
- Astropy 1.3.3
- Fitsio
Goal
My goal is to take simulated wide field HST images (12288*12288 pixels, roughly 600MB in .fits format) and add the WFIRST detector features to it.
Problem
Unfortunately, I have faced difficulties reading the fits files.
The main question is how to turn fits images in the way that we can manipulate them by galsim.
I've tried
I have tried galsim fits method ‘galsim.fits.read(“fine_name.fits”)’ and I‘ve got :
...ANSWER
Answered 2017-Sep-11 at 15:56If you read the docstring for galsim.fits.read, you will see that it returns a galsim.Image, as you have found with your experiment. To create a GSObject, you need to instantiate a galsim.InterpolatedImage, which will allow you to convolve and do other operations. You can read the docstring for galsim.InterpolatedImage, and/or look at galsim demo11.py to see an example of this being done in practice (reading in an image file into an InterpolatedImage and convolving with something else).
Detector features do get added to images, not GSObjects. For an example of this, see GalSim's demo13.py.
Questions of basic GalSim usage are covered in the Quick Reference Guide https://github.com/GalSim-developers/GalSim/blob/releases/1.4/doc/GalSim_Quick_Reference.pdf and the demos in the GalSim repository.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install GalSim
You can use GalSim like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page