From 80190685b95c41199e12f847bd1f463f159fa483 Mon Sep 17 00:00:00 2001 From: Bryan Hilbert Date: Wed, 29 Jan 2020 13:26:36 -0500 Subject: [PATCH 1/2] Add missing import statement --- examples/NIRCam_TSO_examples.ipynb | 5 ++--- mirage/grism_tso_simulator.py | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/examples/NIRCam_TSO_examples.ipynb b/examples/NIRCam_TSO_examples.ipynb index 44f690c41..bd15c2036 100644 --- a/examples/NIRCam_TSO_examples.ipynb +++ b/examples/NIRCam_TSO_examples.ipynb @@ -1228,12 +1228,11 @@ " \"\"\"\n", " num_integrations = array.shape[0]\n", " num_grps = array.shape[1]\n", - " colors = cmx.rainbow(np.linspace(0, 1, num_integrations))\n", + " clrs = cmx.rainbow(np.linspace(0, 1, num_integrations))\n", " f, a = plt.subplots()\n", " f.set_size_inches(11.5,9)\n", - " for integration, color in zip(range(num_integrations), colors): \n", + " for integration, color in zip(range(num_integrations), clrs): \n", " slopes = array[integration, num_grps - 1, yval, xstart:] \n", - " colorVal = scalarMap.to_rgba(integration)\n", " a.plot(np.arange(len(slopes)), slopes, color=color)\n", " a.set_xlabel('Column Number')\n", " a.set_ylabel('Signal (DN)')" diff --git a/mirage/grism_tso_simulator.py b/mirage/grism_tso_simulator.py index 3046dc42b..551f0fe4c 100644 --- a/mirage/grism_tso_simulator.py +++ b/mirage/grism_tso_simulator.py @@ -67,7 +67,7 @@ from mirage.ramp_generator import obs_generator from mirage.reference_files import crds_tools from mirage.utils import read_fits -from mirage.utils.constants import CATALOG_YAML_ENTRIES +from mirage.utils.constants import CATALOG_YAML_ENTRIES, MEAN_GAIN_VALUES from mirage.utils.file_splitting import find_file_splits, SplitFileMetaData from mirage.utils import utils, file_io, backgrounds from mirage.yaml import yaml_update From 3afdc12e499321c754d1013d3c4d00adf06bbd35 Mon Sep 17 00:00:00 2001 From: Bryan Hilbert Date: Wed, 29 Jan 2020 15:14:36 -0500 Subject: [PATCH 2/2] Missing self in front of add_segmentation_map --- mirage/seed_image/catalog_seed_image.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mirage/seed_image/catalog_seed_image.py b/mirage/seed_image/catalog_seed_image.py index fecdb3cc6..56be01913 100755 --- a/mirage/seed_image/catalog_seed_image.py +++ b/mirage/seed_image/catalog_seed_image.py @@ -2002,7 +2002,7 @@ def create_sidereal_image(self): print("Extended object image and segmap saved as {}".format(self.extended_seed_filename)) # Add galaxy segmentation map to the master copy - segmentation_map = add_segmentation_maps(segmentation_map, ext_segmap) + segmentation_map = self.add_segmentation_maps(segmentation_map, ext_segmap) # add the extended image to the synthetic signal rate image signalimage = signalimage + extimage