Skip to content

Commit 092aceb

Browse files
yuedong0607schlaflypre-commit-ci[bot]
authored
remove parameters.py under romanisim folder (#356)
* add romanisim.models * in romanisim.models.wcs: change wcs.numerical_inverse() to wcs.invert() * update import models.wcs, models.parameters * modify romanisim.models APIs, now they also takes image_mod, reffiles as valid inputs * modify texts in example_APIs notebook * fix a wcs call error in image.py * mv bandpass name conversions into models.bandpass. Fix a duplicated file read in models.bandpass * fix a coner case in models.nonlinearity * update models.bandpass to stick to SOC filter naming convention. Pass test_image, test_l1 unit tests * update example API notebook * add galsim_filter_name boolean option to read_gsfc_effarea in models.bandpass to make it also compatible with SOC naming convention. * remove all galsim.roman dependence, replace the calls of romanisim.(parameters, wcs, psf, bandpass) with romanisim.models.(parameters, wcs, psf, bandpass) * fix a bug in models.wcs * update integral nonlinearity correction to the current implementation in romanisim * for reading files in the roman-tech-info, change: RuntimeError to Exception. Add this try except block to models.bandpass * update example notebook * fix a bug in read_gsfc_effarea, remove unused import of asdf astropy.unit etc. * Squashed 'romanisim/data/roman-technical-information/' content from commit 229bd3c git-subtree-dir: romanisim/data/roman-technical-information git-subtree-split: 229bd3ccc23e1a37fba76b62ed537a24d31f2e13 * add roman-technical-information repo as a subtree in romanisim.data, fix galsim.roman calls in docstring examples * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * ignore pre-commit check for roman-technical-information subtree * fixed a typo in read_noise.py * removed redundant fermi parameters * default values for gain, dark_current, and read_noise are now retrieved from models.parameters, and can be updated via passing a metadata dict to the constructor * moved romanisim.models.psf to romanisim.psf, modified the corresponding imports * add __all__ to romanisim.psf * import romanisim in bandpass docstring * add a helper function to get the reference files (from local or crds) * deprecated the contents in romanisim.wcs and romanisim.bandpass; corrct for an typo in the docstring in romanisim.models.bandpass * update models.nonlinearity so it takes a integralnonlinearity datamodel as an input. Correspondingly updated the implementations in tests (test_l1 and test_linear). * Added deprecation warnings in romanisim.nonlinearity. Also introduced backward compatibility in romanisim.models.nonlinearity for the functions repair_coefficients and evaluate_nl_polynomial. Note that romanisim.nonlinearity.NL is deprecated and is replaced by romanisim.models.nonlinearity.Nonlinearity. * added a README.md for romanisim.data; changed the logic of accessing the default per SCA throughputs (now the defaults point to roman-tech-info local copy) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * removed the unused throughput files in romanisim.data * expose psf_utils and wcs_utils in romanisim.models.__init__ * fix a typo in nonlinearity, add reciprocity failure method in nonlinearity * update bandpass to allow for getting a subset of Roman bandpasses * add a getBandpass function (for getting a single band) to models.bandpass * add relevant galsim.roman unittests * fixed bugs in image.py and docstring * fix style failures * update docstrings for model classes * remove romanisim/models/example_APIs.ipynb * patch: remove parameters.py from romanisim folder * remove romanisim.parameters in docstrings etc. * fix a typo in index.rst --------- Co-authored-by: Eddie Schlafly <eschlafly@stsci.edu> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent d69c51c commit 092aceb

5 files changed

Lines changed: 5 additions & 322 deletions

File tree

docs/romanisim/parameters.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ These values can be overridden by specifying a yaml config file on the
2121
command line to romanisim-make-image.
2222

2323
See the `code
24-
<https://github.com/spacetelescope/romanisim/blob/main/romanisim/parameters.py>`_
24+
<https://github.com/spacetelescope/romanisim/blob/main/romanisim/models/parameters.py>`_
2525
for the default values of these quantities.
2626

27-
.. automodapi:: romanisim.parameters
27+
.. automodapi:: romanisim.models.parameters
2828

romanisim/image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1176,7 +1176,7 @@ def inject_sources_into_l2(model, cat, x=None, y=None, psf=None, seed=50,
11761176
11771177
The simulation proceeds by (optionally) using the model WCS to generate the
11781178
x & y locations, grabbing the gain from
1179-
romanisim.parameters.reference_data, and grabbing the read_pattern from the
1179+
romanisim.models.parameters.reference_data, and grabbing the read_pattern from the
11801180
model_metadata. The number of additional counts in each pixel are
11811181
simulated. We create a "virtual" ramp that uses the input L2 image and
11821182
evenly apportions the measured DN/s along the ramp using the MA table. We

romanisim/models/bandpass.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ def get_abflux(bandpass, sca):
617617
def etomjysr(bandpass, sca):
618618
"""Compute factor converting e/s/pix to MJy/sr.
619619
620-
Assumes a pixel scale of 0.11" (romanisim.parameters.pixel_scale)
620+
Assumes a pixel scale of 0.11" (romanisim.models.parameters.pixel_scale)
621621
622622
Parameters
623623
----------

romanisim/parameters.py

Lines changed: 0 additions & 317 deletions
This file was deleted.

romanisim/tests/test_linear.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import crds
1111

1212
import roman_datamodels
13-
from romanisim import parameters
13+
from romanisim.models import parameters
1414
from romanisim import log
1515
from romanisim.models import nonlinearity
1616

0 commit comments

Comments
 (0)