Skip to main content

A software to calibrate the sky background of Space Telescope images

Project description

Contributors Forks Stargazers Issues MIT License LinkedIn


ROSALIA_logo

ROSALIA: ROman Sky Analyst for Low surface brightness Imaging & Astronomy


Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

Product Name Screen Shot

ROSALIA (Roman Sky Analyst for Low surface brightness Imaging & Astronomy) is a pipeline to model the sky background level on astronomical images obtained with NASA/Nancy Grace Roman Space Telescope and its direct predecessor, the legendary NASA/Hubble Space Telescope. In particular ROSALIA is focused on the prediction and calibration of stray-light in the Roman Wide Field Instrument, one of the main contaminants in ultra deep low surface brightness observations, and the main source of gradients of parasitic light for space telescopes. ROSALIA combines the information from existing photometric catalogs (Gaia, 2MASS, WISE) with precise optical and payload ray-tracing models of the Roman Space Telescope, allowing to generate images of stray-light and other components of the sky-background for user-defined observational conditions.

ROSALIA is funded through a NASA Grant (D.14 Roman 2022), ROSES/Nancy Grace Roman Space Telescope Research and Support Participation Opportunities.

Sci-PI: Alejandro S. Borlaff (NASA ARC). Admin-PI: Pamela M. Marcum (NASA ARC)

(back to top)

Installation

Managing dependencies

ROSALIA is based on multiple packages, including Astropy, Astroquery, and Romanisim, NumPy, SciPy, and Matplotlib among many others. The easiest way to install all the dependencies is through a package manager like Conda or Mamba. If you have a Conda/Mamba package manager already installed in your system, skip to the following section. If you do not have a package manager, follow the Conda installation instructions at the Space Telescope stenv environment webpage.

Installing ROSALIA

For developers

Create a clean environment for ROSALIA

conda create -n rosalia python=3.12 conda-forge::astromatic-swarp

After the new environment is created, we can activate it.

conda activate rosalia

Once in a clean conda environment, we need to download the ROSALIA package from GitHub.

For general users (not yet available!)

Create a clean environment for ROSALIA

conda create -n rosalia python=3.12 conda-forge::astromatic-swarp

After the new environment is created, we can activate it.

conda activate rosalia

Once in a clean conda environment, we can install ROSALIA. The preferred method to install it is through pip.

pip install rosalia

(back to top)

That is it! We are ready to start analyzing Space Telescope images.

Minimal Use Example

ROSALIA estimates the amount of stray-light from Roman Space Telescope images. To do this, it calculates how many photons reach the focal plane array from secondary optical paths, based on a function called Normalized Detector Irradiance (NDI).

Those photons represent a source of contamination and typically must be modeled and removed before the images are ready for science. ROSALIA calculates the flux of photons for each pixel of the focal plane array. For Roman/WFI, that is a total of 300,811,392 pixels! (18 4088x4088 H4RG-10 detectors).

ROSALIA focuses on modeling three types of backgrounds:

  1. Stray-light from sources outside the field of view (Normalized Detector Irradiance)
  2. Stray-light from sources inside the field of view (Point Spread Function)
  3. Zodiacal light

Out-of-field Stray-light

Open a Python terminal and type:

import rosalia as rs 
from astropy.time import Time

# First define a Roman Space Telescope WFI exposure basic parameters.
ra = 123  # Right ascension at the center of the FOV, in degrees. 
dec = 23  # Declination at the center of the FOV, in degrees.
PA = 45   # Position angle, counter-clockwise from North, in degrees.
date = Time("2024-06-01T00:00:00")  # Date of the observation, in Astropy Time format.
bandpass = "F129"  # A string with the bandpass name for WFI. See https://roman.gsfc.nasa.gov/science/WFI_technical.html
exptime = 600  # Exposure time, in seconds.

rosalia_stray = rs.correct.rosalia_stray(ra=ra, dec=dec, PA=PA, date=date, 
                                         bandpass=bandpass, exptime=exptime, 
                                         radius=1, g_mag_max=15, 
                                         sun_block=False, verbose=False, 
                                         catalog=None)

While Nancy Grace Roman Space Telescope is scheduled to be launched no earlier than September 2026, you can start simulating the observations using romanisim.

Generating Mock Roman/WFI Observations

  1. Install romanisim and generate a Roman/WFI example image. For our experiment -- and to maximize the visualization of stray-light -- we will simulate an exposure nearby the Orion's Belt.
   pip install romanisim
   romanisim-make-image --radec 83.3419927 -1.9665163 RST_WFI_ROSALIA_test_Orion_Belt_SCA{}.asdf --roll -45 --sca -1 --bandpass F158 --level 2 --usecrds

Note: romanisim is a package in active development. Please visit the official webpage for more information on usage.

The result from the previous command will be a series of files (18 in total, one ASDF file per Roman WFI detector, or SCA) in the local directory.

ls -lah

-rw-r--r--   1 user  staff   391M Nov 26 16:02 RST_WFI_ROSALIA_test_Orion_Belt_SCAWFI01.asdf
-rw-r--r--   1 user  staff   391M Nov 26 15:39 RST_WFI_ROSALIA_test_Orion_Belt_SCAWFI02.asdf
-rw-r--r--   1 user  staff   391M Nov 26 15:42 RST_WFI_ROSALIA_test_Orion_Belt_SCAWFI03.asdf
-rw-r--r--   1 user  staff   391M Nov 26 15:46 RST_WFI_ROSALIA_test_Orion_Belt_SCAWFI04.asdf
-rw-r--r--   1 user  staff   391M Nov 26 15:49 RST_WFI_ROSALIA_test_Orion_Belt_SCAWFI05.asdf
-rw-r--r--   1 user  staff   391M Nov 26 15:53 RST_WFI_ROSALIA_test_Orion_Belt_SCAWFI06.asdf
-rw-r--r--   1 user  staff   391M Nov 26 15:56 RST_WFI_ROSALIA_test_Orion_Belt_SCAWFI07.asdf
-rw-r--r--   1 user  staff   391M Nov 26 15:59 RST_WFI_ROSALIA_test_Orion_Belt_SCAWFI08.asdf
-rw-r--r--   1 user  staff   391M Nov 26 16:03 RST_WFI_ROSALIA_test_Orion_Belt_SCAWFI09.asdf
-rw-r--r--   1 user  staff   391M Nov 26 16:06 RST_WFI_ROSALIA_test_Orion_Belt_SCAWFI10.asdf
-rw-r--r--   1 user  staff   391M Nov 26 16:10 RST_WFI_ROSALIA_test_Orion_Belt_SCAWFI11.asdf
-rw-r--r--   1 user  staff   391M Nov 26 16:13 RST_WFI_ROSALIA_test_Orion_Belt_SCAWFI12.asdf
-rw-r--r--   1 user  staff   391M Nov 26 16:22 RST_WFI_ROSALIA_test_Orion_Belt_SCAWFI13.asdf
-rw-r--r--   1 user  staff   391M Nov 27 07:14 RST_WFI_ROSALIA_test_Orion_Belt_SCAWFI14.asdf
-rw-r--r--   1 user  staff   391M Nov 27 08:53 RST_WFI_ROSALIA_test_Orion_Belt_SCAWFI15.asdf
-rw-r--r--   1 user  staff   391M Nov 27 08:56 RST_WFI_ROSALIA_test_Orion_Belt_SCAWFI16.asdf
-rw-r--r--   1 user  staff   391M Nov 27 09:00 RST_WFI_ROSALIA_test_Orion_Belt_SCAWFI17.asdf
-rw-r--r--   1 user  staff   391M Nov 27 09:04 RST_WFI_ROSALIA_test_Orion_Belt_SCAWFI18.asdf

These 18 files represent a single Roman/WFI level 2 (calibrated, non-combined) exposure.

Analyze the stray-light level of the Roman/WFI exposures

  1. Let's analyze the Roman/WFI example image with ROSALIA. The script rosalia-stray will extract all the necessary information from the Roman/WFI exposure file metadata, and generate a series of ASDF and FITS files with the pixel-to-pixel flux level expected for this particular exposure.
   rosalia-sky RST_WFI_ROSALIA_test_Orion_Belt_SCAWFI01.asdf

For more examples, please refer to the Documentation

(back to top)

What is ASDF? Where are the FITS files?

ASDF is the successor of FITS format and has been adopted since JWST . While GUI visualizers like SAODS9 are not yet compatible with ASDF, ROSALIA provides an easy way to extract most useful information from the ASDF files through exposure-inspector:

   exposure-inspector RST_WFI_ROSALIA_test_Orion_Belt_SCAWFI01.asdf

exposure-inspector will print a series of fields containing basic information from the ASDF tree, including the name of the telescope, instrument, detector, and filter, pointing information like right ascension and declination, transmission curve of the filter, and the WCS of the header.

Roadmap

  • Automatic queries of catalogs of bright sources.
    • Gaia, 2MASS, WISE
    • Horizons/JPL Solar System Objects
  • Retrieval of stray-light blocking efficiency from ray-tracing models
  • Ingestion of ASDF Roman/WFI simulated files (i.e., https://romanisim.readthedocs.io/en/latest/)
  • Add diffraction modelling to Roman/WFI.
  • Add thermal emission model (internal stray-light).
  • Complete support for Hubble Space Telescope ACS & WFC3/IR.
  • Automatic identification of SSOs in Roman/WFI observations.

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make ROSALIA better, there are two options.

  1. You can also simply open an issue with the tag "enhancement" (see below).
  2. Fork the repo and create a pull request.
  3. Email the PI's of the project (a.s.borlaff@nasa.gov) with your ideas.

Instructions for fork/pull contributions.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

Top contributors:

License

ROSALIA © 2025 by Alejandro S. Borlaff is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International.

(back to top)

Contact

Alejandro S. Borlaff - @asborlaff - a.s.borlaff@nasa.gov

Project Link: https://github.com/Borlaff/ROSALIA

(back to top)

Acknowledgments

(back to top)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rosalia_wfi-0.9.7.3.tar.gz (3.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rosalia_wfi-0.9.7.3-py3-none-any.whl (3.2 MB view details)

Uploaded Python 3

File details

Details for the file rosalia_wfi-0.9.7.3.tar.gz.

File metadata

  • Download URL: rosalia_wfi-0.9.7.3.tar.gz
  • Upload date:
  • Size: 3.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for rosalia_wfi-0.9.7.3.tar.gz
Algorithm Hash digest
SHA256 f1f38de13bf81e3611519b5d783e937d66c8515f4e3332e23bbcff1c56123b68
MD5 f998c1f88e6db43c5098f2564d60a6da
BLAKE2b-256 aa281b8f69b0916ae457fbbd891faaeb348ffc658bab54487320a75e13f9fe2e

See more details on using hashes here.

File details

Details for the file rosalia_wfi-0.9.7.3-py3-none-any.whl.

File metadata

  • Download URL: rosalia_wfi-0.9.7.3-py3-none-any.whl
  • Upload date:
  • Size: 3.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for rosalia_wfi-0.9.7.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3838792c503009062e905c43f6db7393bdb36543f3f1f64043c11457fca70b9d
MD5 b8ce3a72da847f5bcb20cb180437989c
BLAKE2b-256 25c4c49a40de5e6a666d3bb784c31b128ef96ea6a3820aef28af840f7ed58c1b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page