@@ -56,53 +56,53 @@ def simulate_roman_image(
5656
5757 :param lens_class: class object containing all information of the lensing system
5858 (e.g., Lens())
59- :param band: imaging band
60- :type band: string
61- :param num_pix: number of pixels per axis
62- :type num_pix: integer
59+ :param band: imaging band.
60+ :type band: str
61+ :param num_pix: number of pixels per axis.
62+ :type num_pix: int
6363 :param add_noise: determines whether sky background and detector effects are added or not.
6464 See https://galsim-developers.github.io/GalSim/_build/html/roman.html#galsim.roman.allDetectorEffects
6565 for specific details about the detector effects.
6666 :type add_noise: bool
67- :param subtract_mean_background: whether to subtract the mean count of photons on the background (not the noise)
67+ :param subtract_mean_background: whether to subtract the mean count of photons on the background (not the noise).
6868 :type subtract_mean_background: bool
69- :param with_source: determines whether source is included in image
69+ :param with_source: determines whether source is included in image.
7070 :type with_source: bool
71- :param with_deflector: determines whether deflector is included in image
71+ :param with_deflector: determines whether deflector is included in image.
7272 :type with_deflector: bool
7373 :param exposure_time: exposure time of image. If None, a default exposure time will be retrieved from
7474 lenstronomy's SimulationAPI.ObservationConfig based on the Roman survey mode.
75- :type exposure_time: int or None
75+ :type exposure_time: int, optional
7676 :param num_exposures: number of exposures. If None, a default number will be retrieved from
7777 lenstronomy's SimulationAPI.ObservationConfig based on the Roman survey mode.
78- :type num_exposures: int or None
78+ :type num_exposures: int, optional
7979 :param t_obs: an observation time in units of days. This is applicable only for
8080 variable source. In case of point source, if we do not provide
8181 t_obs, considers no variability in the lens.
82- :param survey_mode: survey mode of the Roman detector
83- :type survey_mode: string, can be "wide_area" or "time_domain"
84- :param detector: The specific WFI detector being used to generate the psf. If None, one will be selected at random
85- :type detector: integer from 1 to 18 or None
86- :param detector_pos: The pixel on the detector being used to generate the psf. If None, a coordinate will be selected at random.
87- :type detector_pos: 2-tuple of integers between 4 + num_pix * oversample and 4092 - num_pix * oversample or None
88- :param seed: An rng seed used for generating detector effects in galsim
89- :type seed: integer or None
82+ :param survey_mode: survey mode of the Roman detector. Can be "wide_area" or "time_domain".
83+ :type survey_mode: str
84+ :param detector: The specific WFI detector being used to generate the psf (from 1 to 18).
85+ If None, one will be selected at random.
86+ :type detector: int, optional
87+ :param detector_pos: The pixel on the detector being used to generate the psf.
88+ Must be a 2-tuple of integers between 4 + num_pix * oversample and 4092 - num_pix * oversample.
89+ :type detector_pos: tuple, optional
90+ :param seed: An rng seed used for generating detector effects in galsim.
91+ :type seed: int, optional
9092 :param ra: Coordinate in space used to generate sky background. For possible coordinates, see
9193 https://roman-docs.stsci.edu/files/215024143/215024145/2/1768495040130/outlines.png
92- :type ra: float or None
94+ :type ra: float, optional
9395 :param dec: Coordinate in space used to generate sky background. For possible coordinates, see
9496 https://roman-docs.stsci.edu/files/215024143/215024145/2/1768495040130/outlines.png
95- :type dec: float or None
97+ :type dec: float, optional
9698 :param date: Date used to generate sky background. The date must be consistent with the ra and dec coordinates.
97- :type date: datetime.datetime class
99+ :type date: datetime.datetime
98100 :param psf_directory: Path to directory containing psf file(s) where the psf can be loaded.
99101 Otherwise, the psf will be generated by stpsf on the fly, which is very slow.
100- The name of the psf file inside the directory follows the following convention:
101- psf_file_name = f"{band}_{detector}_{detector_pos[0]}_{detector_pos[1]}_{oversample}.pkl"
102- For example, psf_file_name = "F106_SCA03_1934_1293_5.pkl"
103- :type psf_directory: string
104- :return: simulated image in units of flux per second
105- :rtype: 2d numpy array
102+ See the note in the ``get_psf`` method's docstring for details on the PSF file naming convention.
103+ :type psf_directory: str
104+ :return: simulated image in units of flux per second.
105+ :rtype: numpy.ndarray
106106 """
107107
108108 if detector is None :
@@ -239,22 +239,31 @@ def get_psf(band, detector, detector_pos, oversample, psf_directory):
239239 """Obtain galsim psf corresponding to specific WFI detector, position,
240240 band, and supersampling factor, using stpsf.
241241
242- :param band: The specific band corresponding to the psf
243- :type band: string
244- :param detector: The specific Roman detector being used to generate the psf
245- :type detector: integer from 1 to 18
246- :param detector_pos: The position of the detector being used to generate the psf
247- :type detector_pos: integer between 4 + num_pix * oversample and 4092 - num_pix * oversample
248- :param oversample: Number of times that each pixel's side is subdivided for higher accuracy psf convolution
249- :type oversample: integer
242+ :param band: The specific band corresponding to the psf.
243+ :type band: str
244+ :param detector: The specific Roman detector being used to generate the psf (from 1 to 18).
245+ :type detector: int
246+ :param detector_pos: The position of the detector being used to generate the psf.
247+ Must be between 4 + num_pix * oversample and 4092 - num_pix * oversample.
248+ :type detector_pos: int
249+ :param oversample: Number of times that each pixel's side is subdivided for higher
250+ accuracy psf convolution.
251+ :type oversample: int
250252 :param psf_directory: Path to directory containing psf file(s) where the psf can be loaded.
251253 Otherwise, the psf will be generated by stpsf on the fly, which is very slow.
252- The name of the psf file inside the directory follows the following convention:
254+ :type psf_directory: str
255+ :return: An image of the psf generated by stpsf.
256+ :rtype: galsim.InterpolatedImage
257+
258+ **Notes on psf naming convention:**
259+
260+ The name of the psf file inside the directory follows this convention::
261+
253262 psf_file_name = f"{band}_{detector}_{detector_pos[0]}_{detector_pos[1]}_{oversample}.pkl"
254- For example, psf_file_name = "F106_SCA03_1934_1293_5.pkl"
255- :type psf_directory: string
256- :return: An image of the psf generated by stpsf
257- :rtype: galsim's InterpolatedImage class
263+
264+ For example::
265+
266+ psf_file_name = "F106_SCA03_1934_1293_5.pkl"
258267 """
259268 detector = f"SCA{ str (detector ).zfill (2 )} "
260269 # Since generating the stpsf is very slow, it can alternatively be loaded from a pickle file
0 commit comments