Skip to content

Switch to use romanisim#100

Open
yuedong0607 wants to merge 11 commits into
mainfrom
switch_to_use_romanisim
Open

Switch to use romanisim#100
yuedong0607 wants to merge 11 commits into
mainfrom
switch_to_use_romanisim

Conversation

@yuedong0607
Copy link
Copy Markdown
Collaborator

@yuedong0607 yuedong0607 commented Apr 28, 2026

This RP migrates the codebase to a new set of APIs in romanisim (here's an introduction of the new API), replacing all usages of galsim.roman. This change enables access to both CRDS and the roman-technical-information repository.

Current status:

  • Replaced all galsim.roman calls with romanisim APIs.
  • Updated the bandpass class to support spatially varying (per-SCA) throughputs, calculated from effective area files retrieved from roman-technical repo.
  • Added configurable options for individual instrumental effects in noise.py

TODO / Open Questions (for this PR):

  • Configuration schema: Finalize the format of configurable options in the YAML config. Some modules can take additional parameters for further configuration (see an example below for the nonlinearity module)

TODO / Open Questions (out of scope for this PR):

  • WCS: Currently still using the same implementation inherited from galsim.roman. Need to consider switching to use the romanisim.wcs APIs which is based on gwcs and leverages the CRDS distortion models.
  • PSF: Currently still using the same implementation inherited from galsim.roman. Need to consider switching to use the romanisim.psf APIs which supports both empirical PSF samples from CRDS, and STPSF models. However, both the empirical PSF and STPSF in romanisim.psf only support achromatic modeling at this moment.
from romanisim.models import Nonlinearity
nl = Nonlinearity(
        usecrds=True,
        reftype="inverselinearity",
        getdq=True,
        integralnonlinearity=None,
        metadata=None,
        image_mod=None,
        reffiles=None,
        saturation=None,
        Coeffs=None,
        gain=None,
)
nl.apply(img, electrons=False)
integralnonlinearity : object or None, optional
        Optional integral nonlinearity reference model. If provided, the class
        constructs channel-based lookup corrections that are added after the
        polynomial correction.

@yuedong0607 yuedong0607 force-pushed the switch_to_use_romanisim branch 2 times, most recently from 93c4cf2 to ac91f55 Compare April 30, 2026 21:46
@yuedong0607
Copy link
Copy Markdown
Collaborator Author

romanisim.models has not yet been included in the current release (v0.13.1) of romanisim. The merge needs to wait until the next release version.

@yuedong0607
Copy link
Copy Markdown
Collaborator Author

I updated the romanisim dependency in pyproject.toml to point to the main branch, and all unit tests are now passing. I think the code is ready for review now. @arunkannawadi

@yuedong0607 yuedong0607 force-pushed the switch_to_use_romanisim branch from 88819ea to 414da08 Compare May 28, 2026 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant