RoSE-Sim is a Python package designed for creating image simulations of semi-resolved dwarf galaxies for the Nancy Grace Roman Space Telescope.
You can install Rosesim locally by cloning the repository and running:
git clone git@github.com:AstroJacobLi/Rosesim.git
cd Rosesim
pip install -e .Rosesim requires a dedicated data directory to store large files (e.g., isochrones, sky models).
-
Create a directory for the data (e.g.,
/scratch/gpfs/user/Rosesim_Data). -
Set the
ROSESIM_DATA_PATHenvironment variable pointing to this directory. Add the following line to your shell configuration file (e.g.,~/.bashrcor~/.zshrc):export ROSESIM_DATA_PATH="/path/to/your/data/directory"
-
Reload your shell configuration:
source ~/.bashrc
Once the package is installed and the environment variable is set, you can easily download the necessary data files using the built-in fetch function:
import rosesim
rosesim.fetch_data()This command downloads the required isochrones and sky models to your ROSESIM_DATA_PATH.
Rosesim uses PARSEC isochrones for stellar population synthesis.
- Isochrones: Pre-packaged for Roman filters. Note that Roman isochrones are provided in Vega magnitudes.
- Conversion: Zeropoint offsets to convert to AB magnitudes are available in
rosesim.Roman_zp_AB_Vega_mist. - AGB Stars: Special attention has been given to the resolution of thermal pulse cycles (
ninTPC=20in COLIBRI tracks) to strictly resolve AGB stars (see Lee et al. 2025).
Available Grid: (unfortunately, artpop doesn't support the PARSEC isochrones to be interpolated yet)
- Filters: F062, F087, F106, F129, F146, F158, F184, F213
- Log(Age/yr): [8.0, 8.1, 8.2, 8.3, 8.4, 8.5, 8.6, 8.7, 8.8, 8.9, 9.0, 9.1, 9.2, 9.3, 9.4, 9.5, 9.6, 9.7, 9.8, 9.9, 10.0, 10.1]
- Metallicity [Fe/H]: [-2.00, -1.75, -1.50, -1.25, -1.00, -0.75, -0.50, -0.25, 0.00, +0.25]
A Milky Way star catalog is generated using the TRILEGAL model.
- Default Field: RA = 10h, Dec = 2.27 deg
- Depth: Limiting magnitude of 30 mag in the 4th filter.
- Location: Stored in
ROSESIM_DATA_PATH/TRILEGAL/.
To simulate realistic observations, Rosesim includes a background sky model comprising:
- Background Galaxies: From the JAGUAR mock catalog.
- Foreground Stars: From the TRILEGAL model.
Caution
JAGUAR fluxes are currently based on JWST filters. A conversion to Roman filters is pending.
Rosesim provides command-line scripts for common simulation tasks. The scripts are located in rosesim/scripts/.
Generate a full sky model including background galaxies and Milky Way stars:
rosesim_sky \
--obs_ra=150.1049 \
--obs_dec=2.2741 \
--size=5001 \
--prefix='sky_jaguar_trilegal' \
--exptime=642 \
--filters="['F106', 'F129', 'F158']" \
--seed=42 \
--include_bkg=True \
--include_star=True \
--psf_fov_arcsec=10To generate an empty sky (for noise-only or background-free simulations):
rosesim_sky \
--obs_ra=150.1049 \
--obs_dec=2.2741 \
--size=5001 \
--prefix='empty_sky' \
--exptime=642 \
--filters="['F106', 'F129', 'F158']" \
--seed=42 \
--include_bkg=False \
--include_star=False \
--psf_fov_arcsec=10Check this notebook if you wanna make your own sky model.
Inject a specific dwarf galaxy into a simulation:
rosesim_gal \
--obs_ra=150.1049 \
--obs_dec=2.2741 \
--distance=5 \
--age=1.0 \
--log_m_star=4 \
--exptime=642 \
--sky_model=DATA_PATH + "/sky_jaguar_trilegal/"A full list of options for simulating the dwarf galaxy is as follows:
simulate_galaxy(
obs_ra=150.1049,
obs_dec=2.2741,
log_m_star=6,
distance=30,
age=5,
feh=-1.5,
abs_mag_lim=-1,
filters=["F129", "F158", "F106"],
exptime=642,
n=0.8,
theta=100,
ellip=0.3,
sky_model=DATA_PATH + "sky_jaguar_trilegal/",
)Check this notebook if you wanna tune your dwarf galaxy's properties, such as size, age, metallicity, etc.
You can also use the Python API to inspect or manipulate data.
Example: inspect the sky model
import rosesim
# Read the simulated ASDF file
sky_dm = rosesim.read_L3_asdf('./F158_642s.asdf')
# Convert to FITS for inspection (e.g., with DS9)
rosesim.asdf_to_fits(sky_dm, 'F158_642s.fits', subtract_bkg=True)The package relies on the following libraries:
numpy,matplotlib,astropy,astroqueryartpop,asdf,astrocut,roman_datamodelsromanisim(Modified version required: GitHub)
- Add stellar population info to ASDF
meta. - Support more diverse sky background options.
- Support composite stellar populations and user-defined structural parameters.
- Expand documentation and examples.
- Enable photometry on the simulated images.
MIT
