Skip to content

Commit

Permalink
Minor stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
teutoburg committed May 22, 2024
1 parent 6082bba commit cd7cf71
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions scopesim/effects/electronic.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def estimate_dit_ndit(
)

dit_nosat = fill_frac * full_well / image_plane_max
logger.debug("Required DIT without saturation: %.3f s", dit_nosat)
logger.info("Required DIT without saturation: %.3f s", dit_nosat)

# np.ceil so that dit is at most what is required for fill_frac
ndit = np.ceil(exptime / dit_nosat).astype(int)
Expand All @@ -257,17 +257,17 @@ def apply_to(self, obj, **kwargs):
if not isinstance(obj, (ImagePlaneBase, DetectorBase)):
return obj

exptime = kwargs.get("exptime",
exptime = kwargs.pop("exptime",
from_currsys("!OBS.exptime", self.cmds))
mindit = from_currsys(self.meta["mindit"], self.cmds)

# TODO: Remove this silly try-except once currsys works properly...
try:
dit = from_currsys("!OBS.dit", self.cmds)
dit = kwargs.pop("dit", from_currsys("!OBS.dit", self.cmds))
except (KeyError, ValueError):
dit = None
try:
ndit = from_currsys("!OBS.ndit", self.cmds)
ndit = kwargs.pop("ndit", from_currsys("!OBS.ndit", self.cmds))
except (KeyError, ValueError):
ndit = None

Expand Down
2 changes: 1 addition & 1 deletion scopesim/rc.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
"""Global configurations for ScopeSim."""
"""Global configurations for ScopeSim (rc ... runtime configuration)."""

from pathlib import Path
import yaml
Expand Down

0 comments on commit cd7cf71

Please sign in to comment.