@@ -70,8 +70,8 @@ class Observer {
7070 * @return Array of specific flux values at each observation time
7171 * <!-- ************************************************************************************** -->
7272 */
73- template <typename ... PhotonGrid>
74- Array specific_flux (Array const & t_obs, Real nu_obs, PhotonGrid&... photons);
73+ template <typename PhotonGrid>
74+ Array specific_flux (Array const & t_obs, Real nu_obs, PhotonGrid& photons);
7575
7676 /* *
7777 * <!-- ************************************************************************************** -->
@@ -86,8 +86,8 @@ class Observer {
8686 * relativistic beaming and cosmological effects.
8787 * <!-- ************************************************************************************** -->
8888 */
89- template <typename ... PhotonGrid>
90- MeshGrid specific_flux (Array const & t_obs, Array const & nu_obs, PhotonGrid&... photons);
89+ template <typename PhotonGrid>
90+ MeshGrid specific_flux (Array const & t_obs, Array const & nu_obs, PhotonGrid& photons);
9191
9292 /* *
9393 * <!-- ************************************************************************************** -->
@@ -99,8 +99,8 @@ class Observer {
9999 * @return Array of specific flux values at each observation time for a single observed frequency
100100 * <!-- ************************************************************************************** -->
101101 */
102- template <typename ... PhotonGrid>
103- Array specific_flux_series (Array const & t_obs, Array const & nu_obs, PhotonGrid&... photons);
102+ template <typename PhotonGrid>
103+ Array specific_flux_series (Array const & t_obs, Array const & nu_obs, PhotonGrid& photons);
104104
105105 /* *
106106 * <!-- ************************************************************************************** -->
@@ -115,8 +115,8 @@ class Observer {
115115 * @return Array of integrated flux values at each observation time
116116 * <!-- ************************************************************************************** -->
117117 */
118- template <typename ... PhotonGrid>
119- Array flux (Array const & t_obs, Array const & band_freq, PhotonGrid&... photons);
118+ template <typename PhotonGrid>
119+ Array flux (Array const & t_obs, Array const & band_freq, PhotonGrid& photons);
120120
121121 /* *
122122 * <!-- ************************************************************************************** -->
@@ -130,8 +130,8 @@ class Observer {
130130 * @return 2D grid of spectra (frequency × time)
131131 * <!-- ************************************************************************************** -->
132132 */
133- template <typename ... PhotonGrid>
134- MeshGrid spectra (Array const & freqs, Array const & t_obs, PhotonGrid&... photons);
133+ template <typename PhotonGrid>
134+ MeshGrid spectra (Array const & freqs, Array const & t_obs, PhotonGrid& photons);
135135
136136 /* *
137137 * <!-- ************************************************************************************** -->
@@ -145,8 +145,8 @@ class Observer {
145145 * @return Array containing the spectrum at the given time
146146 * <!-- ************************************************************************************** -->
147147 */
148- template <typename ... PhotonGrid>
149- Array spectrum (Array const & freqs, Real t_obs, PhotonGrid&... photons);
148+ template <typename PhotonGrid>
149+ Array spectrum (Array const & freqs, Real t_obs, PhotonGrid& photons);
150150
151151 /* *
152152 * <!-- ************************************************************************************** -->
@@ -253,9 +253,8 @@ class Observer {
253253 * @return True if both lower and upper boundaries are valid for interpolation, false otherwise
254254 * <!-- ************************************************************************************** -->
255255 */
256- template <typename ... PhotonGrid>
257- bool set_boundaries (InterpState& state, size_t i, size_t j, size_t k, Real log2_nu,
258- PhotonGrid&... photons) noexcept ;
256+ template <typename PhotonGrid>
257+ bool set_boundaries (InterpState& state, size_t i, size_t j, size_t k, Real log2_nu, PhotonGrid& photons) noexcept ;
259258};
260259
261260// ========================================================================================================
@@ -277,9 +276,9 @@ inline void iterate_to(Real value, Array const& arr, size_t& it) noexcept {
277276 }
278277}
279278
280- template <typename ... PhotonGrid>
279+ template <typename PhotonGrid>
281280bool Observer::set_boundaries (InterpState& state, size_t i, size_t j, size_t k, Real lg2_nu_obs,
282- PhotonGrid&... photons) noexcept {
281+ PhotonGrid& photons) noexcept {
283282 if (state.last_hi == k + 1 && state.last_lg2_nu == lg2_nu_obs) {
284283 if (!std::isfinite (state.slope )) {
285284 return false ;
@@ -298,12 +297,12 @@ bool Observer::set_boundaries(InterpState& state, size_t i, size_t j, size_t k,
298297 state.lg2_I_nu_lo = state.lg2_I_nu_hi ;
299298 } else {
300299 Real lg2_nu_lo = lg2_one_plus_z + lg2_nu_obs - lg2_doppler (i, j, k);
301- state.lg2_I_nu_lo = 3 * lg2_doppler (i, j, k) + ( photons (eff_i, j, k). compute_log2_I_nu (lg2_nu_lo) + ...) +
302- lg2_emission_area (i, j, k);
300+ state.lg2_I_nu_lo =
301+ 3 * lg2_doppler (i, j, k) + photons (eff_i, j, k). compute_log2_I_nu (lg2_nu_lo) + lg2_emission_area (i, j, k);
303302 }
304303
305304 Real lg2_nu_hi = lg2_one_plus_z + lg2_nu_obs - lg2_doppler (i, j, k + 1 );
306- state.lg2_I_nu_hi = 3 * lg2_doppler (i, j, k + 1 ) + ( photons (eff_i, j, k + 1 ).compute_log2_I_nu (lg2_nu_hi) + ... ) +
305+ state.lg2_I_nu_hi = 3 * lg2_doppler (i, j, k + 1 ) + photons (eff_i, j, k + 1 ).compute_log2_I_nu (lg2_nu_hi) +
307306 lg2_emission_area (i, j, k + 1 );
308307
309308 state.slope = (state.lg2_I_nu_hi - state.lg2_I_nu_lo ) / lg2_t_ratio;
@@ -317,8 +316,8 @@ bool Observer::set_boundaries(InterpState& state, size_t i, size_t j, size_t k,
317316 return true ;
318317}
319318
320- template <typename ... PhotonGrid>
321- MeshGrid Observer::specific_flux (Array const & t_obs, Array const & nu_obs, PhotonGrid&... photons) {
319+ template <typename PhotonGrid>
320+ MeshGrid Observer::specific_flux (Array const & t_obs, Array const & nu_obs, PhotonGrid& photons) {
322321 size_t t_obs_len = t_obs.size ();
323322 size_t nu_len = nu_obs.size ();
324323
@@ -341,7 +340,7 @@ MeshGrid Observer::specific_flux(Array const& t_obs, Array const& nu_obs, Photon
341340 if (lg2_t_hi < lg2_t_obs (t_idx)) {
342341 continue ;
343342 } else {
344- if (set_boundaries (state, i, j, k, lg2_nu[l], photons... )) {
343+ if (set_boundaries (state, i, j, k, lg2_nu[l], photons)) {
345344 for (; t_idx < t_obs_len && lg2_t_obs (t_idx) <= lg2_t_hi; t_idx++) {
346345 F_nu (l, t_idx) += interpolate (state, i, j, k, lg2_t_obs (t_idx));
347346 }
@@ -361,8 +360,8 @@ MeshGrid Observer::specific_flux(Array const& t_obs, Array const& nu_obs, Photon
361360 return F_nu;
362361}
363362
364- template <typename ... PhotonGrid>
365- Array Observer::specific_flux_series (Array const & t_obs, Array const & nu_obs, PhotonGrid&... photons) {
363+ template <typename PhotonGrid>
364+ Array Observer::specific_flux_series (Array const & t_obs, Array const & nu_obs, PhotonGrid& photons) {
366365 size_t t_obs_len = t_obs.size ();
367366 size_t nu_len = nu_obs.size ();
368367
@@ -388,7 +387,7 @@ Array Observer::specific_flux_series(Array const& t_obs, Array const& nu_obs, Ph
388387 k++;
389388 continue ;
390389 } else {
391- if (set_boundaries (state, i, j, k, lg2_nu[ t_idx] , photons... )) {
390+ if (set_boundaries (state, i, j, k, lg2_nu ( t_idx) , photons)) {
392391 F_nu (t_idx) += interpolate (state, i, j, k, lg2_t_obs (t_idx));
393392 }
394393 t_idx++;
@@ -404,25 +403,25 @@ Array Observer::specific_flux_series(Array const& t_obs, Array const& nu_obs, Ph
404403 return F_nu;
405404}
406405
407- template <typename ... PhotonGrid>
408- Array Observer::specific_flux (Array const & t_obs, Real nu_obs, PhotonGrid&... photons) {
409- return xt::view (specific_flux (t_obs, Array ({nu_obs}), photons... ), 0 );
406+ template <typename PhotonGrid>
407+ Array Observer::specific_flux (Array const & t_obs, Real nu_obs, PhotonGrid& photons) {
408+ return xt::view (specific_flux (t_obs, Array ({nu_obs}), photons), 0 );
410409}
411410
412- template <typename ... PhotonGrid>
413- Array Observer::spectrum (Array const & freqs, Real t_obs, PhotonGrid&... photons) {
414- return xt::view (spectra (freqs, Array ({t_obs}), photons... ), 0 );
411+ template <typename PhotonGrid>
412+ Array Observer::spectrum (Array const & freqs, Real t_obs, PhotonGrid& photons) {
413+ return xt::view (spectra (freqs, Array ({t_obs}), photons), 0 );
415414}
416415
417- template <typename ... PhotonGrid>
418- MeshGrid Observer::spectra (Array const & freqs, Array const & t_obs, PhotonGrid&... photons) {
419- return xt::transpose (specific_flux (t_obs, freqs, photons... ));
416+ template <typename PhotonGrid>
417+ MeshGrid Observer::spectra (Array const & freqs, Array const & t_obs, PhotonGrid& photons) {
418+ return xt::transpose (specific_flux (t_obs, freqs, photons));
420419}
421420
422- template <typename ... PhotonGrid>
423- Array Observer::flux (Array const & t_obs, Array const & band_freq, PhotonGrid&... photons) {
421+ template <typename PhotonGrid>
422+ Array Observer::flux (Array const & t_obs, Array const & band_freq, PhotonGrid& photons) {
424423 Array nu_obs = boundary_to_center_log (band_freq);
425- MeshGrid F_nu = specific_flux (t_obs, nu_obs, photons... );
424+ MeshGrid F_nu = specific_flux (t_obs, nu_obs, photons);
426425 Array flux ({t_obs.size ()}, 0 );
427426 for (size_t i = 0 ; i < nu_obs.size (); ++i) {
428427 Real dnu = band_freq (i + 1 ) - band_freq (i);
0 commit comments