Abstract
This blog post introduces the CGS-based mock image generation tool, a powerful resource for simulating the appearance of high-redshift galaxies. Using the Carnegie-Irvine Galaxy Survey (CGS) dataset, the tool generates realistic mock images by accounting for redshift effects, luminosity and size evolution, and observational constraints from telescopes like Hubble Space Telescope (HST) and James Webb Space Telescope (JWST). In this post, we will walk through the mock generation process, the required input data, and the tool’s key applications in studying galaxy evolution.
Introduction
As astronomers study the formation and evolution of galaxies across cosmic time, the need to simulate the appearance of galaxies at different redshifts becomes crucial. These simulations help us understand how galaxies evolve in terms of size, brightness, and structure, and how they will appear in future telescopic observations.
The CGS-based mock image generation tool is designed to fill this gap by simulating high-redshift galaxy images based on the Carnegie-Irvine Galaxy Survey (CGS) dataset. The tool provides a robust framework for modeling redshift effects, galaxy luminosity and size evolution, and observational characteristics of modern telescopes, such as HST and JWST.
Mock Image Generation Process
The CGS-based mock image generation tool is designed to simulate how nearby galaxy images would appear when observed at higher redshifts. This process is essential for understanding how redshift effects influence the detection and measurement of galaxy structures across cosmic time, which is critical for planning future observations with instruments like JWST and HST.
The process involves several key steps:
- Starting with Nearby Galaxy Images:
The tool begins with high-quality, high-resolution images of nearby galaxies from the Carnegie-Irvine Galaxy Survey (CGS). These galaxies, due to their proximity, provide accurate measurements of their intrinsic properties such as size, luminosity, and morphology. The goal is to use these images as a base and transform them into mock observations as they would appear at higher redshifts, such as those expected in future surveys. - Physical Evolution Modeling:
As the galaxies are placed at higher redshifts, their intrinsic properties evolve in a way that reflects observational trends. The tool adjusts the luminosity and size of each galaxy based on its stellar mass, with corrections informed by real data from fields like the EGS (Extended Groth Strip). At higher redshifts, galaxies tend to be smaller and more luminous. These evolutionary trends are modeled to ensure that the mock galaxies match the expected physical characteristics at the desired redshift. - Scaling for Redshift Effects:
To simulate the appearance of galaxies at different redshifts, the tool accounts for both angular size and luminosity distance. The galaxies’ physical size remains constant as we shift them from the initial redshift to the target redshift, but their angular size changes due to the expanding universe. The tool calculates a “binning factor” to ensure that the pixels in the galaxy images are resized appropriately to match the desired redshift while preserving the physical size of the galaxies. - Simulating Instrumental Effects:
Next, the tool adjusts the mock images to account for the characteristics of the observing instruments, such as the pixel scale and the Point Spread Function (PSF). The PSF describes how a point source (like a star) would appear in the image due to imperfections in the telescope. The tool uses a technique known as PSF matching, where the resolution of the initial galaxy image is adjusted to match that of the telescope at the target redshift. This ensures that the mock images accurately reflect the capabilities of instruments like HST and JWST at different redshifts. - Surface Brightness Dimming:
A crucial effect of redshift is the dimming of surface brightness. As the universe expands, light from galaxies at higher redshifts is stretched, making the galaxies appear dimmer. The tool applies a correction to account for this surface brightness dimming, which follows a well-established relationship: galaxies at higher redshifts are fainter due to the cosmological redshift. The luminosity of the galaxies is adjusted to reflect this effect, ensuring that the mock images are consistent with the expected observations at different redshifts. - Noise Simulation:
To make the mock images more realistic, the tool introduces two types of noise commonly encountered in astronomical observations:- Poisson Noise: This type of noise arises from the discrete nature of photon arrival and the random variability in the number of detected photons.
- Background Noise: This noise is related to both the instrumental and sky background, and it varies depending on the exposure time and the specific characteristics of the observing field. Instead of simply adding random noise, the tool simulates background noise by extracting a real segment of the sky background from the target field (such as the EGS field). This segment is then added to the mock images, ensuring that the background noise is consistent with the actual observational conditions of the target field. This approach helps create mock images that more accurately reflect the noise characteristics encountered in real surveys.
- Final Adjustments and Mock Image Generation:
After accounting for all these factors, the tool generates the final mock images. These images are ready to be used for further analysis, such as understanding how galaxy properties evolve over time or testing how future surveys might detect certain features in galaxies. By simulating how galaxies would appear in observations at different redshifts, the tool provides valuable insights into the challenges and strategies for studying galaxy evolution in deep-field surveys.
This process allows researchers to explore the effects of redshift on galaxy appearance and prepare for future observational campaigns. The mock images generated can be directly compared with real data from current and future surveys, enhancing our understanding of how galaxy features evolve with redshift and how they will be observed by advanced telescopes like JWST.
Applications of the Tool
The CGS-based mock image generation tool has numerous applications for the study of high-redshift galaxies:
- Redshift Evolution Studies:
By simulating how galaxies appear at different redshifts, the tool helps researchers understand how the intrinsic properties of galaxies, such as size and luminosity, evolve over cosmic time. This can provide insights into the overall growth of galaxies and their structure across different epochs. - Simulating Observations for HST and JWST:
The tool can simulate how galaxies would appear in observations by HST and JWST, two key telescopes in the study of galaxy evolution. The filters used for these telescopes (e.g., F606W, F814W for HST and F115W, F150W for JWST) are carefully selected to match the CGS R-band rest-frame wavelength, ensuring that the mock images match the observational conditions of these instruments. - Preparing for Future Surveys:
The tool helps in preparing for future surveys, providing a way to test how galaxies of various types and at different redshifts will appear in upcoming deep-field observations. This is crucial for designing observational strategies and ensuring that the potential for detecting various galaxy features is maximized.
How to Use the CGS-Based Mock Image Generation Tool
This section provides a detailed guide on how to use the CGS-based high-redshift galaxy mock image generation tool. It covers the process of configuring the tool, running simulations, and obtaining the results.
1. Loading the Configuration File
The configuration file, mock_config.json
, is used to specify the parameters for the simulation. This includes the list of galaxies (Name_list
), the redshift values (z_list
), and the survey (Survey
) used for observation. The configuration file should be formatted in JSON.
Example configuration file:
{
"Name_list": ["NGC3450"],
"z_list": [0.5, 1.0, 2.0, 3.0],
"Survey": "CANDELS_AEGIS",
"mag_target_list": null,
"alpha": 1.04,
"beta": -0.896
}
- Name_list: The list of galaxy names to be simulated (e.g., “NGC3450”).
- z_list: The redshift values for which the simulations will be run (e.g., [0.5, 1.0, 2.0, 3.0]).
- Survey: The name of the survey, such as “CANDELS_AEGIS”.
- mag_target_list: An optional field for specifying the brightness of galaxies in the simulation. If not provided, it defaults to
null
. - alpha and beta: Parameters for the evolution of luminosity and size with redshift, according to the empirical formulas.
2. Simulation Process
The tool simulates galaxy images in several steps, guided by the configuration file.
- Select Galaxies and Redshifts:
Based on theName_list
andz_list
in the configuration file, the tool selects the galaxies and their corresponding redshifts for simulation. - Parameter Settings:
The tool automatically selects the appropriate filters (e.g., F814W, F125W for HST, F115W, F150W for JWST) based on the chosen redshift and survey. It calculates the necessary galaxy parameters such as size and luminosity for each redshift. - Load Original CGS Galaxy Images (Optional):
If the user provides original CGS galaxy images (e.g., FITS format R-band images and corresponding PSF files), the tool will load and use them in the simulation. These images should be stored in folders named after the galaxy (e.g.,NGC3450/NGC3450_R_reg_clean.fits
andNGC3450_R_reg_ep.fits
). - Generate Simulated Images:
The tool generates galaxy images at different redshifts, applying the characteristics of the selected instruments such as PSF, exposure time, image size, and resolution. - Add Noise and Background:
Poisson noise and background effects (extracted from a real segment of the sky in the target field, e.g., EGS) are added to the simulated images to enhance their realism. - Save and Output:
The simulation results are saved as image files, which can be used for further analysis.
3. Folder Structure Creation
The tool automatically creates a folder structure based on the Name_list
in the configuration file. The folders are organized by galaxy name, redshift, observational device, and filter, making it easy to organize and locate simulation results.
Example folder structure:
CANDELS_AEGIS_F125W/
│
├── NGC3450/
│ ├── 0.5/
│ ├── 1.0/
│ └── 2.0/
└── NGC1300/
├── 0.5/
├── 1.0/
└── 2.0/
Each galaxy will have a folder with subfolders for each redshift and the corresponding filter used in the simulation.
4. Creating Composite Images
The tool also supports creating composite images by stitching together mock images from different redshifts. The final composite image will be saved and displayed in the output folder. The layout and size of the composite image are adjusted automatically based on the number of redshifts selected.
5. Optional Configuration Parameters
The configuration file allows for customization in the simulation:
- mag_target_list: Optionally specify the target brightness for galaxies. If not set, it defaults to
null
. - alpha, beta: These parameters define the evolution of galaxy luminosity and size with redshift using the formulas L = L_0 *(1 + z)^α and R = R_0 *(1 + z)^β. If not specified, they default to 0, meaning no evolution is applied.
6. Tool Installation
6.1 Required Python Libraries
To run the tool, ensure that the following Python libraries are installed:
astropy
numpy
matplotlib
photutils
scipy
Install them with the following command:
pip install astropy numpy matplotlib photutils scipy
6.2 Configuration File Path
Ensure that the mock_config.json
configuration file is in the current working directory, or specify the file path when running the simulation.
7. Example Usage Workflow
- Create the Configuration File
Prepare themock_config.json
file with the desired parameters:jsonCopy code{ "Name_list": ["NGC3450"], "z_list": [0.5, 1.0, 2.0, 3.0], "Survey": "CANDELS_AEGIS", "mag_target_list": null, "alpha": 1.04, "beta": -0.896 }
- Run the Simulation
Execute the following command in the terminal to start the simulation:python test_galaxy_simulation.py
- Check the Output
After running the script, check the directory where the mock images are stored. The results will be saved in files with names likecombined_image.png
(for composite images) or individual galaxy images organized by redshift and filter.
8. Code Functionality Overview
test_galaxy_simulation.py Script:
This script is the main entry point for the tool. When executed, it loads the configuration file, performs the galaxy simulation, and outputs the results. The script handles all tasks, including image generation, noise addition, folder creation, and image stitching.
run_simulation(catalog_path, config_path):
This core function reads the configuration file, loads the galaxy data, and performs simulations at different redshifts. The results are saved in the specified folder, with images generated for each redshift.
create_galaxy_folders(name_list, base_path, survey):
This function creates a folder structure based on the Name_list
from the configuration file. Each galaxy has its own folder, with subfolders for each redshift and filter.
create_collage(z_list, image_folder):
This function creates a composite image by stitching together mock images from different redshifts. The layout and size of the final image are adjusted based on the number of redshifts.
choose_filter_for_redshift(z, survey):
This function selects the correct observational filter based on the redshift and survey. Choosing the right filter is essential to ensure the simulation closely matches the rest-frame R-band of the galaxy.
simple_image_plot(image, pixelscale, Objname, display_name, input_band, z_final, output_survey, output_band, morph_T, T_leda, bkg_id):
This function visualizes and saves individual galaxy images based on various parameters, such as pixel scale, redshift, and filter.
Example

NGC 3450 as observed in the R band by the Carnegie-Irvine Galaxy Survey (CGS). This high-resolution image showcases the detailed structure of a nearby spiral galaxy, which serves as the input for the mock image generation tool. The prominent spiral arms and central structure are clearly visible due to the survey’s exceptional spatial resolution and photometric depth.

Mock images of NGC 3450 generated at different redshifts using the CGS-Based Mock Image Generation Tool. The input R-band image is transformed to simulate its appearance as observed by the Hubble Space Telescope (HST) at higher redshifts (z = 0.5, 1.0, 2.0, 3.0). The panels display the dimming of surface brightness and the degradation of spatial resolution with increasing redshift, accounting for observational effects such as the point spread function (PSF) and noise addition. Each panel also specifies the morphological type, apparent magnitude, and pixel intensity scale for the simulated galaxy.
发表回复