Skip to content

Commit ff277e7

Browse files
authored
Refine docstrings for diffraction functions
1 parent 0c9ef59 commit ff277e7

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

‎physics/diffraction.py‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ def check_min_intensity(
55
slit_width: float = 1.0, diff_angle: float = 0.0, wavelength: float = 100.0
66
) -> bool:
77
"""
8-
Checks for the condition of minimum intensity in a diffraction pattern.
8+
Checks whether the intensity is at a minimum in a diffraction pattern.
99
1010
Args:
11-
slit_width (float): The width of the slit in millimeters.
12-
diff_angle (float): The diffraction angle in radians.
13-
wavelength (float): The wavelength of light in nanometers.
11+
slit_width: The width of the slit in millimeters.
12+
diff_angle: The diffraction angle in radians.
13+
wavelength: The wavelength of light in nanometers.
1414
1515
Returns:
16-
True if minimum intensity is met, otherwise False.
16+
True if minimum intensity is met; otherwise, False.
1717
1818
>>> check_min_intensity(4, 0.25, 300)
1919
False
@@ -30,15 +30,15 @@ def check_max_intensity(
3030
slit_width: float = 1.0, diff_angle: float = 0.0, wavelength: float = 100.0
3131
) -> bool:
3232
"""
33-
Checks for the condition of maximum intensity in a diffraction pattern.
33+
Checks whether the intensity is at a maximum in a diffraction pattern.
3434
3535
Args:
3636
slit_width: The width of the slit in millimeters.
3737
diff_angle: The diffraction angle in radians.
3838
wavelength: The wavelength of light in nanometers.
3939
4040
Returns:
41-
True if maximum intensity is met, otherwise False.
41+
True if maximum intensity is met; otherwise, False.
4242
4343
>>> check_max_intensity(1, 0.001, 100)
4444
False
@@ -54,7 +54,7 @@ def intensity_single_slit(
5454
slit_width: float = 1.0, diff_angle: float = 0.0, wavelength: float = 100.0
5555
) -> float:
5656
"""
57-
Computes the intensity for a single slit diffraction pattern.
57+
Computes the intensity for a single-slit diffraction pattern.
5858
5959
Args:
6060
slit_width: The width of the slit in millimeters.
@@ -73,7 +73,7 @@ def intensity_single_slit(
7373

7474
def intensity_double_slit(path_diff: float = 0, intensity_max: float = 1.0) -> float:
7575
"""
76-
Computes the intensity for a double slit diffraction pattern.
76+
Computes the intensity for a double-slit diffraction pattern.
7777
7878
Args:
7979
path_diff: The path difference in the two waves.

0 commit comments

Comments
 (0)