diff --git a/EXOSIMS/Prototypes/OpticalSystem.py b/EXOSIMS/Prototypes/OpticalSystem.py index cd2d953e..78658367 100644 --- a/EXOSIMS/Prototypes/OpticalSystem.py +++ b/EXOSIMS/Prototypes/OpticalSystem.py @@ -1081,7 +1081,8 @@ def populate_observingModes_extra(self): def genObsModeHex(self): """Generate a unique hash for every observing mode to be used in downstream - identification and caching. + identification and caching. Also adds an integer index to the mode corresponding + to its order in the observingModes list. The hash will be based on the _outspec entries for the obsmode, its science instrument and its starlight suppression system. @@ -1106,6 +1107,7 @@ def genObsModeHex(self): ) mode["hex"] = genHexStr(modestr) + mode["index"] = nmode def get_core_mean_intensity( self, @@ -1887,7 +1889,7 @@ def Cp_Cb_Csp_helper(self, TL, sInds, fZ, fEZ, dMag, WA, mode): lam, WA, TL.diameter[sInds] ) # also, if we're here, we must have a platescale defined - core_platescale = syst["core_platescale"] + core_platescale = syst["core_platescale"].copy() # furthermore, if we're a coronagraph, we have to scale by wavelength if not (syst["occulter"]) and (syst["lam"] != mode["lam"]): core_platescale *= mode["lam"] / syst["lam"] diff --git a/EXOSIMS/Prototypes/SimulatedUniverse.py b/EXOSIMS/Prototypes/SimulatedUniverse.py index cb08631d..68c5dd30 100644 --- a/EXOSIMS/Prototypes/SimulatedUniverse.py +++ b/EXOSIMS/Prototypes/SimulatedUniverse.py @@ -30,8 +30,8 @@ class SimulatedUniverse(object): Planet inclinations are sampled as normally distributed about a common system plane. Defaults to False commonSystemPlaneParams (list(float)): - [inclination mean, inclination standard deviation, Omega mean, - Omega standard deviation] defining the normal distribution of + [inclination mean, inclination standard deviation, Omega mean, Omega + standard deviation] defining the normal distribution of inclinations and longitudes of the ascending node about a common system plane in units of degrees. Ignored if commonSystemPlane is False. Defaults to [0 2.25, 0, 2.25], where the standard deviation @@ -40,7 +40,6 @@ class SimulatedUniverse(object): **specs: :ref:`sec:inputspec` - Attributes: _outspec (dict): :ref:`sec:outspec` diff --git a/EXOSIMS/Prototypes/SurveySimulation.py b/EXOSIMS/Prototypes/SurveySimulation.py index 2bedd437..275df1d2 100644 --- a/EXOSIMS/Prototypes/SurveySimulation.py +++ b/EXOSIMS/Prototypes/SurveySimulation.py @@ -1907,7 +1907,7 @@ def observation_detection(self, sInd, intTime, mode): smin = np.minimum(smin, sminFA) if smin is not None else sminFA log_FA = " - False Alarm (WA=%s, dMag=%s)" % ( np.round(WA, 3), - round(dMag, 1), + np.round(dMag, 1), ) self.logger.info(log_FA) self.vprint(log_FA) diff --git a/documentation/arglist.rst b/documentation/arglist.rst index 76294873..4a742129 100644 --- a/documentation/arglist.rst +++ b/documentation/arglist.rst @@ -66,6 +66,8 @@ The table below includes a list of all Prototype module inputs. - :py:class:`~EXOSIMS.Prototypes.OpticalSystem.OpticalSystem` * - ``csv_angsep_colname`` - :py:class:`~EXOSIMS.Prototypes.OpticalSystem.OpticalSystem` + * - ``debug_plot_path`` + - :py:class:`~EXOSIMS.Prototypes.SurveySimulation.SurveySimulation` * - ``defaultAddExoplanetObsTime`` - :py:class:`~EXOSIMS.Prototypes.SurveySimulation.SurveySimulation` * - ``defburnPortion`` @@ -154,6 +156,8 @@ The table below includes a list of all Prototype module inputs. - :py:class:`~EXOSIMS.Prototypes.ZodiacalLight.ZodiacalLight` * - ``magZ`` - :py:class:`~EXOSIMS.Prototypes.ZodiacalLight.ZodiacalLight` + * - ``make_debug_bird_plots`` + - :py:class:`~EXOSIMS.Prototypes.SurveySimulation.SurveySimulation` * - ``maxdVpct`` - :py:class:`~EXOSIMS.Prototypes.Observatory.Observatory` * - ``MDP`` diff --git a/documentation/opticalsystem.rst b/documentation/opticalsystem.rst index e4b5ce92..9452e078 100644 --- a/documentation/opticalsystem.rst +++ b/documentation/opticalsystem.rst @@ -297,6 +297,10 @@ If any bandpass values are not set in the ``observingMode`` inputs, they will be Upon instantiation, each ``ObservingMode`` will define its bandpass (stored in attribute ``bandpass``) as a :py:class:`~synphot.spectrum.SpectralElement` object. The model used will be either a :py:class:`~EXOSIMS.util.photometricModels.Box1D` (default) or :py:class:`~synphot.models.Gaussian1D`, toggled by attribute ``bandpass_model``. For a :py:class:`~EXOSIMS.util.photometricModels.Box1D` model, a step size can also be specified via attribute ``bandpass_step`` (default is 1 :math:`\mathring{A}`). +Observing Mode Identification +""""""""""""""""""""""""""""""""" +Each observing mode dictionary includes two keys that can be used to identify the mode in any downstream bookkeeping tasks. These are ``hex`` and ``index``. The ``hex`` key contains the MD5 hash of the entire contents of the inputs to the mode's instrument, starlight suppression system, and the mode itself. The hash is run over all of the keys in each dictionary, sorted by key in alphabetical order, and represents a fully unique identifier of everything related to the observing mode. The ``index`` key is the integer value of the index of the mode dictionary in the full list of observing modes. That is, it is a value between 0 and the number of observing modes minus 1. It represents the index of the observing mode in the :py:attr:`~EXOSIMS.Prototypes.OpticalSystem.OpticalSystem.observingModes` attribute of the optical system. As the ordering of the observing mode list is dependent on the order of the modes in the JSON script input, this index cannot be treated as a unique identifier, even in the case where two JSON scripts include exactly the same set of observing modes. However, within the context of a single simulation (or simulation ensemble) this index can be safely used to uniquely identify an observing mode. + Initialization ^^^^^^^^^^^^^^^^^^^^^^