Some scene examples

Below are some examples of ‘scene’ files as well as the resulting simulated images.

Example 1: selected number of slices

Let’s start with a simple example, simulating a flat illumination of slices 1 through 15 in the IFU field of view. Here we are using the file scene01.yaml.

scene_block_name: constant flux
spectrum:
  type: constant-flux
geometry: 
  type: slices 1-15
nphotons: 1.5E7
wavelength_sampling: random            # optional: default=random
apply_seeing: False                    # optional: default=True
apply_atmosphere_transmission: False   # optional: default=True
render: True                           # optional: default=True

Execute fridadrp-ifu_simulator:

(venv_frida) $ fridadrp-ifu_simulator \
  --scene scene01.yaml \
  --flux_factor 10 \
  --grating medium-K \
  --scale fine \
  --bias 0 \
  --rnoise 0 \
  --flatpix2pix none \
  --seed 1234 \
  --output_dir work \
  --record
────────────────────── Welcome to fridadrp-ifu_simulator ───────────────────────
Using fridadrp.tools.frida_ifu_simulator version 0.1.dev156+gb081f58ec          
Output directory: work                                                          
Scene file: scene01.yaml                                                        
* Processing: constant flux                                                     
Number of photons to be simulated for this block: 150000000                     
The maximum value in test_ifu_white2D_method0_os1.fits is greater than 65535.   
Saving the image using float32 to avoid saturation.                             
Saving file: test_ifu_white2D_method0_os1.fits (BITPIX=-32)                     
Saving file: test_ifu_white2D_method0_os10.fits (BITPIX=16)                     
Saving file: test_ifu_3D_method0.fits (BITPIX=16)                               
.........10.........20.........30
Saving file: test_rss_2D_method0.fits (BITPIX=16)                               
Saving file: test_detector_2D_method0.fits (BITPIX=-32)                         
.........10.........20.........30
Saving file: test_rss_2D_method1.fits (BITPIX=-32)                              
Saving file: test_ifu_3D_method1.fits (BITPIX=-32)                              
Total time elapsed: 0:01:18.243415                                              
──────────────────────────────────  Goodbye!  ──────────────────────────────────
(venv_frida) $ numina-ximshow work/test_ifu_white2D_method0_os1.fits \
  --cbar_orientation vertical --z1z2 minmax --aspect equal

(venv_frida) $ numina-ximshow work/test_ifu_white2D_method0_os10.fits \
  --cbar_orientation vertical --z1z2 minmax --aspect equal
../_images/test_ifu_white2D_method0_os1.png ../_images/test_ifu_white2D_method0_os10.png
(venv_frida) $ numina-ximshow work/test_rss_2D_method0.fits \
  --cbar_orientation vertical --z1z2 minmax --aspect equal

(venv_frida) $ numina-ximshow work/test_detector_2D_method0.fits \
  --cbar_orientation vertical --z1z2 minmax --aspect equal

(venv_frida) $ numina-ximshow work/test_rss_2D_method1.fits \
  --cbar_orientation vertical --z1z2 minmax --aspect equal
../_images/test_rss_2D_method0.png ../_images/test_detector_2D_method0.png ../_images/test_rss_2D_method1.png
(venv_frida) $ numina-extract_2d_slice_from_3d_cube work/test_ifu_3D_method0.fits

(venv_frida) $ numina-extract_2d_slice_from_3d_cube work/test_ifu_3D_method1.fits
../_images/projected_3D_method0.png ../_images/projected_3D_method1.png

Example 2: collection of Gaussian objects

Here we are using the file scene02.yaml.

scene_block_name: Gaussian center
spectrum:
  type: constant-flux
geometry: 
  type: gaussian
  fwhm_ra_arcsec: 0.04
  fwhm_dec_arcsec: 0.04
  position_angle_deg: 0.0
  delta_ra_arcsec: 0.0
  delta_dec_arcsec: 0.0
nphotons: 1E4
wavelength_sampling: random
apply_seeing: False
apply_atmosphere_transmission: False
render: True
---
scene_block_name: Gaussian top left
spectrum:
  type: constant-flux
geometry: 
  type: gaussian
  fwhm_ra_arcsec: 0.08
  fwhm_dec_arcsec: 0.16
  position_angle_deg: 0.0
  delta_ra_arcsec: 0.18
  delta_dec_arcsec: 0.15
nphotons: 1E5
wavelength_sampling: random
apply_seeing: False
apply_atmosphere_transmission: False
render: True
---
scene_block_name: Gaussian bottom left
spectrum:
  type: constant-flux
geometry: 
  type: gaussian
  fwhm_ra_arcsec: 0.08
  fwhm_dec_arcsec: 0.08
  position_angle_deg: 0.0
  delta_ra_arcsec: 0.18
  delta_dec_arcsec: -0.15
nphotons: 5E4
wavelength_sampling: random
apply_seeing: False
apply_atmosphere_transmission: False
render: True
---
scene_block_name: Gaussian top right
spectrum:
  type: constant-flux
geometry: 
  type: gaussian
  fwhm_ra_arcsec: 0.04
  fwhm_dec_arcsec: 0.08
  position_angle_deg: 0.0
  delta_ra_arcsec: -0.18
  delta_dec_arcsec: 0.15
nphotons: 3E4
wavelength_sampling: random
apply_seeing: False
apply_atmosphere_transmission: False
render: True
---
scene_block_name: Gaussian bottom right
spectrum:
  type: constant-flux
geometry: 
  type: gaussian
  fwhm_ra_arcsec: 0.32
  fwhm_dec_arcsec: 0.04
  position_angle_deg: 45
  delta_ra_arcsec: -0.18
  delta_dec_arcsec: -0.15
nphotons: 1E5
wavelength_sampling: random
apply_seeing: False
apply_atmosphere_transmission: False
render: True

Execute fridadrp-ifu_simulator:

(venv_frida) $ fridadrp-ifu_simulator \
  --scene scene02.yaml \
  --flux_factor 10 \
  --grating medium-K \
  --scale fine \
  --bias 0 \
  --rnoise 0 \
  --flatpix2pix none \
  --seed 1234 \
  --output_dir work \
  --record
────────────────────── Welcome to fridadrp-ifu_simulator ───────────────────────
Using fridadrp.tools.frida_ifu_simulator version 0.1.dev156+gb081f58ec          
Output directory: work                                                          
Scene file: scene02.yaml                                                        
* Processing: Gaussian center                                                   
Number of photons to be simulated for this block: 100000                        
* Processing: Gaussian top left                                                 
Number of photons to be simulated for this block: 1000000                       
* Processing: Gaussian bottom left                                              
Number of photons to be simulated for this block: 500000                        
* Processing: Gaussian top right                                                
Number of photons to be simulated for this block: 300000                        
* Processing: Gaussian bottom right                                             
Number of photons to be simulated for this block: 1000000                       
Saving file: test_ifu_white2D_method0_os1.fits (BITPIX=16)                      
Saving file: test_ifu_white2D_method0_os10.fits (BITPIX=16)                     
Saving file: test_ifu_3D_method0.fits (BITPIX=16)                               
.........10.........20.........30
Saving file: test_rss_2D_method0.fits (BITPIX=16)                               
Saving file: test_detector_2D_method0.fits (BITPIX=-32)                         
.........10.........20.........30
Saving file: test_rss_2D_method1.fits (BITPIX=-32)                              
Saving file: test_ifu_3D_method1.fits (BITPIX=-32)                              
Total time elapsed: 0:00:04.291180                                              
──────────────────────────────────  Goodbye!  ──────────────────────────────────
(venv_frida) $ numina-ximshow work/test_ifu_white2D_method0_os1.fits \
  --cbar_orientation vertical --z1z2 minmax --aspect equal

(venv_frida) $ numina-ximshow work/test_ifu_white2D_method0_os10.fits \
  --cbar_orientation vertical --z1z2 minmax --aspect equal
../_images/test_ifu_white2D_method0_os11.png ../_images/test_ifu_white2D_method0_os101.png
(venv_frida) $ numina-ximshow work/test_rss_2D_method0.fits \
  --cbar_orientation vertical --z1z2 minmax --aspect equal

(venv_frida) $ numina-ximshow work/test_detector_2D_method0.fits \
  --cbar_orientation vertical --z1z2 minmax --aspect equal

(venv_frida) $ numina-ximshow work/test_rss_2D_method1.fits \
  --cbar_orientation vertical --z1z2 minmax --aspect equal
../_images/test_rss_2D_method01.png ../_images/test_detector_2D_method01.png ../_images/test_rss_2D_method11.png
(venv_frida) $ numina-extract_2d_slice_from_3d_cube work/test_ifu_3D_method0.fits

(venv_frida) $ numina-extract_2d_slice_from_3d_cube work/test_ifu_3D_method1.fits
../_images/projected_3D_method01.png ../_images/projected_3D_method11.png

Example 3: M51-like galaxy

Here we are using the file scene03.yaml.

scene_block_name: M51 DSS1
spectrum:
  type: constant-flux
geometry: 
  type: from-FITS-image
  filename: m51_dss1.fits
  diagonal_fov_arcsec: 0.80
  background_to_subtract: mode
nphotons: 1E6
apply_atmosphere_transmission: True
render: True
---
scene_block_name: skycalc radiance
spectrum:
  type: skycalc-radiance
geometry:
  type: flatfield
nphotons: 1E6
apply_seeing: False
apply_atmosphere_transmission: False
render: True

We aim to simulate a galaxy resembling the morphology of Messier 51. To achieve this, we generated a \({15 \times 15}~{\rm arcmin}^2\) image using the ESO Online Digitized Sky Survey. The corresponding file is m51_dss1.fits.

Execute fridadrp-ifu_simulator:

(venv_frida) $ fridadrp-ifu_simulator \
  --scene scene03.yaml \
  --flux_factor 1 \
  --grating medium-K \
  --scale fine \
  --bias 0 \
  --rnoise 0 \
  --flatpix2pix none \
  --seed 1234 \
  --output_dir work \
  --record
────────────────────── Welcome to fridadrp-ifu_simulator ───────────────────────
Using fridadrp.tools.frida_ifu_simulator version 0.1.dev156+gb081f58ec          
Output directory: work                                                          
Scene file: scene03.yaml                                                        
* Processing: M51 DSS1                                                          
WARNING: asumming scene_block['wavelength_sampling']='random'                   
WARNING: asumming scene_block['apply_seeing']=True                              
Number of photons to be simulated for this block: 1000000                       
WARNING: apply_seeing=True when seeing_fwhm_arcsec=<Quantity 0. arcsec>         
Seeing effect will not be applied!                                              
* Processing: skycalc radiance                                                  
WARNING: asumming scene_block['wavelength_sampling']='random'                   
Number of photons to be simulated for this block: 1000000                       
Ignoring wave_unit: m (assuming nm)                                             
Saving file: test_ifu_white2D_method0_os1.fits (BITPIX=16)                      
Saving file: test_ifu_white2D_method0_os10.fits (BITPIX=16)                     
Saving file: test_ifu_3D_method0.fits (BITPIX=16)                               
.........10.........20.........30
Saving file: test_rss_2D_method0.fits (BITPIX=16)                               
Saving file: test_detector_2D_method0.fits (BITPIX=-32)                         
.........10.........20.........30
Saving file: test_rss_2D_method1.fits (BITPIX=-32)                              
Saving file: test_ifu_3D_method1.fits (BITPIX=-32)                              
Total time elapsed: 0:00:05.176177                                              
──────────────────────────────────  Goodbye!  ──────────────────────────────────
(venv_frida) $ numina-ximshow work/test_ifu_white2D_method0_os1.fits \
  --cbar_orientation vertical --z1z2 minmax --aspect equal

(venv_frida) $ numina-ximshow work/test_ifu_white2D_method0_os10.fits \
  --cbar_orientation vertical --z1z2 minmax --aspect equal
../_images/test_ifu_white2D_method0_os12.png ../_images/test_ifu_white2D_method0_os102.png
(venv_frida) $ numina-ximshow work/test_rss_2D_method0.fits \
  --cbar_orientation vertical --z1z2 minmax --aspect equal

(venv_frida) $ numina-ximshow work/test_detector_2D_method0.fits \
  --cbar_orientation vertical --z1z2 minmax --aspect equal

(venv_frida) $ numina-ximshow work/test_rss_2D_method1.fits \
  --cbar_orientation vertical --z1z2 minmax --aspect equal
../_images/test_rss_2D_method02.png ../_images/test_detector_2D_method02.png ../_images/test_rss_2D_method12.png
(venv_frida) $ numina-extract_2d_slice_from_3d_cube work/test_ifu_3D_method0.fits

(venv_frida) $ numina-extract_2d_slice_from_3d_cube work/test_ifu_3D_method1.fits
../_images/projected_3D_method02.png ../_images/projected_3D_method12.png