@@ -1281,13 +1281,13 @@ def integrate_intensity_complex_medium(dscat, thetas, kd,
12811281
12821282 Parameters
12831283 ----------
1284- dscat : array-like with shape (2, num_values , num_thetas, [num_phis])
1284+ dscat : array-like with shape (2, ... , num_thetas, [num_phis])
12851285 differential scattered intensities for both polarizations. Can be
12861286 functions of theta or of theta and phi. If a function of theta and phi,
12871287 the theta dimension MUST come first
1288- thetas : array-like, shape num_thetas
1288+ thetas : array-like, shape ([angle_leading_dims], num_thetas)
12891289 scattering angles
1290- kd : array-like, shape num_values
1290+ kd : array-like, shape (...)
12911291 wavevector in medium times distance (from the center of the particle)
12921292 at which to integrate intensity
12931293 phi_min : float
@@ -1296,21 +1296,17 @@ def integrate_intensity_complex_medium(dscat, thetas, kd,
12961296 phi_max : float
12971297 maximum azimuthal angle, default set to 2*pi. Used only if phis is None
12981298 (coordinate system is scattering plane)
1299- phis : None or ndarray ( shape num_phis)
1299+ phis : None or ndarray, shape ([angle_leading_dims], num_phis)
13001300 azimuthal angles
13011301
13021302 Returns
13031303 -------
1304- sigma: array-like with shape num_values
1304+ sigma: array-like with shape (...)
13051305 integrated cross section
1306- sigma_1: array-like with shape num_values
1306+ sigma_1: array-like with shape (...)
13071307 integrated cross section for first component of basis
1308- sigma_2: array-like with shape num_values
1308+ sigma_2: array-like with shape (...)
13091309 integrated cross section for second component of basis
1310- dsigma_1: array-like, shape num_values, num_angles
1311- differential cross section for first component of basis
1312- dsigma_2: array-like, shape num_values, num_angles
1313- differential cross section for second component of basis
13141310
13151311 Notes
13161312 -----
@@ -1369,7 +1365,6 @@ def integrate_intensity_complex_medium(dscat, thetas, kd,
13691365
13701366 # kd has trailing axes for theta (and possibly phi) that are no longer
13711367 # needed after the integration. We remove them here
1372- kd_shape = kd .shape
13731368 kd = np .atleast_1d (kd .squeeze ())
13741369
13751370 # multiply by factor that accounts for attenuation in the incident light
@@ -1388,9 +1383,7 @@ def integrate_intensity_complex_medium(dscat, thetas, kd,
13881383 # calculate the averaged sigma
13891384 sigma = (sigma_1 + sigma_2 )/ 2 * factor
13901385
1391- return (sigma , (sigma_1 * factor ),
1392- (sigma_2 * factor ), (dsigma_1 * factor .reshape (kd_shape )/ 2 ),
1393- (dsigma_2 * factor .reshape (kd_shape )/ 2 ))
1386+ return (sigma , (sigma_1 * factor ), (sigma_2 * factor ))
13941387
13951388
13961389def diff_abs_intensity_complex_medium (m , x , thetas , ktd ):
0 commit comments